1
0
mirror of https://github.com/postgres/postgres.git synced 2025-07-07 00:36:50 +03:00

Add support for Windows codepages 1253, 1254, 1255, and 1257 and clean

up a bunch of the support utilities.

In src/backend/utils/mb/Unicode remove nearly duplicate copies of the
UCS_to_XXX perl script and replace with one version to handle all generic
files.  Update the Makefile so that it knows about all the map files.
This produces a slight difference in some of the map files, using a
uniform naming convention and not mapping the null character.

In src/backend/utils/mb/conversion_procs create a master utf8<->win
codepage function like the ISO 8859 versions instead of having a separate
handler for each conversion.

There is an externally visible change in the name of the win1258 to utf8
conversion.  According to the documentation notes, it was named
incorrectly and this changes it to a standard name.

Running the Unicode mapping perl scripts has shown some additional mapping
changes in koi8r and iso8859-7.
This commit is contained in:
Peter Eisentraut
2006-02-18 16:15:23 +00:00
parent a6d3b5b944
commit 1b658473ea
54 changed files with 1522 additions and 1431 deletions

View File

@ -4,7 +4,7 @@
#
# Copyright (c) 2001-2005, PostgreSQL Global Development Group
#
# $PostgreSQL: pgsql/src/backend/utils/mb/Unicode/Makefile,v 1.9 2005/03/07 04:30:52 momjian Exp $
# $PostgreSQL: pgsql/src/backend/utils/mb/Unicode/Makefile,v 1.10 2006/02/18 16:15:22 petere Exp $
#
#-------------------------------------------------------------------------
@ -12,36 +12,64 @@ subdir = src/backend/utils/mb/Unicode
top_builddir = ../../../../..
include $(top_builddir)/src/Makefile.global
ISO8859MAPS=iso8859_2_to_utf8.map iso8859_3_to_utf8.map \
iso8859_4_to_utf8.map iso8859_5_to_utf8.map \
utf8_to_iso8859_2.map utf8_to_iso8859_3.map \
utf8_to_iso8859_4.map utf8_to_iso8859_5.map
ISO8859MAPS = iso8859_2_to_utf8.map utf8_to_iso8859_2.map \
iso8859_3_to_utf8.map utf8_to_iso8859_3.map \
iso8859_4_to_utf8.map utf8_to_iso8859_4.map \
iso8859_5_to_utf8.map utf8_to_iso8859_5.map \
iso8859_6_to_utf8.map utf8_to_iso8859_6.map \
iso8859_7_to_utf8.map utf8_to_iso8859_7.map \
iso8859_8_to_utf8.map utf8_to_iso8859_8.map \
iso8859_9_to_utf8.map utf8_to_iso8859_9.map \
iso8859_10_to_utf8.map utf8_to_iso8859_10.map \
iso8859_13_to_utf8.map utf8_to_iso8859_13.map \
iso8859_14_to_utf8.map utf8_to_iso8859_14.map \
iso8859_15_to_utf8.map utf8_to_iso8859_15.map \
iso8859_16_to_utf8.map utf8_to_iso8859_16.map
WINMAPS = win866_to_utf8.map utf8_to_win866.map \
win874_to_utf8.map utf8_to_win874.map \
win1250_to_utf8.map utf8_to_win1250.map \
win1251_to_utf8.map utf8_to_win1251.map \
win1252_to_utf8.map utf8_to_win1252.map \
win1253_to_utf8.map utf8_to_win1253.map \
win1254_to_utf8.map utf8_to_win1254.map \
win1255_to_utf8.map utf8_to_win1255.map \
win1256_to_utf8.map utf8_to_win1256.map \
win1257_to_utf8.map utf8_to_win1257.map \
win1258_to_utf8.map utf8_to_win1258.map
CYRILLICMAPS=koi8r_to_utf8.map win1251_to_utf8.map win866_to_utf8.map\
utf8_to_koi8r.map utf8_to_win1251.map utf8_to_win866.map
GENERICMAPS = $(ISO8859MAPS) $(WINMAPS) \
big5_to_utf8.map utf8_to_big5.map \
johab_to_utf8.map utf8_to_johab.map \
uhc_to_utf8.map utf8_to_uhc.map \
gbk_to_utf8.map utf8_to_gbk.map \
koi8r_to_utf8.map utf8_to_koi8r.map
MAPS= $(ISO8859MAPS) $(CYRILLICMAPS)\
big5_to_utf8.map euc_cn_to_utf8.map euc_jp_to_utf8.map \
euc_kr_to_utf8.map euc_tw_to_utf8.map sjis_to_utf8.map \
utf8_to_big5.map utf8_to_euc_cn.map utf8_to_euc_jp.map \
utf8_to_euc_kr.map utf8_to_euc_tw.map utf8_to_iso8859_2.map \
utf8_to_sjis.map gb18030_to_utf8.map utf8_to_gb18030.map
SPECIALMAPS = euc_cn_to_utf8.map utf8_to_euc_cn.map \
euc_jp_to_utf8.map utf8_to_euc_jp.map \
euc_kr_to_utf8.map utf8_to_euc_kr.map \
euc_tw_to_utf8.map utf8_to_euc_tw.map \
sjis_to_utf8.map utf8_to_sjis.map \
gb18030_to_utf8.map utf8_to_gb18030.map
ISO8859TEXTS= 8859-2.TXT 8859-3.TXT 8859-4.TXT 8859-5.TXT
CYRILLICTEXTS=cp866.txt cp1251.txt koi8-r.txt
MAPS = $(GENERICMAPS) $(SPECIALMAPS)
TEXTS=$(ISO8859TEXTS) $(CYRILLICTEXTS) \
BIG5.TXT CNS11643.TXT GB2312.TXT \
JIS0201.TXT JIS0208.TXT JIS0212.TXT \
OLD5601.TXT SHIFTJIS.TXT ISO10646-GB18030.TXT
ISO8859TEXTS = 8859-2.TXT 8859-3.TXT 8859-4.TXT 8859-5.TXT \
8859-6.TXT 8859-7.TXT 8859-8.TXT 8859-9.TXT \
8859-10.TXT 8859-13.TXT 8859-14.TXT 8859-15.TXT \
8859-16.TXT
WINTEXTS = CP866.TXT CP874.TXT CP1250.TXT CP1251.TXT \
CP1252.TXT CP1253.TXT CP1254.TXT CP1255.TXT \
CP1256.TXT CP1257.TXT CP1258.TXT
GENERICTEXTS = $(ISO8859TEXTS) $(WINTEXTS) \
KOI8-R.TXT CP936.TXT CP949.TXT JOHAB.TXT BIG5.TXT
all: $(MAPS)
$(ISO8859MAPS) : $(ISO8859TEXTS)
./UCS_to_8859.pl
$(CYRILLICMAPS) : $(CYRILLICTEXTS)
./UCS_to_cyrillic.pl
$(GENERICMAPS) : $(GENERICTEXTS)
./UCS_to_most.pl
euc_jp_to_utf8.map utf8_to_euc_jp.map : JIS0201.TXT JIS0208.TXT JIS0212.TXT
./UCS_to_EUC_JP.pl
@ -49,18 +77,15 @@ euc_jp_to_utf8.map utf8_to_euc_jp.map : JIS0201.TXT JIS0208.TXT JIS0212.TXT
euc_cn_to_utf8.map utf8_to_euc_cn.map : GB2312.TXT
./UCS_to_EUC_CN.pl
euc_kr_to_utf8.map utf8_to_euc_kr.map : OLD5601.TXT
euc_kr_to_utf8.map utf8_to_euc_kr.map : KSX1001.TXT
./UCS_to_EUC_KR.pl
euc_tw_to_utf8.map utf8_to_euc_tw.map : CNS11643.TXT
./UCS_to_EUC_TW.pl
sjis_to_utf8.map utf8_to_sjis.map : SHIFTJIS.TXT
sjis_to_utf8.map utf8_to_sjis.map : CP932.TXT
./UCS_to_SJIS.pl
big5_to_utf8.map utf8_to_big5.map : BIG5.TXT
./UCS_to_BIG5.pl
gb18030_to_utf8.map utf8_to_gb18030.map : ISO10646-GB18030.TXT
./UCS_to_GB18030.pl
clean:

View File

@ -1,110 +0,0 @@
#! /usr/bin/perl
#
# Copyright (c) 2001-2005, PostgreSQL Global Development Group
#
# $PostgreSQL: pgsql/src/backend/utils/mb/Unicode/UCS_to_8859.pl,v 1.8 2005/03/07 04:30:52 momjian Exp $
#
# Generate UTF-8 <--> ISO8859 code conversion tables from
# map files provided by Unicode organization.
# Unfortunately it is prohibited by the organization
# to distribute the map files. So if you try to use this script,
# you have to obtain "8859-[2-16].TXT" from the organization's ftp site.
# We assume the file include three tab-separated columns:
# ISO/IEC 8859 code in hex
# UCS-2 code in hex
# # and Unicode name (not used in this script)
require "ucs2utf.pl";
@charsets = (2,3,4,5,6,7,8,9,10,13,14,15,16);
foreach $charset (@charsets) {
#
# first, generate UTF8->ISO8859 table
#
$in_file = "8859-${charset}.TXT";
open( FILE, $in_file ) || die( "cannot open $in_file" );
reset 'array';
while( <FILE> ){
chop;
if( /^#/ ){
next;
}
( $c, $u, $rest ) = split;
$ucs = hex($u);
$code = hex($c);
if( $code >= 0x80){
$utf = &ucs2utf($ucs);
if( $array{ $utf } ne "" ){
printf STDERR "Warning: duplicate UTF8: %04x\n",$ucs;
next;
}
$count++;
$array{ $utf } = $code;
}
}
close( FILE );
$file = "utf8_to_iso8859_${charset}.map";
open( FILE, "> $file" ) || die( "cannot open $file" );
print FILE "static pg_utf_to_local ULmapISO8859_${charset}[ $count ] = {\n";
for $index ( sort {$a <=> $b} keys( %array ) ){
$code = $array{ $index };
$count--;
if( $count == 0 ){
printf FILE " {0x%04x, 0x%04x}\n", $index, $code;
} else {
printf FILE " {0x%04x, 0x%04x},\n", $index, $code;
}
}
print FILE "};\n";
close(FILE);
#
# then generate ISO885->UTF8 table
#
open( FILE, $in_file ) || die( "cannot open $in_file" );
reset 'array';
while( <FILE> ){
chop;
if( /^#/ ){
next;
}
( $c, $u, $rest ) = split;
$ucs = hex($u);
$code = hex($c);
if($code >= 0x80){
$utf = &ucs2utf($ucs);
if( $array{ $utf } ne "" ){
printf STDERR "Warning: duplicate UTF8: %04x\n",$ucs;
next;
}
$count++;
$array{ $code } = $utf;
}
}
close( FILE );
$file = "iso8859_${charset}_to_utf8.map";
open( FILE, "> $file" ) || die( "cannot open $file" );
print FILE "static pg_local_to_utf LUmapISO8859_${charset}[ $count ] = {\n";
for $index ( sort {$a <=> $b} keys( %array ) ){
$utf = $array{ $index };
$count--;
if( $count == 0 ){
printf FILE " {0x%04x, 0x%04x}\n", $index, $utf;
} else {
printf FILE " {0x%04x, 0x%04x},\n", $index, $utf;
}
}
print FILE "};\n";
close(FILE);
}

