PostgreSQL Source Code
git master
|
Go to the source code of this file.
Functions | |
int | local2local (const unsigned char *l, unsigned char *p, int len, int src_encoding, int dest_encoding, const unsigned char *tab, bool noError) |
int | latin2mic (const unsigned char *l, unsigned char *p, int len, int lc, int encoding, bool noError) |
int | mic2latin (const unsigned char *mic, unsigned char *p, int len, int lc, int encoding, bool noError) |
int | latin2mic_with_table (const unsigned char *l, unsigned char *p, int len, int lc, int encoding, const unsigned char *tab, bool noError) |
int | mic2latin_with_table (const unsigned char *mic, unsigned char *p, int len, int lc, int encoding, const unsigned char *tab, bool noError) |
static int | compare3 (const void *p1, const void *p2) |
static int | compare4 (const void *p1, const void *p2) |
static unsigned char * | store_coded_char (unsigned char *dest, uint32 code) |
static uint32 | pg_mb_radix_conv (const pg_mb_radix_tree *rt, int l, unsigned char b1, unsigned char b2, unsigned char b3, unsigned char b4) |
int | UtfToLocal (const unsigned char *utf, int len, unsigned char *iso, const pg_mb_radix_tree *map, const pg_utf_to_local_combined *cmap, int cmapsize, utf_local_conversion_func conv_func, int encoding, bool noError) |
int | LocalToUtf (const unsigned char *iso, int len, unsigned char *utf, const pg_mb_radix_tree *map, const pg_local_to_utf_combined *cmap, int cmapsize, utf_local_conversion_func conv_func, int encoding, bool noError) |
|
static |
|
static |
Definition at line 339 of file conv.c.
References p2.
Referenced by LocalToUtf().
int latin2mic | ( | const unsigned char * | l, |
unsigned char * | p, | ||
int | len, | ||
int | lc, | ||
int | encoding, | ||
bool | noError | ||
) |
Definition at line 89 of file conv.c.
References encoding, IS_HIGHBIT_SET, len, report_invalid_encoding(), and start.
Referenced by koi8r_to_mic(), latin1_to_mic(), latin2_to_mic(), latin3_to_mic(), and latin4_to_mic().
int latin2mic_with_table | ( | const unsigned char * | l, |
unsigned char * | p, | ||
int | len, | ||
int | lc, | ||
int | encoding, | ||
const unsigned char * | tab, | ||
bool | noError | ||
) |
Definition at line 194 of file conv.c.
References encoding, HIGHBIT, IS_HIGHBIT_SET, len, PG_MULE_INTERNAL, report_invalid_encoding(), report_untranslatable_char(), and start.
Referenced by iso_to_mic(), win1250_to_mic(), win1251_to_mic(), and win866_to_mic().
int local2local | ( | const unsigned char * | l, |
unsigned char * | p, | ||
int | len, | ||
int | src_encoding, | ||
int | dest_encoding, | ||
const unsigned char * | tab, | ||
bool | noError | ||
) |
Definition at line 33 of file conv.c.
References HIGHBIT, IS_HIGHBIT_SET, len, report_invalid_encoding(), report_untranslatable_char(), and start.
Referenced by iso_to_koi8r(), iso_to_win1251(), iso_to_win866(), koi8r_to_iso(), koi8r_to_win1251(), koi8r_to_win866(), latin2_to_win1250(), win1250_to_latin2(), win1251_to_iso(), win1251_to_koi8r(), win1251_to_win866(), win866_to_iso(), win866_to_koi8r(), and win866_to_win1251().
int LocalToUtf | ( | const unsigned char * | iso, |
int | len, | ||
unsigned char * | utf, | ||
const pg_mb_radix_tree * | map, | ||
const pg_local_to_utf_combined * | cmap, | ||
int | cmapsize, | ||
utf_local_conversion_func | conv_func, | ||
int | encoding, | ||
bool | noError | ||
) |
Definition at line 717 of file conv.c.
References compare4(), elog, encoding, ereport, errcode(), errmsg(), ERROR, IS_HIGHBIT_SET, len, pg_encoding_verifymbchar(), pg_mb_radix_conv(), PG_UTF8, PG_VALID_ENCODING, report_invalid_encoding(), report_untranslatable_char(), start, store_coded_char(), pg_local_to_utf_combined::utf1, and pg_local_to_utf_combined::utf2.
Referenced by big5_to_utf8(), euc_cn_to_utf8(), euc_jis_2004_to_utf8(), euc_jp_to_utf8(), euc_kr_to_utf8(), euc_tw_to_utf8(), gb18030_to_utf8(), gbk_to_utf8(), iso8859_to_utf8(), johab_to_utf8(), koi8r_to_utf8(), koi8u_to_utf8(), shift_jis_2004_to_utf8(), sjis_to_utf8(), uhc_to_utf8(), and win_to_utf8().
int mic2latin | ( | const unsigned char * | mic, |
unsigned char * | p, | ||
int | len, | ||
int | lc, | ||
int | encoding, | ||
bool | noError | ||
) |
Definition at line 127 of file conv.c.
References encoding, IS_HIGHBIT_SET, len, PG_MULE_INTERNAL, pg_mule_mblen(), report_invalid_encoding(), report_untranslatable_char(), and start.
Referenced by mic_to_koi8r(), mic_to_latin1(), mic_to_latin2(), mic_to_latin3(), and mic_to_latin4().
int mic2latin_with_table | ( | const unsigned char * | mic, |
unsigned char * | p, | ||
int | len, | ||
int | lc, | ||
int | encoding, | ||
const unsigned char * | tab, | ||
bool | noError | ||
) |
Definition at line 257 of file conv.c.
References encoding, HIGHBIT, IS_HIGHBIT_SET, len, PG_MULE_INTERNAL, pg_mule_mblen(), report_invalid_encoding(), report_untranslatable_char(), and start.
Referenced by mic_to_iso(), mic_to_win1250(), mic_to_win1251(), and mic_to_win866().
|
inlinestatic |
Definition at line 373 of file conv.c.
References pg_mb_radix_tree::b1_lower, pg_mb_radix_tree::b1_upper, pg_mb_radix_tree::b1root, pg_mb_radix_tree::b2_1_lower, pg_mb_radix_tree::b2_1_upper, pg_mb_radix_tree::b2_2_lower, pg_mb_radix_tree::b2_2_upper, pg_mb_radix_tree::b2root, pg_mb_radix_tree::b3_1_lower, pg_mb_radix_tree::b3_1_upper, pg_mb_radix_tree::b3_2_lower, pg_mb_radix_tree::b3_2_upper, pg_mb_radix_tree::b3_3_lower, pg_mb_radix_tree::b3_3_upper, pg_mb_radix_tree::b3root, pg_mb_radix_tree::b4_1_lower, pg_mb_radix_tree::b4_1_upper, pg_mb_radix_tree::b4_2_lower, pg_mb_radix_tree::b4_2_upper, pg_mb_radix_tree::b4_3_lower, pg_mb_radix_tree::b4_3_upper, pg_mb_radix_tree::b4_4_lower, pg_mb_radix_tree::b4_4_upper, pg_mb_radix_tree::b4root, pg_mb_radix_tree::chars16, pg_mb_radix_tree::chars32, and idx().
Referenced by LocalToUtf(), and UtfToLocal().
|
inlinestatic |
Definition at line 353 of file conv.c.
References generate_unaccent_rules::dest.
Referenced by LocalToUtf(), and UtfToLocal().
int UtfToLocal | ( | const unsigned char * | utf, |
int | len, | ||
unsigned char * | iso, | ||
const pg_mb_radix_tree * | map, | ||
const pg_utf_to_local_combined * | cmap, | ||
int | cmapsize, | ||
utf_local_conversion_func | conv_func, | ||
int | encoding, | ||
bool | noError | ||
) |
Definition at line 507 of file conv.c.
References pg_utf_to_local_combined::code, compare3(), elog, encoding, ereport, errcode(), errmsg(), ERROR, len, pg_mb_radix_conv(), PG_UTF8, pg_utf8_islegal(), pg_utf_mblen, PG_VALID_ENCODING, report_invalid_encoding(), report_untranslatable_char(), start, and store_coded_char().
Referenced by utf8_to_big5(), utf8_to_euc_cn(), utf8_to_euc_jis_2004(), utf8_to_euc_jp(), utf8_to_euc_kr(), utf8_to_euc_tw(), utf8_to_gb18030(), utf8_to_gbk(), utf8_to_iso8859(), utf8_to_johab(), utf8_to_koi8r(), utf8_to_koi8u(), utf8_to_shift_jis_2004(), utf8_to_sjis(), utf8_to_uhc(), and utf8_to_win().