mirror of
https://github.com/postgres/postgres.git
synced 2025-07-07 00:36:50 +03:00
Rename canonical encodings, per Peter:
UNICODE => UTF8 ALT => WIN866 WIN => WIN1251 TCVN => WIN1258 The old codes continue to work.
This commit is contained in:
@ -4,7 +4,7 @@
|
||||
#
|
||||
# Copyright (c) 2001-2005, PostgreSQL Global Development Group
|
||||
#
|
||||
# $PostgreSQL: pgsql/src/backend/utils/mb/Unicode/Makefile,v 1.8 2005/01/01 20:44:18 tgl Exp $
|
||||
# $PostgreSQL: pgsql/src/backend/utils/mb/Unicode/Makefile,v 1.9 2005/03/07 04:30:52 momjian Exp $
|
||||
#
|
||||
#-------------------------------------------------------------------------
|
||||
|
||||
@ -18,8 +18,8 @@ ISO8859MAPS=iso8859_2_to_utf8.map iso8859_3_to_utf8.map \
|
||||
utf8_to_iso8859_4.map utf8_to_iso8859_5.map
|
||||
|
||||
|
||||
CYRILLICMAPS=koi8r_to_utf8.map win1251_to_utf8.map alt_to_utf8.map\
|
||||
utf8_to_koi8r.map utf8_to_win1251.map utf8_to_alt.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
|
||||
|
||||
MAPS= $(ISO8859MAPS) $(CYRILLICMAPS)\
|
||||
big5_to_utf8.map euc_cn_to_utf8.map euc_jp_to_utf8.map \
|
||||
|
@ -2,7 +2,7 @@
|
||||
#
|
||||
# Copyright (c) 2001-2005, PostgreSQL Global Development Group
|
||||
#
|
||||
# $PostgreSQL: pgsql/src/backend/utils/mb/Unicode/UCS_to_8859.pl,v 1.7 2005/01/01 20:44:18 tgl Exp $
|
||||
# $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.
|
||||
@ -39,7 +39,7 @@ foreach $charset (@charsets) {
|
||||
if( $code >= 0x80){
|
||||
$utf = &ucs2utf($ucs);
|
||||
if( $array{ $utf } ne "" ){
|
||||
printf STDERR "Warning: duplicate unicode: %04x\n",$ucs;
|
||||
printf STDERR "Warning: duplicate UTF8: %04x\n",$ucs;
|
||||
next;
|
||||
}
|
||||
$count++;
|
||||
@ -83,7 +83,7 @@ foreach $charset (@charsets) {
|
||||
if($code >= 0x80){
|
||||
$utf = &ucs2utf($ucs);
|
||||
if( $array{ $utf } ne "" ){
|
||||
printf STDERR "Warning: duplicate unicode: %04x\n",$ucs;
|
||||
printf STDERR "Warning: duplicate UTF8: %04x\n",$ucs;
|
||||
next;
|
||||
}
|
||||
$count++;
|
||||
|
@ -2,7 +2,7 @@
|
||||
#
|
||||
# Copyright (c) 2001-2005, PostgreSQL Global Development Group
|
||||
#
|
||||
# $PostgreSQL: pgsql/src/backend/utils/mb/Unicode/UCS_to_BIG5.pl,v 1.6 2005/01/01 20:44:18 tgl Exp $
|
||||
# $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.
|
||||
@ -35,7 +35,7 @@ while( <FILE> ){
|
||||
if( $code >= 0x80 && $ucs >= 0x0080 ){
|
||||
$utf = &ucs2utf($ucs);
|
||||
if( $array{ $utf } ne "" ){
|
||||
printf STDERR "Warning: duplicate unicode: %04x\n",$ucs;
|
||||
printf STDERR "Warning: duplicate UTF8: %04x\n",$ucs;
|
||||
next;
|
||||
}
|
||||
$count++;
|
||||
|
@ -2,7 +2,7 @@
|
||||
#
|
||||
# Copyright (c) 2001-2005, PostgreSQL Global Development Group
|
||||
#
|
||||
# $PostgreSQL: pgsql/src/backend/utils/mb/Unicode/UCS_to_EUC_CN.pl,v 1.6 2005/01/01 20:44:18 tgl Exp $
|
||||
# $PostgreSQL: pgsql/src/backend/utils/mb/Unicode/UCS_to_EUC_CN.pl,v 1.7 2005/03/07 04:30:52 momjian Exp $
|
||||
#
|
||||
# Generate UTF-8 <--> EUC_CN code conversion tables from
|
||||
# map files provided by Unicode organization.
|
||||
@ -35,7 +35,7 @@ while( <FILE> ){
|
||||
if( $code >= 0x80 && $ucs >= 0x0080 ){
|
||||
$utf = &ucs2utf($ucs);
|
||||
if( $array{ $utf } ne "" ){
|
||||
printf STDERR "Warning: duplicate unicode: %04x\n",$ucs;
|
||||
printf STDERR "Warning: duplicate UTF8: %04x\n",$ucs;
|
||||
next;
|
||||
}
|
||||
$count++;
|
||||
|
@ -2,7 +2,7 @@
|
||||
#
|
||||
# Copyright (c) 2001-2005, PostgreSQL Global Development Group
|
||||
#
|
||||
# $PostgreSQL: pgsql/src/backend/utils/mb/Unicode/UCS_to_EUC_JP.pl,v 1.6 2005/01/01 20:44:18 tgl Exp $
|
||||
# $PostgreSQL: pgsql/src/backend/utils/mb/Unicode/UCS_to_EUC_JP.pl,v 1.7 2005/03/07 04:30:52 momjian Exp $
|
||||
#
|
||||
# Generate UTF-8 <--> EUC_JP code conversion tables from
|
||||
# map files provided by Unicode organization.
|
||||
@ -51,7 +51,7 @@ while( <FILE> ){
|
||||
if( $code >= 0x80 && $ucs >= 0x0080 ){
|
||||
$utf = &ucs2utf($ucs);
|
||||
if( $array{ $utf } ne "" ){
|
||||
printf STDERR "Warning: duplicate unicode: %04x\n",$ucs;
|
||||
printf STDERR "Warning: duplicate UTF8: %04x\n",$ucs;
|
||||
next;
|
||||
}
|
||||
$count++;
|
||||
@ -80,7 +80,7 @@ while( <FILE> ){
|
||||
if( $code >= 0x80 && $ucs >= 0x0080 ){
|
||||
$utf = &ucs2utf($ucs);
|
||||
if( $array{ $utf } ne "" ){
|
||||
printf STDERR "Warning: duplicate unicode: %04x\n",$ucs;
|
||||
printf STDERR "Warning: duplicate UTF8: %04x\n",$ucs;
|
||||
next;
|
||||
}
|
||||
$count++;
|
||||
@ -108,7 +108,7 @@ while( <FILE> ){
|
||||
if( $code >= 0x80 && $ucs >= 0x0080 ){
|
||||
$utf = &ucs2utf($ucs);
|
||||
if( $array{ $utf } ne "" ){
|
||||
printf STDERR "Warning: duplicate unicode: %04x\n",$ucs;
|
||||
printf STDERR "Warning: duplicate UTF8: %04x\n",$ucs;
|
||||
next;
|
||||
}
|
||||
$count++;
|
||||
|
@ -2,7 +2,7 @@
|
||||
#
|
||||
# Copyright (c) 2001-2005, PostgreSQL Global Development Group
|
||||
#
|
||||
# $PostgreSQL: pgsql/src/backend/utils/mb/Unicode/UCS_to_EUC_KR.pl,v 1.7 2005/01/01 20:44:18 tgl Exp $
|
||||
# $PostgreSQL: pgsql/src/backend/utils/mb/Unicode/UCS_to_EUC_KR.pl,v 1.8 2005/03/07 04:30:52 momjian Exp $
|
||||
#
|
||||
# Generate UTF-8 <--> EUC_KR code conversion tables from
|
||||
# map files provided by Unicode organization.
|
||||
@ -35,7 +35,7 @@ while( <FILE> ){
|
||||
if( $code >= 0x80 && $ucs >= 0x0080 ){
|
||||
$utf = &ucs2utf($ucs);
|
||||
if( $array{ $utf } ne "" ){
|
||||
printf STDERR "Warning: duplicate unicode: %04x\n",$ucs;
|
||||
printf STDERR "Warning: duplicate UTF8: %04x\n",$ucs;
|
||||
next;
|
||||
}
|
||||
$count++;
|
||||
|
@ -2,7 +2,7 @@
|
||||
#
|
||||
# Copyright (c) 2001-2005, PostgreSQL Global Development Group
|
||||
#
|
||||
# $PostgreSQL: pgsql/src/backend/utils/mb/Unicode/UCS_to_EUC_TW.pl,v 1.6 2005/01/01 20:44:18 tgl Exp $
|
||||
# $PostgreSQL: pgsql/src/backend/utils/mb/Unicode/UCS_to_EUC_TW.pl,v 1.7 2005/03/07 04:30:52 momjian Exp $
|
||||
#
|
||||
# Generate UTF-8 <--> EUC_TW code conversion tables from
|
||||
# map files provided by Unicode organization.
|
||||
@ -36,7 +36,7 @@ while( <FILE> ){
|
||||
if( $code >= 0x80 && $ucs >= 0x0080 ){
|
||||
$utf = &ucs2utf($ucs);
|
||||
if( $array{ $utf } ne "" ){
|
||||
printf STDERR "Warning: duplicate unicode: %04x\n",$ucs;
|
||||
printf STDERR "Warning: duplicate UTF8: %04x\n",$ucs;
|
||||
next;
|
||||
}
|
||||
$count++;
|
||||
|
@ -2,7 +2,7 @@
|
||||
#
|
||||
# Copyright 2002 by Bill Huang
|
||||
#
|
||||
# $PostgreSQL: pgsql/src/backend/utils/mb/Unicode/UCS_to_GB18030.pl,v 1.4 2003/11/29 22:40:01 pgsql Exp $
|
||||
# $PostgreSQL: pgsql/src/backend/utils/mb/Unicode/UCS_to_GB18030.pl,v 1.5 2005/03/07 04:30:52 momjian Exp $
|
||||
#
|
||||
# Generate UTF-8 <--> GB18030 code conversion tables from
|
||||
# map files provided by Unicode organization.
|
||||
@ -35,7 +35,7 @@ while( <FILE> ){
|
||||
if( $code >= 0x80 && $ucs >= 0x0080 ){
|
||||
$utf = &ucs2utf($ucs);
|
||||
if( $array{ $utf } ne "" ){
|
||||
printf STDERR "Warning: duplicate unicode: %04x\n",$ucs;
|
||||
printf STDERR "Warning: duplicate UTF8: %04x\n",$ucs;
|
||||
next;
|
||||
}
|
||||
$count++;
|
||||
|
@ -2,7 +2,7 @@
|
||||
#
|
||||
# Copyright (c) 2001-2005, PostgreSQL Global Development Group
|
||||
#
|
||||
# $PostgreSQL: pgsql/src/backend/utils/mb/Unicode/UCS_to_GBK.pl,v 1.5 2005/01/01 20:44:18 tgl Exp $
|
||||
# $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
|
||||
@ -36,7 +36,7 @@ while( <FILE> ){
|
||||
if( $code >= 0x80 && $ucs >= 0x0080 ){
|
||||
$utf = &ucs2utf($ucs);
|
||||
if( $array{ $utf } ne "" ){
|
||||
printf STDERR "Warning: duplicate unicode: %04x\n",$ucs;
|
||||
printf STDERR "Warning: duplicate UTF8: %04x\n",$ucs;
|
||||
next;
|
||||
}
|
||||
$count++;
|
||||
|
@ -2,7 +2,7 @@
|
||||
#
|
||||
# Copyright (c) 2001-2005, PostgreSQL Global Development Group
|
||||
#
|
||||
# $PostgreSQL: pgsql/src/backend/utils/mb/Unicode/UCS_to_JOHAB.pl,v 1.5 2005/01/01 20:44:18 tgl Exp $
|
||||
# $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.
|
||||
@ -35,7 +35,7 @@ while( <FILE> ){
|
||||
if( $code >= 0x80 && $ucs >= 0x0080 ){
|
||||
$utf = &ucs2utf($ucs);
|
||||
if( $array{ $utf } ne "" ){
|
||||
printf STDERR "Warning: duplicate unicode: %04x\n",$ucs;
|
||||
printf STDERR "Warning: duplicate UTF8: %04x\n",$ucs;
|
||||
next;
|
||||
}
|
||||
$count++;
|
||||
|
@ -2,7 +2,7 @@
|
||||
#
|
||||
# Copyright (c) 2001-2005, PostgreSQL Global Development Group
|
||||
#
|
||||
# $PostgreSQL: pgsql/src/backend/utils/mb/Unicode/UCS_to_SJIS.pl,v 1.7 2005/01/01 20:44:18 tgl Exp $
|
||||
# $PostgreSQL: pgsql/src/backend/utils/mb/Unicode/UCS_to_SJIS.pl,v 1.8 2005/03/07 04:30:52 momjian Exp $
|
||||
#
|
||||
# Generate UTF-8 <--> SJIS code conversion tables from
|
||||
# map files provided by Unicode organization.
|
||||
@ -52,7 +52,7 @@ while( <FILE> ){
|
||||
|| (( $code >= 0x879a )
|
||||
&& ( $code <= 0x879c )))
|
||||
{
|
||||
printf STDERR "Warning: duplicate unicode : UCS=0x%04x SJIS=0x%04x\n",$ucs,$code;
|
||||
printf STDERR "Warning: duplicate UTF8 : UCS=0x%04x SJIS=0x%04x\n",$ucs,$code;
|
||||
next;
|
||||
}
|
||||
$count++;
|
||||
|
@ -2,7 +2,7 @@
|
||||
#
|
||||
# Copyright (c) 2001-2005, PostgreSQL Global Development Group
|
||||
#
|
||||
# $PostgreSQL: pgsql/src/backend/utils/mb/Unicode/UCS_to_UHC.pl,v 1.5 2005/01/01 20:44:18 tgl Exp $
|
||||
# $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.
|
||||
@ -35,7 +35,7 @@ while( <FILE> ){
|
||||
if( $code >= 0x80 && $ucs >= 0x0080 ){
|
||||
$utf = &ucs2utf($ucs);
|
||||
if( $array{ $utf } ne "" ){
|
||||
printf STDERR "Warning: duplicate unicode: %04x\n",$ucs;
|
||||
printf STDERR "Warning: duplicate UTF8: %04x\n",$ucs;
|
||||
next;
|
||||
}
|
||||
$count++;
|
||||
|
@ -2,7 +2,7 @@
|
||||
#
|
||||
# Copyright (c) 2001-2005, PostgreSQL Global Development Group
|
||||
#
|
||||
# $PostgreSQL: pgsql/src/backend/utils/mb/Unicode/UCS_to_WIN874.pl,v 1.5 2005/01/01 20:44:18 tgl Exp $
|
||||
# $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.
|
||||
@ -35,7 +35,7 @@ while( <FILE> ){
|
||||
if( $code >= 0x80 && $ucs >= 0x0080 ){
|
||||
$utf = &ucs2utf($ucs);
|
||||
if( $array{ $utf } ne "" ){
|
||||
printf STDERR "Warning: duplicate unicode: %04x\n",$ucs;
|
||||
printf STDERR "Warning: duplicate UTF8: %04x\n",$ucs;
|
||||
next;
|
||||
}
|
||||
$count++;
|
||||
|
@ -2,7 +2,7 @@
|
||||
#
|
||||
# Copyright (c) 2001-2005, PostgreSQL Global Development Group
|
||||
#
|
||||
# $PostgreSQL: pgsql/src/backend/utils/mb/Unicode/UCS_to_WINX.pl,v 1.5 2005/01/01 20:44:18 tgl Exp $
|
||||
# $PostgreSQL: pgsql/src/backend/utils/mb/Unicode/UCS_to_WINX.pl,v 1.6 2005/03/07 04:30:52 momjian Exp $
|
||||
#
|
||||
# Generate UTF-8 <--> WINX code conversion tables from
|
||||
# map files provided by Unicode organization.
|
||||
@ -42,7 +42,7 @@ foreach $charset (@charsets) {
|
||||
if( $code >= 0x80){
|
||||
$utf = &ucs2utf($ucs);
|
||||
if( $array{ $utf } ne "" ){
|
||||
printf STDERR "Warning: duplicate unicode: %04x\n",$ucs;
|
||||
printf STDERR "Warning: duplicate UTF8: %04x\n",$ucs;
|
||||
next;
|
||||
}
|
||||
$count++;
|
||||
@ -86,7 +86,7 @@ foreach $charset (@charsets) {
|
||||
if($code >= 0x80){
|
||||
$utf = &ucs2utf($ucs);
|
||||
if( $array{ $utf } ne "" ){
|
||||
printf STDERR "Warning: duplicate unicode: %04x\n",$ucs;
|
||||
printf STDERR "Warning: duplicate UTF8: %04x\n",$ucs;
|
||||
next;
|
||||
}
|
||||
$count++;
|
||||
|
@ -2,7 +2,7 @@
|
||||
#
|
||||
# Copyright (c) 2001-2005, PostgreSQL Global Development Group
|
||||
#
|
||||
# $PostgreSQL: pgsql/src/backend/utils/mb/Unicode/UCS_to_cyrillic.pl,v 1.6 2005/01/01 20:44:18 tgl Exp $
|
||||
# $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.
|
||||
@ -17,8 +17,8 @@
|
||||
require "ucs2utf.pl";
|
||||
%filename = ('KOI8R'=>'koi8-r.txt',
|
||||
'WIN1251'=>'cp1251.txt',
|
||||
'ALT'=>'cp866.txt');
|
||||
@charsets = ('KOI8R','ALT','WIN1251');
|
||||
'WIN866'=>'cp866.txt');
|
||||
@charsets = ('KOI8R','WIN866','WIN1251');
|
||||
foreach $charset (@charsets) {
|
||||
|
||||
#
|
||||
@ -41,7 +41,7 @@ foreach $charset (@charsets) {
|
||||
if( $code >= 0x80){
|
||||
$utf = &ucs2utf($ucs);
|
||||
if( $array{ $utf } ne "" ){
|
||||
printf STDERR "Warning: duplicate unicode: %04x\n",$ucs;
|
||||
printf STDERR "Warning: duplicate UTF8: %04x\n",$ucs;
|
||||
next;
|
||||
}
|
||||
$count++;
|
||||
@ -85,7 +85,7 @@ foreach $charset (@charsets) {
|
||||
if($code >= 0x80){
|
||||
$utf = &ucs2utf($ucs);
|
||||
if( $array{ $utf } ne "" ){
|
||||
printf STDERR "Warning: duplicate unicode: %04x\n",$ucs;
|
||||
printf STDERR "Warning: duplicate UTF8: %04x\n",$ucs;
|
||||
next;
|
||||
}
|
||||
$count++;
|
||||
|
@ -1,4 +1,4 @@
|
||||
static pg_utf_to_local ULmapTCVN[ 120 ] = {
|
||||
static pg_utf_to_local ULmapWIN1258[ 120 ] = {
|
||||
{0x0000, 0x0081},
|
||||
{0xc2a0, 0x00a0},
|
||||
{0xc2a1, 0x00a1},
|
@ -1,4 +1,4 @@
|
||||
static pg_utf_to_local ULmap_ALT[ 128 ] = {
|
||||
static pg_utf_to_local ULmap_WIN866[ 128 ] = {
|
||||
{0xc2a0, 0x00ff},
|
||||
{0xc2a4, 0x00fd},
|
||||
{0xc2b0, 0x00f8},
|
@ -1,4 +1,4 @@
|
||||
static pg_local_to_utf LUmapTCVN[ 128 ] = {
|
||||
static pg_local_to_utf LUmapWIN1258[ 128 ] = {
|
||||
{0x0080, 0xe282ac},
|
||||
{0x0081, 0x0000},
|
||||
{0x0082, 0xe2809a},
|
@ -1,4 +1,4 @@
|
||||
static pg_local_to_utf LUmapALT[ 128 ] = {
|
||||
static pg_local_to_utf LUmapWIN866[ 128 ] = {
|
||||
{0x0080, 0xd090},
|
||||
{0x0081, 0xd091},
|
||||
{0x0082, 0xd092},
|
Reference in New Issue
Block a user