View File

@ -1,111 +0,0 @@
#! /usr/bin/perl
#
# Copyright (c) 2001-2005, PostgreSQL Global Development Group
#
# $PostgreSQL: pgsql/src/backend/utils/mb/Unicode/UCS_to_BIG5.pl,v 1.7 2005/03/07 04:30:52 momjian Exp $
#
# Generate UTF-8 <--> BIG5 code conversion tables from
# map files provided by Unicode organization.
# Unfortunately it is prohibited by the organization
# to distribute the map files. So if you try to use this script,
# you have to obtain OLD5601.TXT from
# the organization's ftp site.
#
# OLD5601.TXT format:
# KSC5601 code in hex
# UCS-2 code in hex
# # and Unicode name (not used in this script)
require "ucs2utf.pl";
# first generate UTF-8 --> BIG5 table
$in_file = "BIG5.TXT";
open( FILE, $in_file ) || die( "cannot open $in_file" );
while( <FILE> ){
chop;
if( /^#/ ){
next;
}
( $c, $u, $rest ) = split;
$ucs = hex($u);
$code = hex($c);
if( $code >= 0x80 && $ucs >= 0x0080 ){
$utf = &ucs2utf($ucs);
if( $array{ $utf } ne "" ){
printf STDERR "Warning: duplicate UTF8: %04x\n",$ucs;
next;
}
$count++;
$array{ $utf } = $code;
}
}
close( FILE );
#
# first, generate UTF8 --> BIG5 table
#
$file = "utf8_to_big5.map";
open( FILE, "> $file" ) || die( "cannot open $file" );
print FILE "static pg_utf_to_local ULmapBIG5[ $count ] = {\n";
for $index ( sort {$a <=> $b} keys( %array ) ){
$code = $array{ $index };
$count--;
if( $count == 0 ){
printf FILE " {0x%04x, 0x%04x}\n", $index, $code;
} else {
printf FILE " {0x%04x, 0x%04x},\n", $index, $code;
}
}
print FILE "};\n";
close(FILE);
#
# then generate EUC_JP --> UTF8 table
#
reset 'array';
open( FILE, $in_file ) || die( "cannot open $in_file" );
while( <FILE> ){
chop;
if( /^#/ ){
next;
}
( $c, $u, $rest ) = split;
$ucs = hex($u);
$code = hex($c);
if( $code >= 0x80 && $ucs >= 0x0080 ){
$utf = &ucs2utf($ucs);
if( $array{ $code } ne "" ){
printf STDERR "Warning: duplicate code: %04x\n",$ucs;
next;
}
$count++;
$array{ $code } = $utf;
}
}
close( FILE );
$file = "big5_to_utf8.map";
open( FILE, "> $file" ) || die( "cannot open $file" );
print FILE "static pg_local_to_utf LUmapBIG5[ $count ] = {\n";
for $index ( sort {$a <=> $b} keys( %array ) ){
$utf = $array{ $index };
$count--;
if( $count == 0 ){
printf FILE " {0x%04x, 0x%04x}\n", $index, $utf;
} else {
printf FILE " {0x%04x, 0x%04x},\n", $index, $utf;
}
}
print FILE "};\n";
close(FILE);

View File

@ -1,112 +0,0 @@
#! /usr/bin/perl
#
# Copyright (c) 2001-2005, PostgreSQL Global Development Group
#
# $PostgreSQL: pgsql/src/backend/utils/mb/Unicode/UCS_to_GBK.pl,v 1.6 2005/03/07 04:30:52 momjian Exp $
#
#
# Generate UTF-8 <--> GBK code conversion tables from
# map files provided by Unicode organization.
# Unfortunately it is prohibited by the organization
# to distribute the map files. So if you try to use this script,
# you have to obtain CP936.TXT from
# the organization's ftp site.
#
# CP936.TXT format:
# GBK code in hex
# UCS-2 code in hex
# # and Unicode name (not used in this script)
require "ucs2utf.pl";
# first generate UTF-8 --> GBK table
$in_file = "CP936.TXT";
open( FILE, $in_file ) || die( "cannot open $in_file" );
while( <FILE> ){
chop;
if( /^#/ ){
next;
}
( $c, $u, $rest ) = split;
$ucs = hex($u);
$code = hex($c);
if( $code >= 0x80 && $ucs >= 0x0080 ){
$utf = &ucs2utf($ucs);
if( $array{ $utf } ne "" ){
printf STDERR "Warning: duplicate UTF8: %04x\n",$ucs;
next;
}
$count++;
$array{ $utf } = $code;
}
}
close( FILE );
#
# first, generate UTF8 --> WIN949 table
#
$file = "utf8_to_gbk.map";
open( FILE, "> $file" ) || die( "cannot open $file" );
print FILE "static pg_utf_to_local ULmapGBK[ $count ] = {\n";
for $index ( sort {$a <=> $b} keys( %array ) ){
$code = $array{ $index };
$count--;
if( $count == 0 ){
printf FILE " {0x%04x, 0x%04x}\n", $index, $code;
} else {
printf FILE " {0x%04x, 0x%04x},\n", $index, $code;
}
}
print FILE "};\n";
close(FILE);
#
# then generate WIN936 --> UTF8 table
#
reset 'array';
open( FILE, $in_file ) || die( "cannot open $in_file" );
while( <FILE> ){
chop;
if( /^#/ ){
next;
}
( $c, $u, $rest ) = split;
$ucs = hex($u);
$code = hex($c);
if( $code >= 0x80 && $ucs >= 0x0080 ){
$utf = &ucs2utf($ucs);
if( $array{ $code } ne "" ){
printf STDERR "Warning: duplicate code: %04x\n",$ucs;
next;
}
$count++;
$array{ $code } = $utf;
}
}
close( FILE );
$file = "gbk_to_utf8.map";
open( FILE, "> $file" ) || die( "cannot open $file" );
print FILE "static pg_local_to_utf LUmapGBK[ $count ] = {\n";
for $index ( sort {$a <=> $b} keys( %array ) ){
$utf = $array{ $index };
$count--;
if( $count == 0 ){
printf FILE " {0x%04x, 0x%04x}\n", $index, $utf;
} else {
printf FILE " {0x%04x, 0x%04x},\n", $index, $utf;
}
}
print FILE "};\n";
close(FILE);

View File

@ -1,111 +0,0 @@
#! /usr/bin/perl
#
# Copyright (c) 2001-2005, PostgreSQL Global Development Group
#
# $PostgreSQL: pgsql/src/backend/utils/mb/Unicode/UCS_to_JOHAB.pl,v 1.6 2005/03/07 04:30:52 momjian Exp $
#
# Generate UTF-8 <--> JOHAB code conversion tables from
# map files provided by Unicode organization.
# Unfortunately it is prohibited by the organization
# to distribute the map files. So if you try to use this script,
# you have to obtain JOHAB.TXT from
# the organization's ftp site.
#
# JOHAB.TXT format:
# JOHAB code in hex
# UCS-2 code in hex
# # and Unicode name (not used in this script)
require "ucs2utf.pl";
# first generate UTF-8 --> JOHAB table
$in_file = "JOHAB.TXT";
open( FILE, $in_file ) || die( "cannot open $in_file" );
while( <FILE> ){
chop;
if( /^#/ ){
next;
}
( $c, $u, $rest ) = split;
$ucs = hex($u);
$code = hex($c);
if( $code >= 0x80 && $ucs >= 0x0080 ){
$utf = &ucs2utf($ucs);
if( $array{ $utf } ne "" ){
printf STDERR "Warning: duplicate UTF8: %04x\n",$ucs;
next;
}
$count++;
$array{ $utf } = $code;
}
}
close( FILE );
#
# first, generate UTF8 --> JOHAB table
#
$file = "utf8_to_johab.map";
open( FILE, "> $file" ) || die( "cannot open $file" );
print FILE "static pg_utf_to_local ULmapJOHAB[ $count ] = {\n";
for $index ( sort {$a <=> $b} keys( %array ) ){
$code = $array{ $index };
$count--;
if( $count == 0 ){
printf FILE " {0x%04x, 0x%04x}\n", $index, $code;
} else {
printf FILE " {0x%04x, 0x%04x},\n", $index, $code;
}
}
print FILE "};\n";
close(FILE);
#
# then generate JOHAB --> UTF8 table
#
reset 'array';
open( FILE, $in_file ) || die( "cannot open $in_file" );
while( <FILE> ){
chop;
if( /^#/ ){
next;
}
( $c, $u, $rest ) = split;
$ucs = hex($u);
$code = hex($c);
if( $code >= 0x80 && $ucs >= 0x0080 ){
$utf = &ucs2utf($ucs);
if( $array{ $code } ne "" ){
printf STDERR "Warning: duplicate code: %04x\n",$ucs;
next;
}
$count++;
$array{ $code } = $utf;
}
}
close( FILE );
$file = "johab_to_utf8.map";
open( FILE, "> $file" ) || die( "cannot open $file" );
print FILE "static pg_local_to_utf LUmapJOHAB[ $count ] = {\n";
for $index ( sort {$a <=> $b} keys( %array ) ){
$utf = $array{ $index };
$count--;
if( $count == 0 ){
printf FILE " {0x%04x, 0x%04x}\n", $index, $utf;
} else {
printf FILE " {0x%04x, 0x%04x},\n", $index, $utf;
}
}
print FILE "};\n";
close(FILE);

View File

