1
#ifndef __MULTIBUYTE_H__
2
#define __MULTIBUYTE_H__
5
* Multibyte library header ( psqlODBC Only )
11
/* PostgreSQL client encoding */
12
#define SQL_ASCII 0 /* SQL/ASCII */
13
#define EUC_JP 1 /* EUC for Japanese */
14
#define EUC_CN 2 /* EUC for Chinese */
15
#define EUC_KR 3 /* EUC for Korean */
16
#define EUC_TW 4 /* EUC for Taiwan */
18
#define UTF8 6 /* Unicode UTF-8 */
19
#define MULE_INTERNAL 7 /* Mule internal code */
20
#define LATIN1 8 /* ISO-8859 Latin 1 */
21
#define LATIN2 9 /* ISO-8859 Latin 2 */
22
#define LATIN3 10 /* ISO-8859 Latin 3 */
23
#define LATIN4 11 /* ISO-8859 Latin 4 */
24
#define LATIN5 12 /* ISO-8859 Latin 5 */
25
#define LATIN6 13 /* ISO-8859 Latin 6 */
26
#define LATIN7 14 /* ISO-8859 Latin 7 */
27
#define LATIN8 15 /* ISO-8859 Latin 8 */
28
#define LATIN9 16 /* ISO-8859 Latin 9 */
29
#define LATIN10 17 /* ISO-8859 Latin 10 */
30
#define WIN1256 18 /* Arabic Windows */
31
#define TCVN 19 /* Vietnamese Windows */
32
#define WIN874 20 /* Thai Windows */
33
#define KOI8R 21 /* KOI8-R/U */
34
#define WIN1251 22 /* windows-1251 */
35
#define ALT 23 /* Alternativny Variant (MS-DOS CP866) */
36
#define ISO_8859_5 24 /* ISO-8859-5 */
37
#define ISO_8859_6 25 /* ISO-8859-6 */
38
#define ISO_8859_7 26 /* ISO-8859-7 */
39
#define ISO_8859_8 27 /* ISO-8859-8 */
41
#define SJIS 28 /* Shift JIS */
42
#define BIG5 29 /* Big5 */
43
#define GBK 30 /* GBK */
44
#define UHC 31 /* UHC */
45
#define WIN1250 32 /* windows-1250 */
46
#define GB18030 33 /* GB18030 */
49
#define MAX_CHARACTERSET_NAME 24
50
#define MAX_CHARACTER_LEN 6
53
// extern int multibyte_client_encoding; /* Multibyte client encoding. */
54
// extern int multibyte_status; /* Multibyte charcter status. */
56
// void multibyte_init(void);
57
// unsigned char *check_client_encoding(unsigned char *sql_string);
58
// int multibyte_char_check(unsigned char s);
59
// unsigned char *multibyte_strchr(const unsigned char *string, unsigned int c);
63
extern void CC_lookup_characterset(ConnectionClass *self);
65
extern int pg_CS_stat(int stat,unsigned int charcter,int characterset_code);
66
extern int pg_CS_code(const unsigned char *stat_string);
67
extern unsigned char *pg_CS_name(int code);
74
extern int pg_mbslen(int ccsc, const unsigned char *string);
75
extern unsigned char *pg_mbschr(int ccsc, const unsigned char *string, unsigned int character);
76
extern unsigned char *pg_mbsinc(int ccsc, const unsigned char *current );
78
/* Old Type Compatible */
82
const unsigned char *encstr;
86
#define ENCODE_STATUS(enc) ((enc).ccst)
88
void encoded_str_constr(encoded_str *encstr, int ccsc, const char *str);
89
#define make_encoded_str(encstr, conn, str) encoded_str_constr(encstr, conn->ccsc, str)
90
extern int encoded_nextchar(encoded_str *encstr);
91
extern int encoded_byte_check(encoded_str *encstr, int abspos);
92
#define check_client_encoding(X) pg_CS_name(pg_CS_code(X))
93
#endif /* __MULTIBUYTE_H__ */