diff options
| author | Bruce Momjian | 2004-12-02 22:37:14 +0000 |
|---|---|---|
| committer | Bruce Momjian | 2004-12-02 22:37:14 +0000 |
| commit | 4ea4f8bd0647d4cc9b349ae825a29b5750784ef4 (patch) | |
| tree | e7c16ca3cc4df7f00486bb9d202e86e4a3e03643 /src/include/mb | |
| parent | 917c8bb407ef586c8a0c0387638c61ebe2f1aed5 (diff) | |
Fix for Unicode characters above 0x10000.
John Hansen
Diffstat (limited to 'src/include/mb')
| -rw-r--r-- | src/include/mb/pg_wchar.h | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/src/include/mb/pg_wchar.h b/src/include/mb/pg_wchar.h index 9fb8aa2e4e3..aa2976650bf 100644 --- a/src/include/mb/pg_wchar.h +++ b/src/include/mb/pg_wchar.h @@ -1,4 +1,4 @@ -/* $PostgreSQL: pgsql/src/include/mb/pg_wchar.h,v 1.53 2004/12/02 22:14:38 momjian Exp $ */ +/* $PostgreSQL: pgsql/src/include/mb/pg_wchar.h,v 1.54 2004/12/02 22:37:14 momjian Exp $ */ #ifndef PG_WCHAR_H #define PG_WCHAR_H @@ -17,6 +17,14 @@ */ typedef unsigned int pg_wchar; + +/* + * The UTF types + */ +typedef unsigned int UTF32; /* at least 32 bits */ +typedef unsigned short UTF16; /* at least 16 bits */ +typedef unsigned char UTF8; /* typically 8 bits */ + /* * various definitions for EUC */ @@ -340,4 +348,6 @@ extern void mic2latin(unsigned char *mic, unsigned char *p, int len, int lc); extern void latin2mic_with_table(unsigned char *l, unsigned char *p, int len, int lc, unsigned char *tab); extern void mic2latin_with_table(unsigned char *mic, unsigned char *p, int len, int lc, unsigned char *tab); +extern bool isLegalUTF8(const UTF8 *source, int len); + #endif /* PG_WCHAR_H */ |