@ -1,111 +0,0 @@
#! /usr/bin/perl
#
# Copyright (c) 2001-2005, PostgreSQL Global Development Group
#
# $PostgreSQL: pgsql/src/backend/utils/mb/Unicode/UCS_to_UHC.pl,v 1.6 2005/03/07 04:30:52 momjian Exp $
#
# Generate UTF-8 <--> BIG5 code conversion tables from
# map files provided by Unicode organization.
# Unfortunately it is prohibited by the organization
# to distribute the map files. So if you try to use this script,
# you have to obtain OLD5601.TXT from
# the organization's ftp site.
#
# CP949.TXT format:
# UHC code in hex
# UCS-2 code in hex
# # and Unicode name (not used in this script)
require "ucs2utf.pl";
# first generate UTF-8 --> WIN949 table
$in_file = "CP949.TXT";
open( FILE, $in_file ) || die( "cannot open $in_file" );
while( <FILE> ){
chop;
if( /^#/ ){
next;
}
( $c, $u, $rest ) = split;
$ucs = hex($u);
$code = hex($c);
if( $code >= 0x80 && $ucs >= 0x0080 ){
$utf = &ucs2utf($ucs);
if( $array{ $utf } ne "" ){
printf STDERR "Warning: duplicate UTF8: %04x\n",$ucs;
next;
}
$count++;
$array{ $utf } = $code;
}
}
close( FILE );
#
# first, generate UTF8 --> UHC table
#
$file = "utf8_to_uhc.map";
open( FILE, "> $file" ) || die( "cannot open $file" );
print FILE "static pg_utf_to_local ULmapUHC[ $count ] = {\n";
for $index ( sort {$a <=> $b} keys( %array ) ){
$code = $array{ $index };
$count--;
if( $count == 0 ){
printf FILE " {0x%04x, 0x%04x}\n", $index, $code;
} else {
printf FILE " {0x%04x, 0x%04x},\n", $index, $code;
}
}
print FILE "};\n";
close(FILE);
#
# then generate UHC --> UTF8 table
#
reset 'array';
open( FILE, $in_file ) || die( "cannot open $in_file" );
while( <FILE> ){
chop;
if( /^#/ ){
next;
}
( $c, $u, $rest ) = split;
$ucs = hex($u);
$code = hex($c);
if( $code >= 0x80 && $ucs >= 0x0080 ){
$utf = &ucs2utf($ucs);
if( $array{ $code } ne "" ){
printf STDERR "Warning: duplicate code: %04x\n",$ucs;
next;
}
$count++;
$array{ $code } = $utf;
}
}
close( FILE );
$file = "uhc_to_utf8.map";
open( FILE, "> $file" ) || die( "cannot open $file" );
print FILE "static pg_local_to_utf LUmapUHC[ $count ] = {\n";
for $index ( sort {$a <=> $b} keys( %array ) ){
$utf = $array{ $index };
$count--;
if( $count == 0 ){
printf FILE " {0x%04x, 0x%04x}\n", $index, $utf;
} else {
printf FILE " {0x%04x, 0x%04x},\n", $index, $utf;
}
}
print FILE "};\n";
close(FILE);

View File

@ -1,111 +0,0 @@
#! /usr/bin/perl
#
# Copyright (c) 2001-2005, PostgreSQL Global Development Group
#
# $PostgreSQL: pgsql/src/backend/utils/mb/Unicode/UCS_to_WIN874.pl,v 1.6 2005/03/07 04:30:52 momjian Exp $
#
# Generate UTF-8 <--> WIN874 code conversion tables from
# map files provided by Unicode organization.
# Unfortunately it is prohibited by the organization
# to distribute the map files. So if you try to use this script,
# you have to obtain OLD5601.TXT from
# the organization's ftp site.
#
# OLD5601.TXT format:
# KSC5601 code in hex
# UCS-2 code in hex
# # and Unicode name (not used in this script)
require "ucs2utf.pl";
# first generate UTF-8 --> WIN949 table
$in_file = "CP874.TXT";
open( FILE, $in_file ) || die( "cannot open $in_file" );
while( <FILE> ){
chop;
if( /^#/ ){
next;
}
( $c, $u, $rest ) = split;
$ucs = hex($u);
$code = hex($c);
if( $code >= 0x80 && $ucs >= 0x0080 ){
$utf = &ucs2utf($ucs);
if( $array{ $utf } ne "" ){
printf STDERR "Warning: duplicate UTF8: %04x\n",$ucs;
next;
}
$count++;
$array{ $utf } = $code;
}
}
close( FILE );
#
# first, generate UTF8 --> WIN874 table
#
$file = "utf8_to_win874.map";
open( FILE, "> $file" ) || die( "cannot open $file" );
print FILE "static pg_utf_to_local ULmapWIN874[ $count ] = {\n";
for $index ( sort {$a <=> $b} keys( %array ) ){
$code = $array{ $index };
$count--;
if( $count == 0 ){
printf FILE " {0x%04x, 0x%04x}\n", $index, $code;
} else {
printf FILE " {0x%04x, 0x%04x},\n", $index, $code;
}
}
print FILE "};\n";
close(FILE);
#
# then generate WIN874 --> UTF8 table
#
reset 'array';
open( FILE, $in_file ) || die( "cannot open $in_file" );
while( <FILE> ){
chop;
if( /^#/ ){
next;
}
( $c, $u, $rest ) = split;
$ucs = hex($u);
$code = hex($c);
if( $code >= 0x80 && $ucs >= 0x0080 ){
$utf = &ucs2utf($ucs);
if( $array{ $code } ne "" ){
printf STDERR "Warning: duplicate code: %04x\n",$ucs;
next;
}
$count++;
$array{ $code } = $utf;
}
}
close( FILE );
$file = "win874_to_utf8.map";
open( FILE, "> $file" ) || die( "cannot open $file" );
print FILE "static pg_local_to_utf LUmapWIN874[ $count ] = {\n";
for $index ( sort {$a <=> $b} keys( %array ) ){
$utf = $array{ $index };
$count--;
if( $count == 0 ){
printf FILE " {0x%04x, 0x%04x}\n", $index, $utf;
} else {
printf FILE " {0x%04x, 0x%04x},\n", $index, $utf;
}
}
print FILE "};\n";
close(FILE);

View File

@ -1,112 +0,0 @@
#! /usr/bin/perl
#
# Copyright (c) 2001-2005, PostgreSQL Global Development Group
#
# $PostgreSQL: pgsql/src/backend/utils/mb/Unicode/UCS_to_cyrillic.pl,v 1.7 2005/03/07 04:30:52 momjian Exp $
#
# Generate UTF-8 <--> ISO8859 code conversion tables from
# map files provided by Unicode organization.
# Unfortunately it is prohibited by the organization
# to distribute the map files. So if you try to use this script,
# you have to obtain "8859-[2-5].TXT" from the organization's ftp site.
# We assume the file include three tab-separated columns:
# ISO/IEC 8859 code in hex
# UCS-2 code in hex
# # and Unicode name (not used in this script)
require "ucs2utf.pl";
%filename = ('KOI8R'=>'koi8-r.txt',
'WIN1251'=>'cp1251.txt',
'WIN866'=>'cp866.txt');
@charsets = ('KOI8R','WIN866','WIN1251');
foreach $charset (@charsets) {
#
# first, generate UTF8->ISO8859 table
#
$in_file = $filename{$charset};
open( FILE, $in_file ) || die( "cannot open $in_file" );
reset 'array';
while( <FILE> ){
chop;
if( /^#/ ){
next;
}
( $c, $u, $rest ) = split;
$ucs = hex($u);
$code = hex($c);
if( $code >= 0x80){
$utf = &ucs2utf($ucs);
if( $array{ $utf } ne "" ){
printf STDERR "Warning: duplicate UTF8: %04x\n",$ucs;
next;
}
$count++;
$array{ $utf } = $code;
}
}
close( FILE );
$file = "utf8_to_${charset}.map";
open( FILE, "> $file" ) || die( "cannot open $file" );
print FILE "static pg_utf_to_local ULmap_${charset}[ $count ] = {\n";
for $index ( sort {$a <=> $b} keys( %array ) ){
$code = $array{ $index };
$count--;
if( $count == 0 ){
printf FILE " {0x%04x, 0x%04x}\n", $index, $code;
} else {
printf FILE " {0x%04x, 0x%04x},\n", $index, $code;
}
}
print FILE "};\n";
close(FILE);
#
# then generate ISO885->UTF8 table
#
open( FILE, $in_file ) || die( "cannot open $in_file" );
reset 'array';
while( <FILE> ){
chop;
if( /^#/ ){
next;
}
( $c, $u, $rest ) = split;
$ucs = hex($u);
$code = hex($c);
if($code >= 0x80){
$utf = &ucs2utf($ucs);
if( $array{ $utf } ne "" ){
printf STDERR "Warning: duplicate UTF8: %04x\n",$ucs;
next;
}
$count++;
$array{ $code } = $utf;
}
}
close( FILE );
$file = "${charset}_to_utf8.map";
open( FILE, "> $file" ) || die( "cannot open $file" );
print FILE "static pg_local_to_utf LUmap${charset}[ $count ] = {\n";
for $index ( sort {$a <=> $b} keys( %array ) ){
$utf = $array{ $index };
$count--;
if( $count == 0 ){
printf FILE " {0x%04x, 0x%04x}\n", $index, $utf;
} else {
printf FILE " {0x%04x, 0x%04x},\n", $index, $utf;
}
}
print FILE "};\n";
close(FILE);
}

View File

