mirror of
https://github.com/postgres/postgres.git
synced 2025-12-07 12:02:30 +03:00
Teach UtfToLocal/LocalToUtf to support algorithmic encoding conversions.
Until now, these functions have only supported encoding conversions using lookup tables, which is fine as long as there's not too many code points to convert. However, GB18030 expects all 1.1 million Unicode code points to be convertible, which would require a ridiculously-sized lookup table. Fortunately, a large fraction of those conversions can be expressed through arithmetic, ie the conversions are one-to-one in certain defined ranges. To support that, provide a callback function that is used after consulting the lookup tables. (This patch doesn't actually change anything about the GB18030 conversion behavior, just provide infrastructure for fixing it.) Since this requires changing the APIs of UtfToLocal/LocalToUtf anyway, take the opportunity to rearrange their argument lists into what seems to me a saner order. And beautify the call sites by using lengthof() instead of error-prone sizeof() arithmetic. In passing, also mark all the lookup tables used by these calls "const". This moves an impressive amount of stuff into the text segment, at least on my machine, and is safer anyhow.
This commit is contained in:
@@ -97,7 +97,7 @@ close(FILE);
|
||||
|
||||
$file = lc("utf8_to_big5.map");
|
||||
open(FILE, "> $file") || die("cannot open $file");
|
||||
print FILE "static pg_utf_to_local ULmapBIG5[ $count ] = {\n";
|
||||
print FILE "static const pg_utf_to_local ULmapBIG5[ $count ] = {\n";
|
||||
|
||||
for $index (sort { $a <=> $b } keys(%array))
|
||||
{
|
||||
@@ -185,7 +185,7 @@ close(FILE);
|
||||
|
||||
$file = lc("big5_to_utf8.map");
|
||||
open(FILE, "> $file") || die("cannot open $file");
|
||||
print FILE "static pg_local_to_utf LUmapBIG5[ $count ] = {\n";
|
||||
print FILE "static const pg_local_to_utf LUmapBIG5[ $count ] = {\n";
|
||||
for $index (sort { $a <=> $b } keys(%array))
|
||||
{
|
||||
$utf = $array{$index};
|
||||
|
||||
@@ -55,7 +55,7 @@ close(FILE);
|
||||
|
||||
$file = "utf8_to_euc_cn.map";
|
||||
open(FILE, "> $file") || die("cannot open $file");
|
||||
print FILE "static pg_utf_to_local ULmapEUC_CN[ $count ] = {\n";
|
||||
print FILE "static const pg_utf_to_local ULmapEUC_CN[ $count ] = {\n";
|
||||
|
||||
for $index (sort { $a <=> $b } keys(%array))
|
||||
{
|
||||
@@ -109,7 +109,7 @@ close(FILE);
|
||||
|
||||
$file = "euc_cn_to_utf8.map";
|
||||
open(FILE, "> $file") || die("cannot open $file");
|
||||
print FILE "static pg_local_to_utf LUmapEUC_CN[ $count ] = {\n";
|
||||
print FILE "static const pg_local_to_utf LUmapEUC_CN[ $count ] = {\n";
|
||||
for $index (sort { $a <=> $b } keys(%array))
|
||||
{
|
||||
$utf = $array{$index};
|
||||
|
||||
@@ -72,7 +72,7 @@ open(FILE, "> $file") || die("cannot open $file");
|
||||
print FILE "/*\n";
|
||||
print FILE " * This file was generated by UCS_to_EUC_JIS_2004.pl\n";
|
||||
print FILE " */\n";
|
||||
print FILE "static pg_utf_to_local ULmapEUC_JIS_2004[] = {\n";
|
||||
print FILE "static const pg_utf_to_local ULmapEUC_JIS_2004[] = {\n";
|
||||
|
||||
for $index (sort { $a <=> $b } keys(%array))
|
||||
{
|
||||
@@ -133,7 +133,7 @@ print FILE "/*\n";
|
||||
print FILE " * This file was generated by UCS_to_EUC_JIS_2004.pl\n";
|
||||
print FILE " */\n";
|
||||
print FILE
|
||||
"static pg_utf_to_local_combined ULmapEUC_JIS_2004_combined[] = {\n";
|
||||
"static const pg_utf_to_local_combined ULmapEUC_JIS_2004_combined[] = {\n";
|
||||
|
||||
for $index (sort { $a cmp $b } keys(%array1))
|
||||
{
|
||||
@@ -256,7 +256,7 @@ open(FILE, "> $file") || die("cannot open $file");
|
||||
print FILE "/*\n";
|
||||
print FILE " * This file was generated by UCS_to_EUC_JIS_2004.pl\n";
|
||||
print FILE " */\n";
|
||||
print FILE "static pg_local_to_utf LUmapEUC_JIS_2004[] = {\n";
|
||||
print FILE "static const pg_local_to_utf LUmapEUC_JIS_2004[] = {\n";
|
||||
|
||||
for $index (sort { $a <=> $b } keys(%array))
|
||||
{
|
||||
@@ -283,7 +283,7 @@ print FILE "/*\n";
|
||||
print FILE " * This file was generated by UCS_to_EUC_JIS_2004.pl\n";
|
||||
print FILE " */\n";
|
||||
print FILE
|
||||
"static pg_local_to_utf_combined LUmapEUC_JIS_2004_combined[] = {\n";
|
||||
"static const pg_local_to_utf_combined LUmapEUC_JIS_2004_combined[] = {\n";
|
||||
|
||||
for $index (sort { $a <=> $b } keys(%array1))
|
||||
{
|
||||
|
||||
@@ -136,7 +136,7 @@ close(FILE);
|
||||
|
||||
$file = "utf8_to_euc_jp.map";
|
||||
open(FILE, "> $file") || die("cannot open $file");
|
||||
print FILE "static pg_utf_to_local ULmapEUC_JP[ $count ] = {\n";
|
||||
print FILE "static const pg_utf_to_local ULmapEUC_JP[ $count ] = {\n";
|
||||
|
||||
for $index (sort { $a <=> $b } keys(%array))
|
||||
{
|
||||
@@ -263,7 +263,7 @@ close(FILE);
|
||||
|
||||
$file = "euc_jp_to_utf8.map";
|
||||
open(FILE, "> $file") || die("cannot open $file");
|
||||
print FILE "static pg_local_to_utf LUmapEUC_JP[ $count ] = {\n";
|
||||
print FILE "static const pg_local_to_utf LUmapEUC_JP[ $count ] = {\n";
|
||||
for $index (sort { $a <=> $b } keys(%array))
|
||||
{
|
||||
$utf = $array{$index};
|
||||
|
||||
@@ -55,7 +55,7 @@ close(FILE);
|
||||
|
||||
$file = "utf8_to_euc_kr.map";
|
||||
open(FILE, "> $file") || die("cannot open $file");
|
||||
print FILE "static pg_utf_to_local ULmapEUC_KR[ $count ] = {\n";
|
||||
print FILE "static const pg_utf_to_local ULmapEUC_KR[ $count ] = {\n";
|
||||
|
||||
for $index (sort { $a <=> $b } keys(%array))
|
||||
{
|
||||
@@ -109,7 +109,7 @@ close(FILE);
|
||||
|
||||
$file = "euc_kr_to_utf8.map";
|
||||
open(FILE, "> $file") || die("cannot open $file");
|
||||
print FILE "static pg_local_to_utf LUmapEUC_KR[ $count ] = {\n";
|
||||
print FILE "static const pg_local_to_utf LUmapEUC_KR[ $count ] = {\n";
|
||||
for $index (sort { $a <=> $b } keys(%array))
|
||||
{
|
||||
$utf = $array{$index};
|
||||
|
||||
@@ -71,7 +71,7 @@ close(FILE);
|
||||
|
||||
$file = "utf8_to_euc_tw.map";
|
||||
open(FILE, "> $file") || die("cannot open $file");
|
||||
print FILE "static pg_utf_to_local ULmapEUC_TW[ $count ] = {\n";
|
||||
print FILE "static const pg_utf_to_local ULmapEUC_TW[ $count ] = {\n";
|
||||
|
||||
for $index (sort { $a <=> $b } keys(%array))
|
||||
{
|
||||
@@ -138,7 +138,7 @@ close(FILE);
|
||||
|
||||
$file = "euc_tw_to_utf8.map";
|
||||
open(FILE, "> $file") || die("cannot open $file");
|
||||
print FILE "static pg_local_to_utf LUmapEUC_TW[ $count ] = {\n";
|
||||
print FILE "static const pg_local_to_utf LUmapEUC_TW[ $count ] = {\n";
|
||||
for $index (sort { $a <=> $b } keys(%array))
|
||||
{
|
||||
$utf = $array{$index};
|
||||
|
||||
@@ -52,7 +52,7 @@ close(FILE);
|
||||
|
||||
$file = "utf8_to_gb18030.map";
|
||||
open(FILE, "> $file") || die("cannot open $file");
|
||||
print FILE "static pg_utf_to_local ULmapGB18030[ $count ] = {\n";
|
||||
print FILE "static const pg_utf_to_local ULmapGB18030[ $count ] = {\n";
|
||||
|
||||
for $index (sort { $a <=> $b } keys(%array))
|
||||
{
|
||||
@@ -106,7 +106,7 @@ close(FILE);
|
||||
|
||||
$file = "gb18030_to_utf8.map";
|
||||
open(FILE, "> $file") || die("cannot open $file");
|
||||
print FILE "static pg_local_to_utf LUmapGB18030[ $count ] = {\n";
|
||||
print FILE "static const pg_local_to_utf LUmapGB18030[ $count ] = {\n";
|
||||
for $index (sort { $a <=> $b } keys(%array))
|
||||
{
|
||||
$utf = $array{$index};
|
||||
|
||||
@@ -72,7 +72,7 @@ open(FILE, "> $file") || die("cannot open $file");
|
||||
print FILE "/*\n";
|
||||
print FILE " * This file was generated by UCS_to_SHIFT_JIS_2004.pl\n";
|
||||
print FILE " */\n";
|
||||
print FILE "static pg_utf_to_local ULmapSHIFT_JIS_2004[] = {\n";
|
||||
print FILE "static const pg_utf_to_local ULmapSHIFT_JIS_2004[] = {\n";
|
||||
|
||||
for $index (sort { $a <=> $b } keys(%array))
|
||||
{
|
||||
@@ -99,7 +99,7 @@ print FILE "/*\n";
|
||||
print FILE " * This file was generated by UCS_to_SHIFT_JIS_2004.pl\n";
|
||||
print FILE " */\n";
|
||||
print FILE
|
||||
"static pg_utf_to_local_combined ULmapSHIFT_JIS_2004_combined[] = {\n";
|
||||
"static const pg_utf_to_local_combined ULmapSHIFT_JIS_2004_combined[] = {\n";
|
||||
|
||||
for $index (sort { $a cmp $b } keys(%array1))
|
||||
{
|
||||
@@ -185,7 +185,7 @@ open(FILE, "> $file") || die("cannot open $file");
|
||||
print FILE "/*\n";
|
||||
print FILE " * This file was generated by UCS_to_SHIFTJIS_2004.pl\n";
|
||||
print FILE " */\n";
|
||||
print FILE "static pg_local_to_utf LUmapSHIFT_JIS_2004[] = {\n";
|
||||
print FILE "static const pg_local_to_utf LUmapSHIFT_JIS_2004[] = {\n";
|
||||
|
||||
for $index (sort { $a <=> $b } keys(%array))
|
||||
{
|
||||
@@ -212,7 +212,7 @@ print FILE "/*\n";
|
||||
print FILE " * This file was generated by UCS_to_SHIFT_JIS_2004.pl\n";
|
||||
print FILE " */\n";
|
||||
print FILE
|
||||
"static pg_local_to_utf_combined LUmapSHIFT_JIS_2004_combined[] = {\n";
|
||||
"static const pg_local_to_utf_combined LUmapSHIFT_JIS_2004_combined[] = {\n";
|
||||
|
||||
for $index (sort { $a <=> $b } keys(%array1))
|
||||
{
|
||||
|
||||
@@ -72,7 +72,7 @@ close(FILE);
|
||||
|
||||
$file = "utf8_to_sjis.map";
|
||||
open(FILE, "> $file") || die("cannot open $file");
|
||||
print FILE "static pg_utf_to_local ULmapSJIS[ $count ] = {\n";
|
||||
print FILE "static const pg_utf_to_local ULmapSJIS[ $count ] = {\n";
|
||||
|
||||
for $index (sort { $a <=> $b } keys(%array))
|
||||
{
|
||||
@@ -122,7 +122,7 @@ close(FILE);
|
||||
|
||||
$file = "sjis_to_utf8.map";
|
||||
open(FILE, "> $file") || die("cannot open $file");
|
||||
print FILE "static pg_local_to_utf LUmapSJIS[ $count ] = {\n";
|
||||
print FILE "static const pg_local_to_utf LUmapSJIS[ $count ] = {\n";
|
||||
for $index (sort { $a <=> $b } keys(%array))
|
||||
{
|
||||
$utf = $array{$index};
|
||||
|
||||
@@ -88,7 +88,7 @@ foreach $charset (@charsets)
|
||||
|
||||
$file = lc("utf8_to_${charset}.map");
|
||||
open(FILE, "> $file") || die("cannot open $file");
|
||||
print FILE "static pg_utf_to_local ULmap${charset}[ $count ] = {\n";
|
||||
print FILE "static const pg_utf_to_local ULmap${charset}[ $count ] = {\n";
|
||||
|
||||
for $index (sort { $a <=> $b } keys(%array))
|
||||
{
|
||||
@@ -140,7 +140,7 @@ foreach $charset (@charsets)
|
||||
|
||||
$file = lc("${charset}_to_utf8.map");
|
||||
open(FILE, "> $file") || die("cannot open $file");
|
||||
print FILE "static pg_local_to_utf LUmap${charset}[ $count ] = {\n";
|
||||
print FILE "static const pg_local_to_utf LUmap${charset}[ $count ] = {\n";
|
||||
for $index (sort { $a <=> $b } keys(%array))
|
||||
{
|
||||
$utf = $array{$index};
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
static pg_local_to_utf LUmapBIG5[ 13717 ] = {
|
||||
static const pg_local_to_utf LUmapBIG5[ 13717 ] = {
|
||||
{0xa140, 0xe38080},
|
||||
{0xa141, 0xefbc8c},
|
||||
{0xa142, 0xe38081},
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/* src/backend/utils/mb/Unicode/euc_cn_to_utf8.map */
|
||||
|
||||
static pg_local_to_utf LUmapEUC_CN[ 7445 ] = {
|
||||
static const pg_local_to_utf LUmapEUC_CN[ 7445 ] = {
|
||||
{0xa1a1, 0xe38080},
|
||||
{0xa1a2, 0xe38081},
|
||||
{0xa1a3, 0xe38082},
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/*
|
||||
* This file was generated by UCS_to_EUC_JIS_2004.pl
|
||||
*/
|
||||
static pg_local_to_utf LUmapEUC_JIS_2004[] = {
|
||||
static const pg_local_to_utf LUmapEUC_JIS_2004[] = {
|
||||
{0x000000, 0x00000000}, /* U+0000 <control> */
|
||||
{0x000001, 0x00000001}, /* U+0001 <control> */
|
||||
{0x000002, 0x00000002}, /* U+0002 <control> */
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/*
|
||||
* This file was generated by UCS_to_EUC_JIS_2004.pl
|
||||
*/
|
||||
static pg_local_to_utf_combined LUmapEUC_JIS_2004_combined[] = {
|
||||
static const pg_local_to_utf_combined LUmapEUC_JIS_2004_combined[] = {
|
||||
{0x00a4f7, 0x00e3818b, 0x00e3829a}, /* U+304B+309A [2000] */
|
||||
{0x00a4f8, 0x00e3818d, 0x00e3829a}, /* U+304D+309A [2000] */
|
||||
{0x00a4f9, 0x00e3818f, 0x00e3829a}, /* U+304F+309A [2000] */
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/* src/backend/utils/mb/Unicode/euc_jp_to_utf8.map */
|
||||
|
||||
static pg_local_to_utf LUmapEUC_JP[] = {
|
||||
static const pg_local_to_utf LUmapEUC_JP[] = {
|
||||
{0x8ea1, 0xefbda1},
|
||||
{0x8ea2, 0xefbda2},
|
||||
{0x8ea3, 0xefbda3},
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
static pg_local_to_utf LUmapEUC_KR[ 8227 ] = {
|
||||
static const pg_local_to_utf LUmapEUC_KR[ 8227 ] = {
|
||||
{0xa1a1, 0xe38080},
|
||||
{0xa1a2, 0xe38081},
|
||||
{0xa1a3, 0xe38082},
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/* src/backend/utils/mb/Unicode/euc_tw_to_utf8.map */
|
||||
|
||||
static pg_local_to_utf LUmapEUC_TW[ 23575 ] = {
|
||||
static const pg_local_to_utf LUmapEUC_TW[ 23575 ] = {
|
||||
{0xa1a1, 0xe38080},
|
||||
{0xa1a2, 0xefbc8c},
|
||||
{0xa1a3, 0xe38081},
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/* src/backend/utils/mb/Unicode/gb18030_to_utf8.map */
|
||||
|
||||
static pg_local_to_utf LUmapGB18030[ 63360 ] = {
|
||||
static const pg_local_to_utf LUmapGB18030[ 63360 ] = {
|
||||
{0x8140, 0xe4b882},
|
||||
{0x8141, 0xe4b884},
|
||||
{0x8142, 0xe4b885},
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/* src/backend/utils/mb/Unicode/gbk_to_utf8.map */
|
||||
|
||||
static pg_local_to_utf LUmapGBK[ 21792 ] = {
|
||||
static const pg_local_to_utf LUmapGBK[ 21792 ] = {
|
||||
{0x0080, 0xe282ac},
|
||||
{0x8140, 0xe4b882},
|
||||
{0x8141, 0xe4b884},
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/* src/backend/utils/mb/Unicode/iso8859_10_to_utf8.map */
|
||||
|
||||
static pg_local_to_utf LUmapISO8859_10[ 128 ] = {
|
||||
static const pg_local_to_utf LUmapISO8859_10[ 128 ] = {
|
||||
{0x0080, 0xc280},
|
||||
{0x0081, 0xc281},
|
||||
{0x0082, 0xc282},
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/* src/backend/utils/mb/Unicode/iso8859_13_to_utf8.map */
|
||||
|
||||
static pg_local_to_utf LUmapISO8859_13[ 128 ] = {
|
||||
static const pg_local_to_utf LUmapISO8859_13[ 128 ] = {
|
||||
{0x0080, 0xc280},
|
||||
{0x0081, 0xc281},
|
||||
{0x0082, 0xc282},
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/* src/backend/utils/mb/Unicode/iso8859_14_to_utf8.map */
|
||||
|
||||
static pg_local_to_utf LUmapISO8859_14[ 128 ] = {
|
||||
static const pg_local_to_utf LUmapISO8859_14[ 128 ] = {
|
||||
{0x0080, 0xc280},
|
||||
{0x0081, 0xc281},
|
||||
{0x0082, 0xc282},
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/* src/backend/utils/mb/Unicode/iso8859_15_to_utf8.map */
|
||||
|
||||
static pg_local_to_utf LUmapISO8859_15[ 128 ] = {
|
||||
static const pg_local_to_utf LUmapISO8859_15[ 128 ] = {
|
||||
{0x0080, 0xc280},
|
||||
{0x0081, 0xc281},
|
||||
{0x0082, 0xc282},
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/* src/backend/utils/mb/Unicode/iso8859_16_to_utf8.map */
|
||||
|
||||
static pg_local_to_utf LUmapISO8859_16[ 128 ] = {
|
||||
static const pg_local_to_utf LUmapISO8859_16[ 128 ] = {
|
||||
{0x0080, 0xc280},
|
||||
{0x0081, 0xc281},
|
||||
{0x0082, 0xc282},
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/* src/backend/utils/mb/Unicode/iso8859_2_to_utf8.map */
|
||||
|
||||
static pg_local_to_utf LUmapISO8859_2[ 128 ] = {
|
||||
static const pg_local_to_utf LUmapISO8859_2[ 128 ] = {
|
||||
{0x0080, 0xc280},
|
||||
{0x0081, 0xc281},
|
||||
{0x0082, 0xc282},
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/* src/backend/utils/mb/Unicode/iso8859_3_to_utf8.map */
|
||||
|
||||
static pg_local_to_utf LUmapISO8859_3[ 121 ] = {
|
||||
static const pg_local_to_utf LUmapISO8859_3[ 121 ] = {
|
||||
{0x0080, 0xc280},
|
||||
{0x0081, 0xc281},
|
||||
{0x0082, 0xc282},
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/* src/backend/utils/mb/Unicode/iso8859_4_to_utf8.map */
|
||||
|
||||
static pg_local_to_utf LUmapISO8859_4[ 128 ] = {
|
||||
static const pg_local_to_utf LUmapISO8859_4[ 128 ] = {
|
||||
{0x0080, 0xc280},
|
||||
{0x0081, 0xc281},
|
||||
{0x0082, 0xc282},
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/* src/backend/utils/mb/Unicode/iso8859_5_to_utf8.map */
|
||||
|
||||
static pg_local_to_utf LUmapISO8859_5[ 128 ] = {
|
||||
static const pg_local_to_utf LUmapISO8859_5[ 128 ] = {
|
||||
{0x0080, 0xc280},
|
||||
{0x0081, 0xc281},
|
||||
{0x0082, 0xc282},
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/* src/backend/utils/mb/Unicode/iso8859_6_to_utf8.map */
|
||||
|
||||
static pg_local_to_utf LUmapISO8859_6[ 83 ] = {
|
||||
static const pg_local_to_utf LUmapISO8859_6[ 83 ] = {
|
||||
{0x0080, 0xc280},
|
||||
{0x0081, 0xc281},
|
||||
{0x0082, 0xc282},
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/* src/backend/utils/mb/Unicode/iso8859_7_to_utf8.map */
|
||||
|
||||
static pg_local_to_utf LUmapISO8859_7[ 125 ] = {
|
||||
static const pg_local_to_utf LUmapISO8859_7[ 125 ] = {
|
||||
{0x0080, 0xc280},
|
||||
{0x0081, 0xc281},
|
||||
{0x0082, 0xc282},
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/* src/backend/utils/mb/Unicode/iso8859_8_to_utf8.map */
|
||||
|
||||
static pg_local_to_utf LUmapISO8859_8[ 92 ] = {
|
||||
static const pg_local_to_utf LUmapISO8859_8[ 92 ] = {
|
||||
{0x0080, 0xc280},
|
||||
{0x0081, 0xc281},
|
||||
{0x0082, 0xc282},
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/* src/backend/utils/mb/Unicode/iso8859_9_to_utf8.map */
|
||||
|
||||
static pg_local_to_utf LUmapISO8859_9[ 128 ] = {
|
||||
static const pg_local_to_utf LUmapISO8859_9[ 128 ] = {
|
||||
{0x0080, 0xc280},
|
||||
{0x0081, 0xc281},
|
||||
{0x0082, 0xc282},
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
static pg_local_to_utf LUmapJOHAB[ 17049 ] = {
|
||||
static const pg_local_to_utf LUmapJOHAB[ 17049 ] = {
|
||||
{0x8444, 0xe384b3},
|
||||
{0x8446, 0xe384b5},
|
||||
{0x8447, 0xe384b6},
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/* src/backend/utils/mb/Unicode/koi8r_to_utf8.map */
|
||||
|
||||
static pg_local_to_utf LUmapKOI8R[ 128 ] = {
|
||||
static const pg_local_to_utf LUmapKOI8R[ 128 ] = {
|
||||
{0x0080, 0xe29480},
|
||||
{0x0081, 0xe29482},
|
||||
{0x0082, 0xe2948c},
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
static pg_local_to_utf LUmapKOI8U[ 128 ] = {
|
||||
static const pg_local_to_utf LUmapKOI8U[ 128 ] = {
|
||||
{0x0080, 0xe29480},
|
||||
{0x0081, 0xe29482},
|
||||
{0x0082, 0xe2948c},
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/*
|
||||
* This file was generated by UCS_to_SHIFTJIS_2004.pl
|
||||
*/
|
||||
static pg_local_to_utf LUmapSHIFT_JIS_2004[] = {
|
||||
static const pg_local_to_utf LUmapSHIFT_JIS_2004[] = {
|
||||
{0x0000, 0x00000000}, /* U+0000 <control> */
|
||||
{0x0001, 0x00000001}, /* U+0001 <control> */
|
||||
{0x0002, 0x00000002}, /* U+0002 <control> */
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/*
|
||||
* This file was generated by UCS_to_SHIFT_JIS_2004.pl
|
||||
*/
|
||||
static pg_local_to_utf_combined LUmapSHIFT_JIS_2004_combined[] = {
|
||||
static const pg_local_to_utf_combined LUmapSHIFT_JIS_2004_combined[] = {
|
||||
{0x82f5, 0x00e3818b, 0x00e3829a}, /* U+304B+309A [2000] */
|
||||
{0x82f6, 0x00e3818d, 0x00e3829a}, /* U+304D+309A [2000] */
|
||||
{0x82f7, 0x00e3818f, 0x00e3829a}, /* U+304F+309A [2000] */
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
static pg_local_to_utf LUmapSJIS[ 7787 ] = {
|
||||
static const pg_local_to_utf LUmapSJIS[ 7787 ] = {
|
||||
{0x00a1, 0xefbda1},
|
||||
{0x00a2, 0xefbda2},
|
||||
{0x00a3, 0xefbda3},
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
static pg_local_to_utf LUmapUHC[ 17237 ] = {
|
||||
static const pg_local_to_utf LUmapUHC[ 17237 ] = {
|
||||
{0x8141, 0xeab082},
|
||||
{0x8142, 0xeab083},
|
||||
{0x8143, 0xeab085},
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
static pg_utf_to_local ULmapBIG5[ 13711 ] = {
|
||||
static const pg_utf_to_local ULmapBIG5[ 13711 ] = {
|
||||
{0xc2a2, 0xa246},
|
||||
{0xc2a3, 0xa247},
|
||||
{0xc2a5, 0xa244},
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
static pg_utf_to_local ULmapEUC_CN[ 7445 ] = {
|
||||
static const pg_utf_to_local ULmapEUC_CN[ 7445 ] = {
|
||||
{0xc2a4, 0xa1e8},
|
||||
{0xc2a7, 0xa1ec},
|
||||
{0xc2a8, 0xa1a7},
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/*
|
||||
* This file was generated by UCS_to_EUC_JIS_2004.pl
|
||||
*/
|
||||
static pg_utf_to_local ULmapEUC_JIS_2004[] = {
|
||||
static const pg_utf_to_local ULmapEUC_JIS_2004[] = {
|
||||
{0x00000000, 0x000000}, /* U+0000 <control> */
|
||||
{0x00000001, 0x000001}, /* U+0001 <control> */
|
||||
{0x00000002, 0x000002}, /* U+0002 <control> */
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/*
|
||||
* This file was generated by UCS_to_EUC_JIS_2004.pl
|
||||
*/
|
||||
static pg_utf_to_local_combined ULmapEUC_JIS_2004_combined[] = {
|
||||
static const pg_utf_to_local_combined ULmapEUC_JIS_2004_combined[] = {
|
||||
{0x0000c3a6, 0x0000cc80, 0x00abc4}, /* U+00E6+0300 [2000] */
|
||||
{0x0000c994, 0x0000cc80, 0x00abc8}, /* U+0254+0300 [2000] */
|
||||
{0x0000c994, 0x0000cc81, 0x00abc9}, /* U+0254+0301 [2000] */
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
static pg_utf_to_local ULmapEUC_JP[ 13175 ] = {
|
||||
static const pg_utf_to_local ULmapEUC_JP[ 13175 ] = {
|
||||
{0xc2a1, 0x8fa2c2},
|
||||
{0xc2a4, 0x8fa2f0},
|
||||
{0xc2a6, 0x8fa2c3},
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
static pg_utf_to_local ULmapEUC_KR[ 8227 ] = {
|
||||
static const pg_utf_to_local ULmapEUC_KR[ 8227 ] = {
|
||||
{0xc2a1, 0xa2ae},
|
||||
{0xc2a4, 0xa2b4},
|
||||
{0xc2a7, 0xa1d7},
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
static pg_utf_to_local ULmapEUC_TW[ 17711 ] = {
|
||||
static const pg_utf_to_local ULmapEUC_TW[ 17711 ] = {
|
||||
{0xc2a7, 0xa1f0},
|
||||
{0xc2b0, 0xa2f8},
|
||||
{0xc2b1, 0xa2b4},
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
static pg_utf_to_local ULmapGB18030[ 63360 ] = {
|
||||
static const pg_utf_to_local ULmapGB18030[ 63360 ] = {
|
||||
{0xc280, 0x81308130},
|
||||
{0xc281, 0x81308131},
|
||||
{0xc282, 0x81308132},
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
static pg_utf_to_local ULmapGBK[ 21792 ] = {
|
||||
static const pg_utf_to_local ULmapGBK[ 21792 ] = {
|
||||
{0xc2a4, 0xa1e8},
|
||||
{0xc2a7, 0xa1ec},
|
||||
{0xc2a8, 0xa1a7},
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
static pg_utf_to_local ULmapISO8859_10[ 128 ] = {
|
||||
static const pg_utf_to_local ULmapISO8859_10[ 128 ] = {
|
||||
{0xc280, 0x0080},
|
||||
{0xc281, 0x0081},
|
||||
{0xc282, 0x0082},
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
static pg_utf_to_local ULmapISO8859_13[ 128 ] = {
|
||||
static const pg_utf_to_local ULmapISO8859_13[ 128 ] = {
|
||||
{0xc280, 0x0080},
|
||||
{0xc281, 0x0081},
|
||||
{0xc282, 0x0082},
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
static pg_utf_to_local ULmapISO8859_14[ 128 ] = {
|
||||
static const pg_utf_to_local ULmapISO8859_14[ 128 ] = {
|
||||
{0xc280, 0x0080},
|
||||
{0xc281, 0x0081},
|
||||
{0xc282, 0x0082},
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
static pg_utf_to_local ULmapISO8859_15[ 128 ] = {
|
||||
static const pg_utf_to_local ULmapISO8859_15[ 128 ] = {
|
||||
{0xc280, 0x0080},
|
||||
{0xc281, 0x0081},
|
||||
{0xc282, 0x0082},
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
static pg_utf_to_local ULmapISO8859_16[ 128 ] = {
|
||||
static const pg_utf_to_local ULmapISO8859_16[ 128 ] = {
|
||||
{0xc280, 0x0080},
|
||||
{0xc281, 0x0081},
|
||||
{0xc282, 0x0082},
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
static pg_utf_to_local ULmapISO8859_2[ 128 ] = {
|
||||
static const pg_utf_to_local ULmapISO8859_2[ 128 ] = {
|
||||
{0xc280, 0x0080},
|
||||
{0xc281, 0x0081},
|
||||
{0xc282, 0x0082},
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
static pg_utf_to_local ULmapISO8859_3[ 121 ] = {
|
||||
static const pg_utf_to_local ULmapISO8859_3[ 121 ] = {
|
||||
{0xc280, 0x0080},
|
||||
{0xc281, 0x0081},
|
||||
{0xc282, 0x0082},
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
static pg_utf_to_local ULmapISO8859_4[ 128 ] = {
|
||||
static const pg_utf_to_local ULmapISO8859_4[ 128 ] = {
|
||||
{0xc280, 0x0080},
|
||||
{0xc281, 0x0081},
|
||||
{0xc282, 0x0082},
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
static pg_utf_to_local ULmapISO8859_5[ 128 ] = {
|
||||
static const pg_utf_to_local ULmapISO8859_5[ 128 ] = {
|
||||
{0xc280, 0x0080},
|
||||
{0xc281, 0x0081},
|
||||
{0xc282, 0x0082},
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
static pg_utf_to_local ULmapISO8859_6[ 83 ] = {
|
||||
static const pg_utf_to_local ULmapISO8859_6[ 83 ] = {
|
||||
{0xc280, 0x0080},
|
||||
{0xc281, 0x0081},
|
||||
{0xc282, 0x0082},
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
static pg_utf_to_local ULmapISO8859_7[ 125 ] = {
|
||||
static const pg_utf_to_local ULmapISO8859_7[ 125 ] = {
|
||||
{0xc280, 0x0080},
|
||||
{0xc281, 0x0081},
|
||||
{0xc282, 0x0082},
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
static pg_utf_to_local ULmapISO8859_8[ 92 ] = {
|
||||
static const pg_utf_to_local ULmapISO8859_8[ 92 ] = {
|
||||
{0xc280, 0x0080},
|
||||
{0xc281, 0x0081},
|
||||
{0xc282, 0x0082},
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
static pg_utf_to_local ULmapISO8859_9[ 128 ] = {
|
||||
static const pg_utf_to_local ULmapISO8859_9[ 128 ] = {
|
||||
{0xc280, 0x0080},
|
||||
{0xc281, 0x0081},
|
||||
{0xc282, 0x0082},
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
static pg_utf_to_local ULmapJOHAB[ 17049 ] = {
|
||||
static const pg_utf_to_local ULmapJOHAB[ 17049 ] = {
|
||||
{0xc2a1, 0xd9ae},
|
||||
{0xc2a4, 0xd9b4},
|
||||
{0xc2a7, 0xd967},
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
static pg_utf_to_local ULmapKOI8R[ 128 ] = {
|
||||
static const pg_utf_to_local ULmapKOI8R[ 128 ] = {
|
||||
{0xc2a0, 0x009a},
|
||||
{0xc2a9, 0x00bf},
|
||||
{0xc2b0, 0x009c},
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
static pg_utf_to_local ULmapKOI8U[ 128 ] = {
|
||||
static const pg_utf_to_local ULmapKOI8U[ 128 ] = {
|
||||
{0xc2a0, 0x009a},
|
||||
{0xc2a9, 0x00bf},
|
||||
{0xc2b0, 0x009c},
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/*
|
||||
* This file was generated by UCS_to_SHIFT_JIS_2004.pl
|
||||
*/
|
||||
static pg_utf_to_local ULmapSHIFT_JIS_2004[] = {
|
||||
static const pg_utf_to_local ULmapSHIFT_JIS_2004[] = {
|
||||
{0x00000000, 0x000000}, /* U+0000 <control> */
|
||||
{0x00000001, 0x000001}, /* U+0001 <control> */
|
||||
{0x00000002, 0x000002}, /* U+0002 <control> */
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/*
|
||||
* This file was generated by UCS_to_SHIFT_JIS_2004.pl
|
||||
*/
|
||||
static pg_utf_to_local_combined ULmapSHIFT_JIS_2004_combined[] = {
|
||||
static const pg_utf_to_local_combined ULmapSHIFT_JIS_2004_combined[] = {
|
||||
{0x0000c3a6, 0x0000cc80, 0x8663}, /* U+00E6+0300 [2000] */
|
||||
{0x0000c994, 0x0000cc80, 0x8667}, /* U+0254+0300 [2000] */
|
||||
{0x0000c994, 0x0000cc81, 0x8668}, /* U+0254+0301 [2000] */
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
static pg_utf_to_local ULmapSJIS[ 7398 ] = {
|
||||
static const pg_utf_to_local ULmapSJIS[ 7398 ] = {
|
||||
{0xc19c, 0x815f},
|
||||
{0xc2a2, 0x8191},
|
||||
{0xc2a3, 0x8192},
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
static pg_utf_to_local ULmapUHC[ 17237 ] = {
|
||||
static const pg_utf_to_local ULmapUHC[ 17237 ] = {
|
||||
{0xc2a1, 0xa2ae},
|
||||
{0xc2a4, 0xa2b4},
|
||||
{0xc2a7, 0xa1d7},
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
static pg_utf_to_local ULmapWIN1250[ 123 ] = {
|
||||
static const pg_utf_to_local ULmapWIN1250[ 123 ] = {
|
||||
{0xc2a0, 0x00a0},
|
||||
{0xc2a4, 0x00a4},
|
||||
{0xc2a6, 0x00a6},
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
static pg_utf_to_local ULmapWIN1251[ 127 ] = {
|
||||
static const pg_utf_to_local ULmapWIN1251[ 127 ] = {
|
||||
{0xc2a0, 0x00a0},
|
||||
{0xc2a4, 0x00a4},
|
||||
{0xc2a6, 0x00a6},
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
static pg_utf_to_local ULmapWIN1252[ 123 ] = {
|
||||
static const pg_utf_to_local ULmapWIN1252[ 123 ] = {
|
||||
{0xc2a0, 0x00a0},
|
||||
{0xc2a1, 0x00a1},
|
||||
{0xc2a2, 0x00a2},
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
static pg_utf_to_local ULmapWIN1253[ 111 ] = {
|
||||
static const pg_utf_to_local ULmapWIN1253[ 111 ] = {
|
||||
{0xc2a0, 0x00a0},
|
||||
{0xc2a3, 0x00a3},
|
||||
{0xc2a4, 0x00a4},
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
static pg_utf_to_local ULmapWIN1254[ 121 ] = {
|
||||
static const pg_utf_to_local ULmapWIN1254[ 121 ] = {
|
||||
{0xc2a0, 0x00a0},
|
||||
{0xc2a1, 0x00a1},
|
||||
{0xc2a2, 0x00a2},
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
static pg_utf_to_local ULmapWIN1255[ 105 ] = {
|
||||
static const pg_utf_to_local ULmapWIN1255[ 105 ] = {
|
||||
{0xc2a0, 0x00a0},
|
||||
{0xc2a1, 0x00a1},
|
||||
{0xc2a2, 0x00a2},
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
static pg_utf_to_local ULmapWIN1256[ 128 ] = {
|
||||
static const pg_utf_to_local ULmapWIN1256[ 128 ] = {
|
||||
{0xc2a0, 0x00a0},
|
||||
{0xc2a2, 0x00a2},
|
||||
{0xc2a3, 0x00a3},
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
static pg_utf_to_local ULmapWIN1257[ 116 ] = {
|
||||
static const pg_utf_to_local ULmapWIN1257[ 116 ] = {
|
||||
{0xc2a0, 0x00a0},
|
||||
{0xc2a2, 0x00a2},
|
||||
{0xc2a3, 0x00a3},
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
static pg_utf_to_local ULmapWIN1258[ 119 ] = {
|
||||
static const pg_utf_to_local ULmapWIN1258[ 119 ] = {
|
||||
{0xc2a0, 0x00a0},
|
||||
{0xc2a1, 0x00a1},
|
||||
{0xc2a2, 0x00a2},
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
static pg_utf_to_local ULmapWIN866[ 128 ] = {
|
||||
static const pg_utf_to_local ULmapWIN866[ 128 ] = {
|
||||
{0xc2a0, 0x00ff},
|
||||
{0xc2a4, 0x00fd},
|
||||
{0xc2b0, 0x00f8},
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
static pg_utf_to_local ULmapWIN874[ 97 ] = {
|
||||
static const pg_utf_to_local ULmapWIN874[ 97 ] = {
|
||||
{0xc2a0, 0x00a0},
|
||||
{0xe0b881, 0x00a1},
|
||||
{0xe0b882, 0x00a2},
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
static pg_local_to_utf LUmapWIN1250[ 123 ] = {
|
||||
static const pg_local_to_utf LUmapWIN1250[ 123 ] = {
|
||||
{0x0080, 0xe282ac},
|
||||
{0x0082, 0xe2809a},
|
||||
{0x0084, 0xe2809e},
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
static pg_local_to_utf LUmapWIN1251[ 127 ] = {
|
||||
static const pg_local_to_utf LUmapWIN1251[ 127 ] = {
|
||||
{0x0080, 0xd082},
|
||||
{0x0081, 0xd083},
|
||||
{0x0082, 0xe2809a},
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
static pg_local_to_utf LUmapWIN1252[ 123 ] = {
|
||||
static const pg_local_to_utf LUmapWIN1252[ 123 ] = {
|
||||
{0x0080, 0xe282ac},
|
||||
{0x0082, 0xe2809a},
|
||||
{0x0083, 0xc692},
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
static pg_local_to_utf LUmapWIN1253[ 111 ] = {
|
||||
static const pg_local_to_utf LUmapWIN1253[ 111 ] = {
|
||||
{0x0080, 0xe282ac},
|
||||
{0x0082, 0xe2809a},
|
||||
{0x0083, 0xc692},
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
static pg_local_to_utf LUmapWIN1254[ 121 ] = {
|
||||
static const pg_local_to_utf LUmapWIN1254[ 121 ] = {
|
||||
{0x0080, 0xe282ac},
|
||||
{0x0082, 0xe2809a},
|
||||
{0x0083, 0xc692},
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
static pg_local_to_utf LUmapWIN1255[ 105 ] = {
|
||||
static const pg_local_to_utf LUmapWIN1255[ 105 ] = {
|
||||
{0x0080, 0xe282ac},
|
||||
{0x0082, 0xe2809a},
|
||||
{0x0083, 0xc692},
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
static pg_local_to_utf LUmapWIN1256[ 128 ] = {
|
||||
static const pg_local_to_utf LUmapWIN1256[ 128 ] = {
|
||||
{0x0080, 0xe282ac},
|
||||
{0x0081, 0xd9be},
|
||||
{0x0082, 0xe2809a},
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
static pg_local_to_utf LUmapWIN1257[ 116 ] = {
|
||||
static const pg_local_to_utf LUmapWIN1257[ 116 ] = {
|
||||
{0x0080, 0xe282ac},
|
||||
{0x0082, 0xe2809a},
|
||||
{0x0084, 0xe2809e},
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
static pg_local_to_utf LUmapWIN1258[ 119 ] = {
|
||||
static const pg_local_to_utf LUmapWIN1258[ 119 ] = {
|
||||
{0x0080, 0xe282ac},
|
||||
{0x0082, 0xe2809a},
|
||||
{0x0083, 0xc692},
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
static pg_local_to_utf LUmapWIN866[ 128 ] = {
|
||||
static const pg_local_to_utf LUmapWIN866[ 128 ] = {
|
||||
{0x0080, 0xd090},
|
||||
{0x0081, 0xd091},
|
||||
{0x0082, 0xd092},
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
static pg_local_to_utf LUmapWIN874[ 97 ] = {
|
||||
static const pg_local_to_utf LUmapWIN874[ 97 ] = {
|
||||
{0x0080, 0xe282ac},
|
||||
{0x0085, 0xe280a6},
|
||||
{0x0091, 0xe28098},
|
||||
|
||||
Reference in New Issue
Block a user