File tree 1 file changed +9
-11
lines changed
src/backend/utils/mb/Unicode
1 file changed +9
-11
lines changed Original file line number Diff line number Diff line change 1
1
# ! /usr/bin/perl
2
2
#
3
- # Copyright 2002 by Bill Huang
3
+ # Copyright (c) 2007-2010, PostgreSQL Global Development Group
4
4
#
5
- # $PostgreSQL: pgsql/src/backend/utils/mb/Unicode/ UCS_to_GB18030.pl,v 1.5 2005/03/07 04:30:52 momjian Exp $
5
+ # $Id: UCS_to_GB18030.pl,v 1.6 2010/02/16 20:35:07 momjian Exp $
6
6
#
7
7
# Generate UTF-8 <--> GB18030 code conversion tables from
8
- # map files provided by Unicode organization.
9
- # Unfortunately it is prohibited by the organization
10
- # to distribute the map files. So if you try to use this script,
11
- # you have to obtain ISO10646-GB18030.TXT from
12
- # the organization's ftp site.
8
+ # "ISO10646-GB18030.TXT"
13
9
#
14
- # ISO10646-GB18030.TXT format:
15
- # GB18030 code in hex
16
- # UCS-2 code in hex
17
- # # and Unicode name (not used in this script)
10
+ # file format:
11
+ # GB18030 hex code
12
+ # UCS-2 hex code
18
13
19
14
require " ucs2utf.pl" ;
20
15
16
+
21
17
# first generate UTF-8 --> GB18030 table
22
18
23
19
$in_file = " ISO10646-GB18030.TXT" ;
45
41
}
46
42
close ( FILE );
47
43
44
+
48
45
#
49
46
# first, generate UTF8 --> GB18030 table
50
47
#
66
63
print FILE " };\n " ;
67
64
close (FILE);
68
65
66
+
69
67
#
70
68
# then generate GB18030 --> UTF8 table
71
69
#
You can’t perform that action at this time.
0 commit comments