@ -2,28 +2,58 @@
#
# Copyright (c) 2001-2005, PostgreSQL Global Development Group
#
# $PostgreSQL: pgsql/src/backend/utils/mb/Unicode/UCS_to_WINX.pl,v 1.6 2005/03/07 04:30:52 momjian Exp $
# $PostgreSQL: pgsql/src/backend/utils/mb/Unicode/UCS_to_most.pl,v 1.1 2006/02/18 16:15:22 petere Exp $
#
# Generate UTF-8 <--> WINX code conversion tables from
# Generate UTF-8 <--> character code conversion tables from
# map files provided by Unicode organization.
# Unfortunately it is prohibited by the organization
# to distribute the map files. So if you try to use this script,
# you have to obtain "8859-[2-5].TXT" from the organization's ftp site.
# you have to obtain the map files from the organization's ftp site.
# ftp://www.unicode.org/Public/MAPPINGS/
# We assume the file include three tab-separated columns:
# ISO/IEC 8859 code in hex
# source character set code in hex
# UCS-2 code in hex
# # and Unicode name (not used in this script)
require "ucs2utf.pl";
%filename = ('WIN1256'=>'CP1256.TXT',
'WIN1258'=>'CP1258.TXT',
'WIN874'=>'CP874.TXT',
'WIN1250'=>'CP1250.TXT');
@charsets = ('WIN1256','WIN1258','WIN874','WIN1250');
%filename = (
'WIN866' => 'CP866.TXT',
'WIN874' => 'CP874.TXT',
'WIN1250' => 'CP1250.TXT',
'WIN1251' => 'CP1251.TXT',
'WIN1252' => 'CP1252.TXT',
'WIN1253' => 'CP1253.TXT',
'WIN1254' => 'CP1254.TXT',
'WIN1255' => 'CP1255.TXT',
'WIN1256' => 'CP1256.TXT',
'WIN1257' => 'CP1257.TXT',
'WIN1258' => 'CP1258.TXT',
'ISO8859_2' => '8859-2.TXT',
'ISO8859_3' => '8859-3.TXT',
'ISO8859_4' => '8859-4.TXT',
'ISO8859_5' => '8859-5.TXT',
'ISO8859_6' => '8859-6.TXT',
'ISO8859_7' => '8859-7.TXT',
'ISO8859_8' => '8859-8.TXT',
'ISO8859_9' => '8859-9.TXT',
'ISO8859_10' => '8859-10.TXT',
'ISO8859_13' => '8859-13.TXT',
'ISO8859_14' => '8859-14.TXT',
'ISO8859_15' => '8859-15.TXT',
'ISO8859_16' => '8859-16.TXT',
'KOI8R' => 'KOI8-R.TXT',
'GBK' => 'CP936.TXT',
'UHC' => 'CP949.TXT',
'JOHAB' => 'JOHAB.TXT',
'BIG5' => 'BIG5.TXT',
);
@charsets = keys(filename);
foreach $charset (@charsets) {
#
# first, generate UTF8->ISO8859 table
# first, generate UTF8-> charset table
#
$in_file = $filename{$charset};
@ -39,7 +69,7 @@ foreach $charset (@charsets) {
( $c, $u, $rest ) = split;
$ucs = hex($u);
$code = hex($c);
if( $code >= 0x80){
if( $code >= 0x80 && $ucs >= 0x0080){
$utf = &ucs2utf($ucs);
if( $array{ $utf } ne "" ){
printf STDERR "Warning: duplicate UTF8: %04x\n",$ucs;
@ -51,9 +81,9 @@ foreach $charset (@charsets) {
}
close( FILE );
$file = lower("utf8_to_${charset}.map");
$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 pg_utf_to_local ULmap${charset}[ $count ] = {\n";
for $index ( sort {$a <=> $b} keys( %array ) ){
$code = $array{ $index };
@ -69,7 +99,7 @@ foreach $charset (@charsets) {
close(FILE);
#
# then generate ISO885->UTF8 table
# then generate character set code ->UTF8 table
#
open( FILE, $in_file ) || die( "cannot open $in_file" );
@ -83,9 +113,9 @@ foreach $charset (@charsets) {
( $c, $u, $rest ) = split;
$ucs = hex($u);
$code = hex($c);
if($code >= 0x80){
if($code >= 0x80 && $ucs >= 0x0080){
$utf = &ucs2utf($ucs);
if( $array{ $utf } ne "" ){
if( $array{ $code } ne "" ){
printf STDERR "Warning: duplicate UTF8: %04x\n",$ucs;
next;
}
@ -95,7 +125,7 @@ foreach $charset (@charsets) {
}
close( FILE );
$file = lower("${charset}_to_utf8.map");
$file = lc("${charset}_to_utf8.map");
open( FILE, "> $file" ) || die( "cannot open $file" );
print FILE "static pg_local_to_utf LUmap${charset}[ $count ] = {\n";
for $index ( sort {$a <=> $b} keys( %array ) ){

View File

@ -1,4 +1,4 @@
static pg_local_to_utf LUmapISO8859_7[ 122 ] = {
static pg_local_to_utf LUmapISO8859_7[ 125 ] = {
{0x0080, 0xc280},
{0x0081, 0xc281},
{0x0082, 0xc282},
@ -35,10 +35,13 @@ static pg_local_to_utf LUmapISO8859_7[ 122 ] = {
{0x00a1, 0xe28098},
{0x00a2, 0xe28099},
{0x00a3, 0xc2a3},
{0x00a4, 0xe282ac},
{0x00a5, 0xe282af},
{0x00a6, 0xc2a6},
{0x00a7, 0xc2a7},
{0x00a8, 0xc2a8},
{0x00a9, 0xc2a9},
{0x00aa, 0xcdba},
{0x00ab, 0xc2ab},
{0x00ac, 0xc2ac},
{0x00ad, 0xc2ad},

View File

@ -35,32 +35,32 @@ static pg_local_to_utf LUmapKOI8R[ 128 ] = {
{0x00a1, 0xe29591},
{0x00a2, 0xe29592},
{0x00a3, 0xd191},
{0x00a4, 0xd194},
{0x00a4, 0xe29593},
{0x00a5, 0xe29594},
{0x00a6, 0xd196},
{0x00a7, 0xd197},
{0x00a6, 0xe29595},
{0x00a7, 0xe29596},
{0x00a8, 0xe29597},
{0x00a9, 0xe29598},
{0x00aa, 0xe29599},
{0x00ab, 0xe2959a},
{0x00ac, 0xe2959b},
{0x00ad, 0xd291},
{0x00ad, 0xe2959c},
{0x00ae, 0xe2959d},
{0x00af, 0xe2959e},
{0x00b0, 0xe2959f},
{0x00b1, 0xe295a0},
{0x00b2, 0xe295a1},
{0x00b3, 0xd081},
{0x00b4, 0xd084},
{0x00b4, 0xe295a2},
{0x00b5, 0xe295a3},
{0x00b6, 0xd086},
{0x00b7, 0xd087},
{0x00b6, 0xe295a4},
{0x00b7, 0xe295a5},
{0x00b8, 0xe295a6},
{0x00b9, 0xe295a7},
{0x00ba, 0xe295a8},
{0x00bb, 0xe295a9},
{0x00bc, 0xe295aa},
{0x00bd, 0xd290},
{0x00bd, 0xe295ab},
{0x00be, 0xe295ac},
{0x00bf, 0xc2a9},
{0x00c0, 0xd18e},

View File

@ -1,4 +1,4 @@
static pg_utf_to_local ULmapISO8859_7[ 122 ] = {
static pg_utf_to_local ULmapISO8859_7[ 125 ] = {
{0xc280, 0x0080},
{0xc281, 0x0081},
{0xc282, 0x0082},
@ -47,6 +47,7 @@ static pg_utf_to_local ULmapISO8859_7[ 122 ] = {
{0xc2b7, 0x00b7},
{0xc2bb, 0x00bb},
{0xc2bd, 0x00bd},
{0xcdba, 0x00aa},
{0xce84, 0x00b4},
{0xce85, 0x00b5},
{0xce86, 0x00b6},
@ -120,5 +121,7 @@ static pg_utf_to_local ULmapISO8859_7[ 122 ] = {
{0xcf8e, 0x00fe},
{0xe28095, 0x00af},
{0xe28098, 0x00a1},
{0xe28099, 0x00a2}
{0xe28099, 0x00a2},
{0xe282ac, 0x00a4},
{0xe282af, 0x00a5}
};

View File

@ -1,4 +1,4 @@
static pg_utf_to_local ULmap_KOI8R[ 128 ] = {
static pg_utf_to_local ULmapKOI8R[ 128 ] = {
{0xc2a0, 0x009a},
{0xc2a9, 0x00bf},
{0xc2b0, 0x009c},
@ -6,9 +6,6 @@ static pg_utf_to_local ULmap_KOI8R[ 128 ] = {
{0xc2b7, 0x009e},
{0xc3b7, 0x009f},
{0xd081, 0x00b3},
{0xd084, 0x00b4},
{0xd086, 0x00b6},
{0xd087, 0x00b7},
{0xd090, 0x00e1},
{0xd091, 0x00e2},
{0xd092, 0x00f7},
@ -74,11 +71,6 @@ static pg_utf_to_local ULmap_KOI8R[ 128 ] = {
{0xd18e, 0x00c0},
{0xd18f, 0x00d1},
{0xd191, 0x00a3},
{0xd194, 0x00a4},
{0xd196, 0x00a6},
{0xd197, 0x00a7},
{0xd290, 0x00bd},
{0xd291, 0x00ad},
{0xe28899, 0x0095},
{0xe2889a, 0x0096},
{0xe28988, 0x0097},
@ -100,23 +92,31 @@ static pg_utf_to_local ULmap_KOI8R[ 128 ] = {
{0xe29590, 0x00a0},
{0xe29591, 0x00a1},
{0xe29592, 0x00a2},
{0xe29593, 0x00a4},
{0xe29594, 0x00a5},
{0xe29595, 0x00a6},
{0xe29596, 0x00a7},
{0xe29597, 0x00a8},
{0xe29598, 0x00a9},
{0xe29599, 0x00aa},
{0xe2959a, 0x00ab},
{0xe2959b, 0x00ac},
{0xe2959c, 0x00ad},
{0xe2959d, 0x00ae},
{0xe2959e, 0x00af},
{0xe2959f, 0x00b0},
{0xe295a0, 0x00b1},
{0xe295a1, 0x00b2},
{0xe295a2, 0x00b4},
{0xe295a3, 0x00b5},
{0xe295a4, 0x00b6},
{0xe295a5, 0x00b7},
{0xe295a6, 0x00b8},
{0xe295a7, 0x00b9},
{0xe295a8, 0x00ba},
{0xe295a9, 0x00bb},
{0xe295aa, 0x00bc},
{0xe295ab, 0x00bd},
{0xe295ac, 0x00be},
{0xe29680, 0x008b},
{0xe29684, 0x008c},

View File

@ -1,5 +1,4 @@
static pg_utf_to_local ULmapWIN1250[ 124 ] = {
{0x0000, 0x0081},
static pg_utf_to_local ULmapWIN1250[ 123 ] = {
{0xc2a0, 0x00a0},
{0xc2a4, 0x00a4},
{0xc2a6, 0x00a6},

View File

@ -1,5 +1,4 @@
static pg_utf_to_local ULmap_WIN1251[ 127 ] = {
{0x0000, 0x0088},
static pg_utf_to_local ULmapWIN1251[ 127 ] = {
{0xc2a0, 0x00a0},
{0xc2a4, 0x00a4},
{0xc2a6, 0x00a6},
@ -124,6 +123,7 @@ static pg_utf_to_local ULmap_WIN1251[ 127 ] = {
{0xe280b0, 0x0089},
{0xe280b9, 0x008b},
{0xe280ba, 0x009b},
{0xe282ac, 0x0088},
{0xe28496, 0x00b9},
{0xe284a2, 0x0099}
};

View File

@ -1,5 +1,4 @@
static pg_utf_to_local ULmapWIN1252[ 124 ] = {
{0x0000, 0x0081},
static pg_utf_to_local ULmapWIN1252[ 123 ] = {
{0xc2a0, 0x00a0},
{0xc2a1, 0x00a1},
{0xc2a2, 0x00a2},

View File

@ -0,0 +1,113 @@
static pg_utf_to_local ULmapWIN1253[ 111 ] = {
{0xc2a0, 0x00a0},
{0xc2a3, 0x00a3},
{0xc2a4, 0x00a4},
{0xc2a5, 0x00a5},
{0xc2a6, 0x00a6},
{0xc2a7, 0x00a7},
{0xc2a8, 0x00a8},
{0xc2a9, 0x00a9},
{0xc2ab, 0x00ab},
{0xc2ac, 0x00ac},
{0xc2ad, 0x00ad},
{0xc2ae, 0x00ae},
{0xc2b0, 0x00b0},
{0xc2b1, 0x00b1},
{0xc2b2, 0x00b2},
{0xc2b3, 0x00b3},
{0xc2b5, 0x00b5},
{0xc2b6, 0x00b6},
{0xc2b7, 0x00b7},
{0xc2bb, 0x00bb},
{0xc2bd, 0x00bd},
{0xc692, 0x0083},
{0xce84, 0x00b4},
{0xce85, 0x00a1},
{0xce86, 0x00a2},
{0xce88, 0x00b8},
{0xce89, 0x00b9},
{0xce8a, 0x00ba},
{0xce8c, 0x00bc},
{0xce8e, 0x00be},
{0xce8f, 0x00bf},
{0xce90, 0x00c0},
{0xce91, 0x00c1},
{0xce92, 0x00c2},
{0xce93, 0x00c3},
{0xce94, 0x00c4},
{0xce95, 0x00c5},
{0xce96, 0x00c6},
{0xce97, 0x00c7},
{0xce98, 0x00c8},
{0xce99, 0x00c9},
{0xce9a, 0x00ca},
{0xce9b, 0x00cb},
{0xce9c, 0x00cc},
{0xce9d, 0x00cd},
{0xce9e, 0x00ce},
{0xce9f, 0x00cf},
{0xcea0, 0x00d0},
{0xcea1, 0x00d1},
{0xcea3, 0x00d3},
{0xcea4, 0x00d4},
{0xcea5, 0x00d5},
{0xcea6, 0x00d6},
{0xcea7, 0x00d7},
{0xcea8, 0x00d8},
{0xcea9, 0x00d9},
{0xceaa, 0x00da},
{0xceab, 0x00db},
{0xceac, 0x00dc},
{0xcead, 0x00dd},
{0xceae, 0x00de},
{0xceaf, 0x00df},
{0xceb0, 0x00e0},
{0xceb1, 0x00e1},
{0xceb2, 0x00e2},
{0xceb3, 0x00e3},
{0xceb4, 0x00e4},
{0xceb5, 0x00e5},
{0xceb6, 0x00e6},
{0xceb7, 0x00e7},
{0xceb8, 0x00e8},
{0xceb9, 0x00e9},
{0xceba, 0x00ea},
{0xcebb, 0x00eb},
{0xcebc, 0x00ec},
{0xcebd, 0x00ed},
{0xcebe, 0x00ee},
{0xcebf, 0x00ef},
{0xcf80, 0x00f0},
{0xcf81, 0x00f1},
{0xcf82, 0x00f2},
{0xcf83, 0x00f3},
{0xcf84, 0x00f4},
{0xcf85, 0x00f5},
{0xcf86, 0x00f6},
{0xcf87, 0x00f7},
{0xcf88, 0x00f8},
{0xcf89, 0x00f9},
{0xcf8a, 0x00fa},
{0xcf8b, 0x00fb},
{0xcf8c, 0x00fc},
{0xcf8d, 0x00fd},
{0xcf8e, 0x00fe},
{0xe28093, 0x0096},
{0xe28094, 0x0097},
{0xe28095, 0x00af},
{0xe28098, 0x0091},
{0xe28099, 0x0092},
{0xe2809a, 0x0082},
{0xe2809c, 0x0093},
{0xe2809d, 0x0094},
{0xe2809e, 0x0084},
{0xe280a0, 0x0086},
{0xe280a1, 0x0087},
{0xe280a2, 0x0095},
{0xe280a6, 0x0085},
{0xe280b0, 0x0089},
{0xe280b9, 0x008b},
{0xe280ba, 0x009b},
{0xe282ac, 0x0080},
{0xe284a2, 0x0099}
};

View File

@ -0,0 +1,123 @@
static pg_utf_to_local ULmapWIN1254[ 121 ] = {
{0xc2a0, 0x00a0},
{0xc2a1, 0x00a1},
{0xc2a2, 0x00a2},
{0xc2a3, 0x00a3},
{0xc2a4, 0x00a4},
{0xc2a5, 0x00a5},
{0xc2a6, 0x00a6},
{0xc2a7, 0x00a7},
{0xc2a8, 0x00a8},
{0xc2a9, 0x00a9},
{0xc2aa, 0x00aa},
{0xc2ab, 0x00ab},
{0xc2ac, 0x00ac},
{0xc2ad, 0x00ad},
{0xc2ae, 0x00ae},
{0xc2af, 0x00af},
{0xc2b0, 0x00b0},
{0xc2b1, 0x00b1},
{0xc2b2, 0x00b2},
{0xc2b3, 0x00b3},
{0xc2b4, 0x00b4},
{0xc2b5, 0x00b5},
{0xc2b6, 0x00b6},
{0xc2b7, 0x00b7},
{0xc2b8, 0x00b8},
{0xc2b9, 0x00b9},
{0xc2ba, 0x00ba},
{0xc2bb, 0x00bb},
{0xc2bc, 0x00bc},
{0xc2bd, 0x00bd},
{0xc2be, 0x00be},
{0xc2bf, 0x00bf},
{0xc380, 0x00c0},
{0xc381, 0x00c1},
{0xc382, 0x00c2},
{0xc383, 0x00c3},
{0xc384, 0x00c4},
{0xc385, 0x00c5},
{0xc386, 0x00c6},
{0xc387, 0x00c7},
{0xc388, 0x00c8},
{0xc389, 0x00c9},
{0xc38a, 0x00ca},
{0xc38b, 0x00cb},
{0xc38c, 0x00cc},
{0xc38d, 0x00cd},
{0xc38e, 0x00ce},
{0xc38f, 0x00cf},
{0xc391, 0x00d1},
{0xc392, 0x00d2},
{0xc393, 0x00d3},
{0xc394, 0x00d4},
{0xc395, 0x00d5},
{0xc396, 0x00d6},
{0xc397, 0x00d7},
{0xc398, 0x00d8},
{0xc399, 0x00d9},
{0xc39a, 0x00da},
{0xc39b, 0x00db},
{0xc39c, 0x00dc},
{0xc39f, 0x00df},
{0xc3a0, 0x00e0},
{0xc3a1, 0x00e1},
{0xc3a2, 0x00e2},
{0xc3a3, 0x00e3},
{0xc3a4, 0x00e4},
{0xc3a5, 0x00e5},
{0xc3a6, 0x00e6},
{0xc3a7, 0x00e7},
{0xc3a8, 0x00e8},
{0xc3a9, 0x00e9},
{0xc3aa, 0x00ea},
{0xc3ab, 0x00eb},
{0xc3ac, 0x00ec},
{0xc3ad, 0x00ed},
{0xc3ae, 0x00ee},
{0xc3af, 0x00ef},
{0xc3b1, 0x00f1},
{0xc3b2, 0x00f2},
{0xc3b3, 0x00f3},
{0xc3b4, 0x00f4},
{0xc3b5, 0x00f5},
{0xc3b6, 0x00f6},
{0xc3b7, 0x00f7},
{0xc3b8, 0x00f8},
{0xc3b9, 0x00f9},
{0xc3ba, 0x00fa},
{0xc3bb, 0x00fb},
{0xc3bc, 0x00fc},
{0xc3bf, 0x00ff},
{0xc49e, 0x00d0},
{0xc49f, 0x00f0},
{0xc4b0, 0x00dd},
{0xc4b1, 0x00fd},
{0xc592, 0x008c},
{0xc593, 0x009c},
{0xc59e, 0x00de},
{0xc59f, 0x00fe},
{0xc5a0, 0x008a},
{0xc5a1, 0x009a},
{0xc5b8, 0x009f},
{0xc692, 0x0083},
{0xcb86, 0x0088},
{0xcb9c, 0x0098},
{0xe28093, 0x0096},
{0xe28094, 0x0097},
{0xe28098, 0x0091},
{0xe28099, 0x0092},
{0xe2809a, 0x0082},
{0xe2809c, 0x0093},
{0xe2809d, 0x0094},
{0xe2809e, 0x0084},
{0xe280a0, 0x0086},
{0xe280a1, 0x0087},
{0xe280a2, 0x0095},
{0xe280a6, 0x0085},
{0xe280b0, 0x0089},
{0xe280b9, 0x008b},
{0xe280ba, 0x009b},
{0xe282ac, 0x0080},
{0xe284a2, 0x0099}
};

View File

@ -0,0 +1,107 @@
static pg_utf_to_local ULmapWIN1255[ 105 ] = {
{0xc2a0, 0x00a0},
{0xc2a1, 0x00a1},
{0xc2a2, 0x00a2},
{0xc2a3, 0x00a3},
{0xc2a5, 0x00a5},
{0xc2a6, 0x00a6},
{0xc2a7, 0x00a7},
{0xc2a8, 0x00a8},
{0xc2a9, 0x00a9},
{0xc2ab, 0x00ab},
{0xc2ac, 0x00ac},
{0xc2ad, 0x00ad},
{0xc2ae, 0x00ae},
{0xc2af, 0x00af},
{0xc2b0, 0x00b0},
{0xc2b1, 0x00b1},
{0xc2b2, 0x00b2},
{0xc2b3, 0x00b3},
{0xc2b4, 0x00b4},
{0xc2b5, 0x00b5},
{0xc2b6, 0x00b6},
{0xc2b7, 0x00b7},
{0xc2b8, 0x00b8},
{0xc2b9, 0x00b9},
{0xc2bb, 0x00bb},
{0xc2bc, 0x00bc},
{0xc2bd, 0x00bd},
{0xc2be, 0x00be},
{0xc2bf, 0x00bf},
{0xc397, 0x00aa},
{0xc3b7, 0x00ba},
{0xc692, 0x0083},
{0xcb86, 0x0088},
{0xcb9c, 0x0098},
{0xd6b0, 0x00c0},
{0xd6b1, 0x00c1},
{0xd6b2, 0x00c2},
{0xd6b3, 0x00c3},
{0xd6b4, 0x00c4},
{0xd6b5, 0x00c5},
{0xd6b6, 0x00c6},
{0xd6b7, 0x00c7},
{0xd6b8, 0x00c8},
{0xd6b9, 0x00c9},
{0xd6bb, 0x00cb},
{0xd6bc, 0x00cc},
{0xd6bd, 0x00cd},
{0xd6be, 0x00ce},
{0xd6bf, 0x00cf},
{0xd780, 0x00d0},
{0xd781, 0x00d1},
{0xd782, 0x00d2},
{0xd783, 0x00d3},
{0xd790, 0x00e0},
{0xd791, 0x00e1},
{0xd792, 0x00e2},
{0xd793, 0x00e3},
{0xd794, 0x00e4},
{0xd795, 0x00e5},
{0xd796, 0x00e6},
{0xd797, 0x00e7},
{0xd798, 0x00e8},
{0xd799, 0x00e9},
{0xd79a, 0x00ea},
{0xd79b, 0x00eb},
{0xd79c, 0x00ec},
{0xd79d, 0x00ed},
{0xd79e, 0x00ee},
{0xd79f, 0x00ef},
{0xd7a0, 0x00f0},
{0xd7a1, 0x00f1},
{0xd7a2, 0x00f2},
{0xd7a3, 0x00f3},
{0xd7a4, 0x00f4},
{0xd7a5, 0x00f5},
{0xd7a6, 0x00f6},
{0xd7a7, 0x00f7},
{0xd7a8, 0x00f8},
{0xd7a9, 0x00f9},
{0xd7aa, 0x00fa},
{0xd7b0, 0x00d4},
{0xd7b1, 0x00d5},
{0xd7b2, 0x00d6},
{0xd7b3, 0x00d7},
{0xd7b4, 0x00d8},
{0xe2808e, 0x00fd},
{0xe2808f, 0x00fe},
{0xe28093, 0x0096},
{0xe28094, 0x0097},
{0xe28098, 0x0091},
{0xe28099, 0x0092},
{0xe2809a, 0x0082},
{0xe2809c, 0x0093},
{0xe2809d, 0x0094},
{0xe2809e, 0x0084},
{0xe280a0, 0x0086},
{0xe280a1, 0x0087},
{0xe280a2, 0x0095},
{0xe280a6, 0x0085},
{0xe280b0, 0x0089},
{0xe280b9, 0x008b},
{0xe280ba, 0x009b},
{0xe282aa, 0x00a4},
{0xe282ac, 0x0080},
{0xe284a2, 0x0099}
};

View File

@ -0,0 +1,118 @@
static pg_utf_to_local ULmapWIN1257[ 116 ] = {
{0xc2a0, 0x00a0},
{0xc2a2, 0x00a2},
{0xc2a3, 0x00a3},
{0xc2a4, 0x00a4},
{0xc2a6, 0x00a6},
{0xc2a7, 0x00a7},
{0xc2a8, 0x008d},
{0xc2a9, 0x00a9},
{0xc2ab, 0x00ab},
{0xc2ac, 0x00ac},
{0xc2ad, 0x00ad},
{0xc2ae, 0x00ae},
{0xc2af, 0x009d},
{0xc2b0, 0x00b0},
{0xc2b1, 0x00b1},
{0xc2b2, 0x00b2},
{0xc2b3, 0x00b3},
{0xc2b4, 0x00b4},
{0xc2b5, 0x00b5},
{0xc2b6, 0x00b6},
{0xc2b7, 0x00b7},
{0xc2b8, 0x008f},
{0xc2b9, 0x00b9},
{0xc2bb, 0x00bb},
{0xc2bc, 0x00bc},
{0xc2bd, 0x00bd},
{0xc2be, 0x00be},
{0xc384, 0x00c4},
{0xc385, 0x00c5},
{0xc386, 0x00af},
{0xc389, 0x00c9},
{0xc393, 0x00d3},
{0xc395, 0x00d5},
{0xc396, 0x00d6},
{0xc397, 0x00d7},
{0xc398, 0x00a8},
{0xc39c, 0x00dc},
{0xc39f, 0x00df},
{0xc3a4, 0x00e4},
{0xc3a5, 0x00e5},
{0xc3a6, 0x00bf},
{0xc3a9, 0x00e9},
{0xc3b3, 0x00f3},
{0xc3b5, 0x00f5},
{0xc3b6, 0x00f6},
{0xc3b7, 0x00f7},
{0xc3b8, 0x00b8},
{0xc3bc, 0x00fc},
{0xc480, 0x00c2},
{0xc481, 0x00e2},
{0xc484, 0x00c0},
{0xc485, 0x00e0},
{0xc486, 0x00c3},
{0xc487, 0x00e3},
{0xc48c, 0x00c8},
{0xc48d, 0x00e8},
{0xc492, 0x00c7},
{0xc493, 0x00e7},
{0xc496, 0x00cb},
{0xc497, 0x00eb},
{0xc498, 0x00c6},
{0xc499, 0x00e6},
{0xc4a2, 0x00cc},
{0xc4a3, 0x00ec},
{0xc4aa, 0x00ce},
{0xc4ab, 0x00ee},
{0xc4ae, 0x00c1},
{0xc4af, 0x00e1},
{0xc4b6, 0x00cd},
{0xc4b7, 0x00ed},
{0xc4bb, 0x00cf},
{0xc4bc, 0x00ef},
{0xc581, 0x00d9},
{0xc582, 0x00f9},
{0xc583, 0x00d1},
{0xc584, 0x00f1},
{0xc585, 0x00d2},
{0xc586, 0x00f2},
{0xc58c, 0x00d4},
{0xc58d, 0x00f4},
{0xc596, 0x00aa},
{0xc597, 0x00ba},
{0xc59a, 0x00da},
{0xc59b, 0x00fa},
{0xc5a0, 0x00d0},
{0xc5a1, 0x00f0},
{0xc5aa, 0x00db},
{0xc5ab, 0x00fb},
{0xc5b2, 0x00d8},
{0xc5b3, 0x00f8},
{0xc5b9, 0x00ca},
{0xc5ba, 0x00ea},
{0xc5bb, 0x00dd},
{0xc5bc, 0x00fd},
{0xc5bd, 0x00de},
{0xc5be, 0x00fe},
{0xcb87, 0x008e},
{0xcb99, 0x00ff},
{0xcb9b, 0x009e},
{0xe28093, 0x0096},
{0xe28094, 0x0097},
{0xe28098, 0x0091},
{0xe28099, 0x0092},
{0xe2809a, 0x0082},
{0xe2809c, 0x0093},
{0xe2809d, 0x0094},
{0xe2809e, 0x0084},
{0xe280a0, 0x0086},
{0xe280a1, 0x0087},
{0xe280a2, 0x0095},
{0xe280a6, 0x0085},
{0xe280b0, 0x0089},
{0xe280b9, 0x008b},
{0xe280ba, 0x009b},
{0xe282ac, 0x0080},
{0xe284a2, 0x0099}
};

View File

@ -1,5 +1,4 @@
static pg_utf_to_local ULmapWIN1258[ 120 ] = {
{0x0000, 0x0081},
static pg_utf_to_local ULmapWIN1258[ 119 ] = {
{0xc2a0, 0x00a0},
{0xc2a1, 0x00a1},
{0xc2a2, 0x00a2},

View File

@ -1,4 +1,4 @@
static pg_utf_to_local ULmap_WIN866[ 128 ] = {
static pg_utf_to_local ULmapWIN866[ 128 ] = {
{0xc2a0, 0x00ff},
{0xc2a4, 0x00fd},
{0xc2b0, 0x00f8},

View File

@ -1,5 +1,4 @@
static pg_utf_to_local ULmapWIN874[ 98 ] = {
{0x0000, 0x0081},
static pg_utf_to_local ULmapWIN874[ 97 ] = {
{0xc2a0, 0x00a0},
{0xe0b881, 0x00a1},
{0xe0b882, 0x00a2},

View File

@ -1,13 +1,10 @@
static pg_local_to_utf LUmapWIN1250[ 128 ] = {
static pg_local_to_utf LUmapWIN1250[ 123 ] = {
{0x0080, 0xe282ac},
{0x0081, 0x0000},
{0x0082, 0xe2809a},
{0x0083, 0x0000},
{0x0084, 0xe2809e},
{0x0085, 0xe280a6},
{0x0086, 0xe280a0},
{0x0087, 0xe280a1},
{0x0088, 0x0000},
{0x0089, 0xe280b0},
{0x008a, 0xc5a0},
{0x008b, 0xe280b9},
@ -15,7 +12,6 @@ static pg_local_to_utf LUmapWIN1250[ 128 ] = {
{0x008d, 0xc5a4},
{0x008e, 0xc5bd},
{0x008f, 0xc5b9},
{0x0090, 0x0000},
{0x0091, 0xe28098},
{0x0092, 0xe28099},
{0x0093, 0xe2809c},
@ -23,7 +19,6 @@ static pg_local_to_utf LUmapWIN1250[ 128 ] = {
{0x0095, 0xe280a2},
{0x0096, 0xe28093},
{0x0097, 0xe28094},
{0x0098, 0x0000},
{0x0099, 0xe284a2},
{0x009a, 0xc5a1},
{0x009b, 0xe280ba},

View File

@ -1,4 +1,4 @@
static pg_local_to_utf LUmapWIN1251[ 128 ] = {
static pg_local_to_utf LUmapWIN1251[ 127 ] = {
{0x0080, 0xd082},
{0x0081, 0xd083},
{0x0082, 0xe2809a},
@ -7,7 +7,7 @@ static pg_local_to_utf LUmapWIN1251[ 128 ] = {
{0x0085, 0xe280a6},
{0x0086, 0xe280a0},
{0x0087, 0xe280a1},
{0x0088, 0x0000},
{0x0088, 0xe282ac},
{0x0089, 0xe280b0},
{0x008a, 0xd089},
{0x008b, 0xe280b9},
@ -23,7 +23,6 @@ static pg_local_to_utf LUmapWIN1251[ 128 ] = {
{0x0095, 0xe280a2},
{0x0096, 0xe28093},
{0x0097, 0xe28094},
{0x0098, 0x0000},
{0x0099, 0xe284a2},
{0x009a, 0xd199},
{0x009b, 0xe280ba},

View File

@ -1,6 +1,5 @@
static pg_local_to_utf LUmapWIN1252[ 128 ] = {
static pg_local_to_utf LUmapWIN1252[ 123 ] = {
{0x0080, 0xe282ac},
{0x0081, 0x0000},
{0x0082, 0xe2809a},
{0x0083, 0xc692},
{0x0084, 0xe2809e},
@ -12,10 +11,7 @@ static pg_local_to_utf LUmapWIN1252[ 128 ] = {
{0x008a, 0xc5a0},
{0x008b, 0xe280b9},
{0x008c, 0xc592},
{0x008d, 0x0000},
{0x008e, 0xc5bd},
{0x008f, 0x0000},
{0x0090, 0x0000},
{0x0091, 0xe28098},
{0x0092, 0xe28099},
{0x0093, 0xe2809c},
@ -28,7 +24,6 @@ static pg_local_to_utf LUmapWIN1252[ 128 ] = {
{0x009a, 0xc5a1},
{0x009b, 0xe280ba},
{0x009c, 0xc593},
{0x009d, 0x0000},
{0x009e, 0xc5be},
{0x009f, 0xc5b8},
{0x00a0, 0xc2a0},

View File

@ -0,0 +1,113 @@
static pg_local_to_utf LUmapWIN1253[ 111 ] = {
{0x0080, 0xe282ac},
{0x0082, 0xe2809a},
{0x0083, 0xc692},
{0x0084, 0xe2809e},
{0x0085, 0xe280a6},
{0x0086, 0xe280a0},
{0x0087, 0xe280a1},
{0x0089, 0xe280b0},
{0x008b, 0xe280b9},
{0x0091, 0xe28098},
{0x0092, 0xe28099},
{0x0093, 0xe2809c},
{0x0094, 0xe2809d},
{0x0095, 0xe280a2},
{0x0096, 0xe28093},
{0x0097, 0xe28094},
{0x0099, 0xe284a2},
{0x009b, 0xe280ba},
{0x00a0, 0xc2a0},
{0x00a1, 0xce85},
{0x00a2, 0xce86},
{0x00a3, 0xc2a3},
{0x00a4, 0xc2a4},
{0x00a5, 0xc2a5},
{0x00a6, 0xc2a6},
{0x00a7, 0xc2a7},
{0x00a8, 0xc2a8},
{0x00a9, 0xc2a9},
{0x00ab, 0xc2ab},
{0x00ac, 0xc2ac},
{0x00ad, 0xc2ad},
{0x00ae, 0xc2ae},
{0x00af, 0xe28095},
{0x00b0, 0xc2b0},
{0x00b1, 0xc2b1},
{0x00b2, 0xc2b2},
{0x00b3, 0xc2b3},
{0x00b4, 0xce84},
{0x00b5, 0xc2b5},
{0x00b6, 0xc2b6},
{0x00b7, 0xc2b7},
{0x00b8, 0xce88},
{0x00b9, 0xce89},
{0x00ba, 0xce8a},
{0x00bb, 0xc2bb},
{0x00bc, 0xce8c},
{0x00bd, 0xc2bd},
{0x00be, 0xce8e},
{0x00bf, 0xce8f},
{0x00c0, 0xce90},
{0x00c1, 0xce91},
{0x00c2, 0xce92},
{0x00c3, 0xce93},
{0x00c4, 0xce94},
{0x00c5, 0xce95},
{0x00c6, 0xce96},
{0x00c7, 0xce97},
{0x00c8, 0xce98},
{0x00c9, 0xce99},
{0x00ca, 0xce9a},
{0x00cb, 0xce9b},
{0x00cc, 0xce9c},
{0x00cd, 0xce9d},
{0x00ce, 0xce9e},
{0x00cf, 0xce9f},
{0x00d0, 0xcea0},
{0x00d1, 0xcea1},
{0x00d3, 0xcea3},
{0x00d4, 0xcea4},
{0x00d5, 0xcea5},
{0x00d6, 0xcea6},
{0x00d7, 0xcea7},
{0x00d8, 0xcea8},
{0x00d9, 0xcea9},
{0x00da, 0xceaa},
{0x00db, 0xceab},
{0x00dc, 0xceac},
{0x00dd, 0xcead},
{0x00de, 0xceae},
{0x00df, 0xceaf},
{0x00e0, 0xceb0},
{0x00e1, 0xceb1},
{0x00e2, 0xceb2},
{0x00e3, 0xceb3},
{0x00e4, 0xceb4},
{0x00e5, 0xceb5},
{0x00e6, 0xceb6},
{0x00e7, 0xceb7},
{0x00e8, 0xceb8},
{0x00e9, 0xceb9},
{0x00ea, 0xceba},
{0x00eb, 0xcebb},
{0x00ec, 0xcebc},
{0x00ed, 0xcebd},
{0x00ee, 0xcebe},
{0x00ef, 0xcebf},
{0x00f0, 0xcf80},
{0x00f1, 0xcf81},
{0x00f2, 0xcf82},
{0x00f3, 0xcf83},
{0x00f4, 0xcf84},
{0x00f5, 0xcf85},
{0x00f6, 0xcf86},
{0x00f7, 0xcf87},
{0x00f8, 0xcf88},
{0x00f9, 0xcf89},
{0x00fa, 0xcf8a},
{0x00fb, 0xcf8b},
{0x00fc, 0xcf8c},
{0x00fd, 0xcf8d},
{0x00fe, 0xcf8e}
};

View File

@ -0,0 +1,123 @@
static pg_local_to_utf LUmapWIN1254[ 121 ] = {
{0x0080, 0xe282ac},
{0x0082, 0xe2809a},
{0x0083, 0xc692},
{0x0084, 0xe2809e},
{0x0085, 0xe280a6},
{0x0086, 0xe280a0},
{0x0087, 0xe280a1},
{0x0088, 0xcb86},
{0x0089, 0xe280b0},
{0x008a, 0xc5a0},
{0x008b, 0xe280b9},
{0x008c, 0xc592},
{0x0091, 0xe28098},
{0x0092, 0xe28099},
{0x0093, 0xe2809c},
{0x0094, 0xe2809d},
{0x0095, 0xe280a2},
{0x0096, 0xe28093},
{0x0097, 0xe28094},
{0x0098, 0xcb9c},
{0x0099, 0xe284a2},
{0x009a, 0xc5a1},
{0x009b, 0xe280ba},
{0x009c, 0xc593},
{0x009f, 0xc5b8},
{0x00a0, 0xc2a0},
{0x00a1, 0xc2a1},
{0x00a2, 0xc2a2},
{0x00a3, 0xc2a3},
{0x00a4, 0xc2a4},
{0x00a5, 0xc2a5},
{0x00a6, 0xc2a6},
{0x00a7, 0xc2a7},
{0x00a8, 0xc2a8},
{0x00a9, 0xc2a9},
{0x00aa, 0xc2aa},
{0x00ab, 0xc2ab},
{0x00ac, 0xc2ac},
{0x00ad, 0xc2ad},
{0x00ae, 0xc2ae},
{0x00af, 0xc2af},
{0x00b0, 0xc2b0},
{0x00b1, 0xc2b1},
{0x00b2, 0xc2b2},
{0x00b3, 0xc2b3},
{0x00b4, 0xc2b4},
{0x00b5, 0xc2b5},
{0x00b6, 0xc2b6},
{0x00b7, 0xc2b7},
{0x00b8, 0xc2b8},
{0x00b9, 0xc2b9},
{0x00ba, 0xc2ba},
{0x00bb, 0xc2bb},
{0x00bc, 0xc2bc},
{0x00bd, 0xc2bd},
{0x00be, 0xc2be},
{0x00bf, 0xc2bf},
{0x00c0, 0xc380},
{0x00c1, 0xc381},
{0x00c2, 0xc382},
{0x00c3, 0xc383},
{0x00c4, 0xc384},
{0x00c5, 0xc385},
{0x00c6, 0xc386},
{0x00c7, 0xc387},
{0x00c8, 0xc388},
{0x00c9, 0xc389},
{0x00ca, 0xc38a},
{0x00cb, 0xc38b},
{0x00cc, 0xc38c},
{0x00cd, 0xc38d},
{0x00ce, 0xc38e},
{0x00cf, 0xc38f},
{0x00d0, 0xc49e},
{0x00d1, 0xc391},
{0x00d2, 0xc392},
{0x00d3, 0xc393},
{0x00d4, 0xc394},
{0x00d5, 0xc395},
{0x00d6, 0xc396},
{0x00d7, 0xc397},
{0x00d8, 0xc398},
{0x00d9, 0xc399},
{0x00da, 0xc39a},
{0x00db, 0xc39b},
{0x00dc, 0xc39c},
{0x00dd, 0xc4b0},
{0x00de, 0xc59e},
{0x00df, 0xc39f},
{0x00e0, 0xc3a0},
{0x00e1, 0xc3a1},
{0x00e2, 0xc3a2},
{0x00e3, 0xc3a3},
{0x00e4, 0xc3a4},
{0x00e5, 0xc3a5},
{0x00e6, 0xc3a6},
{0x00e7, 0xc3a7},
{0x00e8, 0xc3a8},
{0x00e9, 0xc3a9},
{0x00ea, 0xc3aa},
{0x00eb, 0xc3ab},
{0x00ec, 0xc3ac},
{0x00ed, 0xc3ad},
{0x00ee, 0xc3ae},
{0x00ef, 0xc3af},
{0x00f0, 0xc49f},
{0x00f1, 0xc3b1},
{0x00f2, 0xc3b2},
{0x00f3, 0xc3b3},
{0x00f4, 0xc3b4},
{0x00f5, 0xc3b5},
{0x00f6, 0xc3b6},
{0x00f7, 0xc3b7},
{0x00f8, 0xc3b8},
{0x00f9, 0xc3b9},
{0x00fa, 0xc3ba},
{0x00fb, 0xc3bb},
{0x00fc, 0xc3bc},
{0x00fd, 0xc4b1},
{0x00fe, 0xc59f},
{0x00ff, 0xc3bf}
};

View File

@ -0,0 +1,107 @@
static pg_local_to_utf LUmapWIN1255[ 105 ] = {
{0x0080, 0xe282ac},
{0x0082, 0xe2809a},
{0x0083, 0xc692},
{0x0084, 0xe2809e},
{0x0085, 0xe280a6},
{0x0086, 0xe280a0},
{0x0087, 0xe280a1},
{0x0088, 0xcb86},
{0x0089, 0xe280b0},
{0x008b, 0xe280b9},
{0x0091, 0xe28098},
{0x0092, 0xe28099},
{0x0093, 0xe2809c},
{0x0094, 0xe2809d},
{0x0095, 0xe280a2},
{0x0096, 0xe28093},
{0x0097, 0xe28094},
{0x0098, 0xcb9c},
{0x0099, 0xe284a2},
{0x009b, 0xe280ba},
{0x00a0, 0xc2a0},
{0x00a1, 0xc2a1},
{0x00a2, 0xc2a2},
{0x00a3, 0xc2a3},
{0x00a4, 0xe282aa},
{0x00a5, 0xc2a5},
{0x00a6, 0xc2a6},
{0x00a7, 0xc2a7},
{0x00a8, 0xc2a8},
{0x00a9, 0xc2a9},
{0x00aa, 0xc397},
{0x00ab, 0xc2ab},
{0x00ac, 0xc2ac},
{0x00ad, 0xc2ad},
{0x00ae, 0xc2ae},
{0x00af, 0xc2af},
{0x00b0, 0xc2b0},
{0x00b1, 0xc2b1},
{0x00b2, 0xc2b2},
{0x00b3, 0xc2b3},
{0x00b4, 0xc2b4},
{0x00b5, 0xc2b5},
{0x00b6, 0xc2b6},
{0x00b7, 0xc2b7},
{0x00b8, 0xc2b8},
{0x00b9, 0xc2b9},
{0x00ba, 0xc3b7},
{0x00bb, 0xc2bb},
{0x00bc, 0xc2bc},
{0x00bd, 0xc2bd},
{0x00be, 0xc2be},
{0x00bf, 0xc2bf},
{0x00c0, 0xd6b0},
{0x00c1, 0xd6b1},
{0x00c2, 0xd6b2},
{0x00c3, 0xd6b3},
{0x00c4, 0xd6b4},
{0x00c5, 0xd6b5},
{0x00c6, 0xd6b6},
{0x00c7, 0xd6b7},
{0x00c8, 0xd6b8},
{0x00c9, 0xd6b9},
{0x00cb, 0xd6bb},
{0x00cc, 0xd6bc},
{0x00cd, 0xd6bd},
{0x00ce, 0xd6be},
{0x00cf, 0xd6bf},
{0x00d0, 0xd780},
{0x00d1, 0xd781},
{0x00d2, 0xd782},
{0x00d3, 0xd783},
{0x00d4, 0xd7b0},
{0x00d5, 0xd7b1},
{0x00d6, 0xd7b2},
{0x00d7, 0xd7b3},
{0x00d8, 0xd7b4},
{0x00e0, 0xd790},
{0x00e1, 0xd791},
{0x00e2, 0xd792},
{0x00e3, 0xd793},
{0x00e4, 0xd794},
{0x00e5, 0xd795},
{0x00e6, 0xd796},
{0x00e7, 0xd797},
{0x00e8, 0xd798},
{0x00e9, 0xd799},
{0x00ea, 0xd79a},
{0x00eb, 0xd79b},
{0x00ec, 0xd79c},
{0x00ed, 0xd79d},
{0x00ee, 0xd79e},
{0x00ef, 0xd79f},
{0x00f0, 0xd7a0},
{0x00f1, 0xd7a1},
{0x00f2, 0xd7a2},
{0x00f3, 0xd7a3},
{0x00f4, 0xd7a4},
{0x00f5, 0xd7a5},
{0x00f6, 0xd7a6},
{0x00f7, 0xd7a7},
{0x00f8, 0xd7a8},
{0x00f9, 0xd7a9},
{0x00fa, 0xd7aa},
{0x00fd, 0xe2808e},
{0x00fe, 0xe2808f}
};

View File

@ -0,0 +1,118 @@
static pg_local_to_utf LUmapWIN1257[ 116 ] = {
{0x0080, 0xe282ac},
{0x0082, 0xe2809a},
{0x0084, 0xe2809e},
{0x0085, 0xe280a6},
{0x0086, 0xe280a0},
{0x0087, 0xe280a1},
{0x0089, 0xe280b0},
{0x008b, 0xe280b9},
{0x008d, 0xc2a8},
{0x008e, 0xcb87},
{0x008f, 0xc2b8},
{0x0091, 0xe28098},
{0x0092, 0xe28099},
{0x0093, 0xe2809c},
{0x0094, 0xe2809d},
{0x0095, 0xe280a2},
{0x0096, 0xe28093},
{0x0097, 0xe28094},
{0x0099, 0xe284a2},
{0x009b, 0xe280ba},
{0x009d, 0xc2af},
{0x009e, 0xcb9b},
{0x00a0, 0xc2a0},
{0x00a2, 0xc2a2},
{0x00a3, 0xc2a3},
{0x00a4, 0xc2a4},
{0x00a6, 0xc2a6},
{0x00a7, 0xc2a7},
{0x00a8, 0xc398},
{0x00a9, 0xc2a9},
{0x00aa, 0xc596},
{0x00ab, 0xc2ab},
{0x00ac, 0xc2ac},
{0x00ad, 0xc2ad},
{0x00ae, 0xc2ae},
{0x00af, 0xc386},
{0x00b0, 0xc2b0},
{0x00b1, 0xc2b1},
{0x00b2, 0xc2b2},
{0x00b3, 0xc2b3},
{0x00b4, 0xc2b4},
{0x00b5, 0xc2b5},
{0x00b6, 0xc2b6},
{0x00b7, 0xc2b7},
{0x00b8, 0xc3b8},
{0x00b9, 0xc2b9},
{0x00ba, 0xc597},
{0x00bb, 0xc2bb},
{0x00bc, 0xc2bc},
{0x00bd, 0xc2bd},
{0x00be, 0xc2be},
{0x00bf, 0xc3a6},
{0x00c0, 0xc484},
{0x00c1, 0xc4ae},
{0x00c2, 0xc480},
{0x00c3, 0xc486},
{0x00c4, 0xc384},
{0x00c5, 0xc385},
{0x00c6, 0xc498},
{0x00c7, 0xc492},
{0x00c8, 0xc48c},
{0x00c9, 0xc389},
{0x00ca, 0xc5b9},
{0x00cb, 0xc496},
{0x00cc, 0xc4a2},
{0x00cd, 0xc4b6},
{0x00ce, 0xc4aa},
{0x00cf, 0xc4bb},
{0x00d0, 0xc5a0},
{0x00d1, 0xc583},
{0x00d2, 0xc585},
{0x00d3, 0xc393},
{0x00d4, 0xc58c},
{0x00d5, 0xc395},
{0x00d6, 0xc396},
{0x00d7, 0xc397},
{0x00d8, 0xc5b2},
{0x00d9, 0xc581},
{0x00da, 0xc59a},
{0x00db, 0xc5aa},
{0x00dc, 0xc39c},
{0x00dd, 0xc5bb},
{0x00de, 0xc5bd},
{0x00df, 0xc39f},
{0x00e0, 0xc485},
{0x00e1, 0xc4af},
{0x00e2, 0xc481},
{0x00e3, 0xc487},
{0x00e4, 0xc3a4},
{0x00e5, 0xc3a5},
{0x00e6, 0xc499},
{0x00e7, 0xc493},
{0x00e8, 0xc48d},
{0x00e9, 0xc3a9},
{0x00ea, 0xc5ba},
{0x00eb, 0xc497},
{0x00ec, 0xc4a3},
{0x00ed, 0xc4b7},
{0x00ee, 0xc4ab},
{0x00ef, 0xc4bc},
{0x00f0, 0xc5a1},
{0x00f1, 0xc584},
{0x00f2, 0xc586},
{0x00f3, 0xc3b3},
{0x00f4, 0xc58d},
{0x00f5, 0xc3b5},
{0x00f6, 0xc3b6},
{0x00f7, 0xc3b7},
{0x00f8, 0xc5b3},
{0x00f9, 0xc582},
{0x00fa, 0xc59b},
{0x00fb, 0xc5ab},
{0x00fc, 0xc3bc},
{0x00fd, 0xc5bc},
{0x00fe, 0xc5be},
{0x00ff, 0xcb99}
};

View File

@ -1,6 +1,5 @@
static pg_local_to_utf LUmapWIN1258[ 128 ] = {
static pg_local_to_utf LUmapWIN1258[ 119 ] = {
{0x0080, 0xe282ac},
{0x0081, 0x0000},
{0x0082, 0xe2809a},
{0x0083, 0xc692},
{0x0084, 0xe2809e},
@ -9,13 +8,8 @@ static pg_local_to_utf LUmapWIN1258[ 128 ] = {
{0x0087, 0xe280a1},
{0x0088, 0xcb86},
{0x0089, 0xe280b0},
{0x008a, 0x0000},
{0x008b, 0xe280b9},
{0x008c, 0xc592},
{0x008d, 0x0000},
{0x008e, 0x0000},
{0x008f, 0x0000},
{0x0090, 0x0000},
{0x0091, 0xe28098},
{0x0092, 0xe28099},
{0x0093, 0xe2809c},
@ -25,11 +19,8 @@ static pg_local_to_utf LUmapWIN1258[ 128 ] = {
{0x0097, 0xe28094},
{0x0098, 0xcb9c},
{0x0099, 0xe284a2},
{0x009a, 0x0000},
{0x009b, 0xe280ba},
{0x009c, 0xc593},
{0x009d, 0x0000},
{0x009e, 0x0000},
{0x009f, 0xc5b8},
{0x00a0, 0xc2a0},
{0x00a1, 0xc2a1},

View File

@ -1,21 +1,6 @@
static pg_local_to_utf LUmapWIN874[ 128 ] = {
static pg_local_to_utf LUmapWIN874[ 97 ] = {
{0x0080, 0xe282ac},
{0x0081, 0x0000},
{0x0082, 0x0000},
{0x0083, 0x0000},
{0x0084, 0x0000},
{0x0085, 0xe280a6},
{0x0086, 0x0000},
{0x0087, 0x0000},
{0x0088, 0x0000},
{0x0089, 0x0000},
{0x008a, 0x0000},
{0x008b, 0x0000},
{0x008c, 0x0000},
{0x008d, 0x0000},
{0x008e, 0x0000},
{0x008f, 0x0000},
{0x0090, 0x0000},
{0x0091, 0xe28098},
{0x0092, 0xe28099},
{0x0093, 0xe2809c},
@ -23,14 +8,6 @@ static pg_local_to_utf LUmapWIN874[ 128 ] = {
{0x0095, 0xe280a2},
{0x0096, 0xe28093},
{0x0097, 0xe28094},
{0x0098, 0x0000},
{0x0099, 0x0000},
{0x009a, 0x0000},
{0x009b, 0x0000},
{0x009c, 0x0000},
{0x009d, 0x0000},
{0x009e, 0x0000},
{0x009f, 0x0000},
{0x00a0, 0xc2a0},
{0x00a1, 0xe0b881},
{0x00a2, 0xe0b882},
@ -90,10 +67,6 @@ static pg_local_to_utf LUmapWIN874[ 128 ] = {
{0x00d8, 0xe0b8b8},
{0x00d9, 0xe0b8b9},
{0x00da, 0xe0b8ba},
{0x00db, 0x0000},
{0x00dc, 0x0000},
{0x00dd, 0x0000},
{0x00de, 0x0000},
{0x00df, 0xe0b8bf},
{0x00e0, 0xe0b980},
{0x00e1, 0xe0b981},
@ -122,9 +95,5 @@ static pg_local_to_utf LUmapWIN874[ 128 ] = {
{0x00f8, 0xe0b998},
{0x00f9, 0xe0b999},
{0x00fa, 0xe0b99a},
{0x00fb, 0xe0b99b},
{0x00fc, 0x0000},
{0x00fd, 0x0000},
{0x00fe, 0x0000},
{0x00ff, 0x0000}
{0x00fb, 0xe0b99b}
};