File Coverage

blib/lib/I18N/Charset.pm
Criterion Covered Total %
statement 171 210 81.4
branch 78 100 78.0
condition 16 24 66.6
subroutine 31 35 88.5
pod 16 16 100.0
total 312 385 81.0


line stmt bran cond sub pod time code
1              
2             # $rcs = ' $Id: Charset.pm,v 1.414 2015-02-02 19:49:14 Martin Exp $ ' ;
3              
4             package I18N::Charset;
5              
6 11     11   563512 use strict;
  11         100  
  11         383  
7 11     11   80 use warnings;
  11         30  
  11         514  
8              
9             require 5.005;
10              
11 11     11   91 use base 'Exporter';
  11         20  
  11         1481  
12 11     11   90 use Carp;
  11         22  
  11         1955  
13              
14             =head1 NAME
15              
16             I18N::Charset - IANA Character Set Registry names and Unicode::MapUTF8
17             (et al.) conversion scheme names
18              
19             =head1 SYNOPSIS
20              
21             use I18N::Charset;
22              
23             $sCharset = iana_charset_name('WinCyrillic');
24             # $sCharset is now 'windows-1251'
25             $sCharset = umap_charset_name('Adobe DingBats');
26             # $sCharset is now 'ADOBE-DINGBATS' which can be passed to Unicode::Map->new()
27             $sCharset = map8_charset_name('windows-1251');
28             # $sCharset is now 'cp1251' which can be passed to Unicode::Map8->new()
29             $sCharset = umu8_charset_name('x-sjis');
30             # $sCharset is now 'sjis' which can be passed to Unicode::MapUTF8->new()
31             $sCharset = libi_charset_name('x-sjis');
32             # $sCharset is now 'MS_KANJI' which can be passed to `iconv -f $sCharset ...`
33             $sCharset = enco_charset_name('Shift-JIS');
34             # $sCharset is now 'shiftjis' which can be passed to Encode::from_to()
35              
36             I18N::Charset::add_iana_alias('my-japanese' => 'iso-2022-jp');
37             I18N::Charset::add_map8_alias('my-arabic' => 'arabic7');
38             I18N::Charset::add_umap_alias('my-hebrew' => 'ISO-8859-8');
39             I18N::Charset::add_libi_alias('my-sjis' => 'x-sjis');
40             I18N::Charset::add_enco_alias('my-japanese' => 'shiftjis');
41              
42             =head1 DESCRIPTION
43              
44             The C module provides access to the IANA Character Set
45             Registry names for identifying character encoding schemes. It also
46             provides a mapping to the character set names used by the
47             Unicode::Map and Unicode::Map8 modules.
48              
49             So, for example, if you get an HTML document with a META CHARSET="..."
50             tag, you can fairly quickly determine what Unicode::MapXXX module can
51             be used to convert it to Unicode.
52              
53             If you don't have the module Unicode::Map installed, the umap_
54             functions will always return undef.
55             If you don't have the module Unicode::Map8 installed, the map8_
56             functions will always return undef.
57             If you don't have the module Unicode::MapUTF8 installed, the umu8_
58             functions will always return undef.
59             If you don't have the iconv library installed, the libi_
60             functions will always return undef.
61             If you don't have the Encode module installed, the enco_
62             functions will always return undef.
63              
64             =cut
65              
66             #-----------------------------------------------------------------------
67             # Public Global Variables
68             #-----------------------------------------------------------------------
69              
70             our
71             $VERSION = 1.419;
72              
73             our @EXPORT = qw( iana_charset_name
74             map8_charset_name
75             umap_charset_name
76             umu8_charset_name
77             mib_charset_name
78             mime_charset_name
79             libi_charset_name
80             enco_charset_name
81             mib_to_charset_name charset_name_to_mib
82             );
83             our @EXPORT_OK = qw( add_iana_alias add_map8_alias add_umap_alias add_libi_alias add_enco_alias );
84              
85             #-----------------------------------------------------------------------
86             # Private Global Variables
87             #-----------------------------------------------------------------------
88              
89             # %hsMIBofShortname is a hash of stripped names to mib.
90             my %hsMIBofShortname;
91             # %hsLongnameOfMIB is a hash of mib to long name.
92             my %hsLongnameOfMIB;
93             # %hsMIBofLongname is a hash of long name to mib.
94             my %hsMIBofLongname;
95             # %hsMIMEofMIB is a hash of mib to preferred MIME names.
96             my %hsMIMEofMIB;
97             # %MIBtoMAP8 is a hash of mib to Unicode::Map8 names. (Only valid for
98             # those U::Map8 names that we can find in the IANA registry)
99             my %MIBtoMAP8;
100             # %MIBtoUMAP is a hash of mib to Unicode::Map names. If a U::Map
101             # encoding does not have an official IANA entry, we create a dummy mib
102             # for it.
103             my %MIBtoUMAP;
104             # %MIBtoUMU8 is a hash of mib to Unicode::MapUTF8 names. If a
105             # U::MapUTF8 encoding does not have an official IANA entry, we create
106             # a dummy mib for it.
107             my %MIBtoUMU8;
108             # %MIBtoLIBI is a hash of mib to libiconv names. (Only valid for
109             # those libiconv names that we can find in the IANA registry)
110             my %MIBtoLIBI;
111             # %MIBtoENCO is a hash of mib to Encode names. (Only valid for
112             # those Encode names that we can find in the IANA registry)
113             my %MIBtoENCO;
114              
115 11     11   90 use constant DEBUG => 0;
  11         20  
  11         1603  
116 11     11   81 use constant DEBUG_ENCO => 0;
  11         21  
  11         550  
117 11     11   65 use constant DEBUG_LIBI => 0;
  11         22  
  11         63754  
118              
119             =head1 CONVERSION ROUTINES
120              
121             There are four main conversion routines: C,
122             C, C, and
123             C.
124              
125             =over 4
126              
127             =item iana_charset_name()
128              
129             This function takes a string containing the name of a character set
130             and returns a string which contains the official IANA name of the
131             character set identified. If no valid character set name can be
132             identified, then C will be returned. The case and punctuation
133             within the string are not important.
134              
135             $sCharset = iana_charset_name('WinCyrillic');
136              
137             =cut
138              
139             my $sDummy = 'dummymib';
140             my $sFakeMIB = $sDummy .'001';
141              
142             sub _is_dummy
143             {
144 9699     9699   13099 my $s = shift;
145 9699         32517 return ($s =~ m!\A$sDummy!);
146             } # _is_dummy
147              
148             sub iana_charset_name
149             {
150 9723     9723 1 14158 my $code = shift;
151 9723 100       16323 return undef unless defined $code;
152 9721 100       16090 return undef unless $code ne '';
153             # $iDebug = ($code =~ m!sjis!);
154             # print STDERR " + iana_charset_name($code)..." if $iDebug;
155 9719         13586 my $mib = _short_to_mib($code);
156 9719 100       17812 return undef unless defined $mib;
157             # print STDERR " + mib is ($mib)..." if $iDebug;
158             # Make sure this is really a IANA mib:
159 9444 100       14120 return undef if _is_dummy($mib);
160             # print STDERR " + is really iana..." if $iDebug;
161 8648         24986 return $hsLongnameOfMIB{$mib};
162             } # iana_charset_name
163              
164              
165             sub _try_list
166             {
167 11743     11743   15066 my $code = shift;
168 11743         17117 my @asTry = ($code, _strip($code));
169 11743 100       23936 push @asTry, _strip($code) if $code =~ s!\A(x-)+!!; # try without leading x-
170 11743         25067 return @asTry;
171             } # _try_list
172              
173             sub _short_to_mib
174             {
175 11743     11743   15135 my $code = shift;
176 11743         27505 local $^W = 0;
177             # print STDERR " + _short_to_mib($code)..." if DEBUG;
178 11743         15754 my $answer = undef;
179             TRY_SHORT:
180 11743         16611 foreach my $sTry (_try_list($code))
181             {
182 19983   100     50387 my $iMIB = $hsMIBofShortname{$sTry} || 'undef';
183             # print STDERR "try($sTry)...$iMIB..." if DEBUG;
184 19983 100       34666 if ($iMIB ne 'undef')
185             {
186 10992         13477 $answer = $iMIB;
187 10992         16258 last TRY_SHORT;
188             } # if
189             } # foreach
190             # print STDERR "answer is $answer\n" if DEBUG;
191 11743         28726 return $answer;
192             } # _short_to_mib
193              
194              
195             sub _short_to_long
196             {
197 0     0   0 local $^W = 0;
198 0         0 my $s = shift;
199             # print STDERR " + _short_to_long($s)..." if DEBUG;
200 0         0 return $hsLongnameOfMIB{_short_to_mib($s)};
201             } # _short_to_long
202              
203              
204             =item mime_charset_name()
205              
206             This function takes a string containing the name of a character set
207             and returns a string which contains the preferred MIME name of the
208             character set identified. If no valid character set name can be
209             identified, then C will be returned. The case and punctuation
210             within the string are not important.
211              
212             $sCharset = mime_charset_name('Extended_UNIX_Code_Packed_Format_for_Japanese');
213              
214             =cut
215              
216             sub mime_charset_name
217             {
218             # This function contributed by Masafumi "Max" Nakane. Thank you!
219 13     13 1 118 my $code = shift;
220 13 100       43 return undef unless defined $code;
221 11 100       29 return undef unless $code ne '';
222             # print STDERR " + mime_charset_name($code)..." if DEBUG;
223 10         21 my $mib = _short_to_mib($code);
224 10 100       32 return undef unless defined $mib;
225             # print STDERR " + mib is ($mib)..." if DEBUG;
226             # Make sure this is really an IANA mib:
227 7 100       15 return undef if _is_dummy($mib);
228             # print STDERR " + is really iana..." if DEBUG;
229 6         30 return $hsMIMEofMIB{$mib};
230             } # mime_charset_name
231              
232              
233             =item enco_charset_name()
234              
235             This function takes a string containing the name of a character set
236             and returns a string which contains a name of the character set
237             suitable to be passed to the Encode module. If no valid character set
238             name can be identified, or if Encode is not installed, then C
239             will be returned. The case and punctuation within the string are not
240             important.
241              
242             $sCharset = enco_charset_name('Extended_UNIX_Code_Packed_Format_for_Japanese');
243              
244             =cut
245              
246             my $iEncoLoaded = 0;
247              
248             sub _maybe_load_enco # PRIVATE
249             {
250 64 100   64   120 return if $iEncoLoaded;
251             # Get a list of aliases from Encode:
252 2 50       182 if (eval q{require Encode})
253             {
254 2         7 my @as;
255 2         17 @as = Encode->encodings(':all');
256             # push @as, Encode->encodings('EBCDIC');
257 2         2136 my $iFake = 0;
258 2         1068 my $iReal = 0;
259             ENCODING:
260 2         11 foreach my $s (@as)
261             {
262             # First, see if this already has an IANA mapping:
263 248         360 my $mib;
264 248         344 my $sIana = iana_charset_name($s);
265 248 100       468 if (!defined $sIana)
266             {
267             # Create a dummy mib:
268 104         188 $mib = $sFakeMIB++;
269 104         166 $iFake++;
270             } # if
271             else
272             {
273 144         256 $mib = charset_name_to_mib($sIana);
274 144         197 $iReal++;
275             }
276             # At this point we have a mib for this Encode entry.
277 248         484 $MIBtoENCO{$mib} = $s;
278 248         302 DEBUG_ENCO && print STDERR " + mib for enco ==$s== is $mib\n";
279 248         375 $hsMIBofShortname{_strip($s)} = $mib;
280 248 100       417 DEBUG_ENCO && print STDERR " + assign enco =$s==>$mib\n" if _is_dummy($mib);
281             } # foreach ENCODING
282 2         4 if (DEBUG_ENCO)
283             {
284             print STDERR " + Summary of Encode encodings:\n";
285             printf STDERR (" + %d encodings found.\n", scalar(@as));
286             print STDERR " + $iFake fake mibs created.\n";
287             print STDERR " + $iReal real mibs re-used.\n";
288             } # if
289 2         14 $iEncoLoaded = 1;
290 2         13 add_enco_alias('Windows-31J', 'cp932');
291             } # if
292             else
293             {
294 0         0 print STDERR " --- Encode is not installed\n";
295             }
296             } # _maybe_load_enco
297              
298             sub _mib_to_enco # PRIVATE
299             {
300 29     29   55 _maybe_load_enco();
301 29         67 return $MIBtoENCO{shift()};
302             } # _mib_to_enco
303              
304             sub enco_charset_name
305             {
306 38     38 1 259 my $code = shift;
307 38 100       102 return undef unless defined $code;
308 36 100       92 return undef unless $code ne '';
309 35         91 _maybe_load_enco();
310 35         402 my $iDebug = 0; # ($code =~ m!johab!i);
311 35 50 50     122 print STDERR " + enco_charset_name($code)..." if ($iDebug || DEBUG_ENCO);
312 35         66 my $mib = _short_to_mib($code);
313 35 100       94 return undef unless defined $mib;
314 29 50 50     90 print STDERR " + mib is ($mib)..." if ($iDebug || DEBUG_ENCO);
315 29         53 my $ret = _mib_to_enco($mib);
316 29 50 50     103 print STDERR " + enco is ($ret)..." if ($iDebug || DEBUG_ENCO);
317 29         119 return $ret;
318             } # enco_charset_name
319              
320              
321             =item libi_charset_name()
322              
323             This function takes a string containing the name of a character set
324             and returns a string which contains a name of the character set
325             suitable to be passed to iconv. If no valid character set name can be
326             identified, then C will be returned. The case and punctuation
327             within the string are not important.
328              
329             $sCharset = libi_charset_name('Extended_UNIX_Code_Packed_Format_for_Korean');
330              
331             =cut
332              
333             my $iLibiLoaded = 0;
334              
335             sub _maybe_load_libi # PRIVATE
336             {
337 0 0   0   0 return if $iLibiLoaded;
338             # Get a list of aliases from iconv:
339 0 0       0 return unless eval 'require App::Info::Lib::Iconv';
340 0         0 my $oAILI = new App::Info::Lib::Iconv;
341 0 0       0 if (ref $oAILI)
342             {
343 0         0 my $iLibiVersion = $oAILI->version;
344 0         0 DEBUG_LIBI && warn " DDD libiconv version is $iLibiVersion\n";
345 0 0 0     0 if ($oAILI->installed && (1.08 <= $iLibiVersion))
346             {
347 0         0 my $sCmd = $oAILI->bin_dir . '/iconv -l';
348 0         0 DEBUG_LIBI && warn " DDD iconv cmdline is $sCmd\n";
349 0         0 my @asIconv = split(/\n/, `$sCmd`);
350             ICONV_LINE:
351 0         0 foreach my $sLine (@asIconv)
352             {
353 0         0 my @asWord = split(/\s+/, $sLine);
354             # First, go through and find one of these that has an IANA mapping:
355 0         0 my $mib;
356 0         0 my $sIana = undef;
357             FIND_IANA:
358 0         0 foreach my $sWord (@asWord)
359             {
360 0 0       0 last FIND_IANA if ($sIana = iana_charset_name($sWord));
361             } # foreach FIND_IANA
362 0 0       0 if (!defined $sIana)
363             {
364             # Create a dummy mib:
365 0         0 $mib = $sFakeMIB++;
366             } # if
367             else
368             {
369 0         0 $mib = charset_name_to_mib($sIana);
370             }
371             # At this point we have a mib for this iconv entry. Assign them all:
372             ADD_LIBI:
373 0         0 foreach my $sWord (reverse @asWord)
374             {
375 0         0 $MIBtoLIBI{$mib} = $sWord;
376 0         0 DEBUG_LIBI && warn " + mib for libi ==$sWord== is $mib\n";
377 0         0 $hsMIBofShortname{_strip($sWord)} = $mib;
378             } # foreach ADD_LIBI
379             } # foreach ICONV_LINE
380             } # if
381             } # if
382 0         0 $iLibiLoaded = 1;
383             } # _maybe_load_libi
384              
385             sub _mib_to_libi # PRIVATE
386             {
387 0     0   0 _maybe_load_libi();
388 0         0 return $MIBtoLIBI{shift()};
389             } # _mib_to_libi
390              
391             sub libi_charset_name
392             {
393 7     7 1 140 my $code = shift;
394 7 100       28 return undef unless defined $code;
395 5 100       15 return undef unless $code ne '';
396             # my $iDebug = 1; # ($code =~ m!johab!i);
397             # print STDERR " + libi_charset_name($code)..." if $iDebug;
398 4         9 my $mib = _short_to_mib($code);
399 4 50       18 return undef unless defined $mib;
400             # print STDERR " + mib is ($mib)..." if $iDebug;
401 0         0 my $ret = _mib_to_libi($mib);
402             # print STDERR " + libi is ($ret)..." if $iDebug;
403 0         0 return $ret;
404             } # libi_charset_name
405              
406              
407             =item mib_to_charset_name
408              
409             This function takes a string containing the MIBenum of a character set
410             and returns a string which contains a name for the character set.
411             If the given MIBenum does not correspond to any character set,
412             then C will be returned.
413              
414             $sCharset = mib_to_charset_name('3');
415              
416             =cut
417              
418             sub mib_to_charset_name
419             {
420 11     11 1 22 my $code = shift;
421 11 100       31 return undef unless defined $code;
422 9 100       26 return undef unless $code ne '';
423 8         27 local $^W = 0;
424 8         48 return $hsLongnameOfMIB{$code};
425             } # mib_to_charset_name
426              
427              
428             =item mib_charset_name
429              
430             This is a synonum for mib_to_charset_name
431              
432             =cut
433              
434             sub mib_charset_name
435             {
436 9     9 1 105 mib_to_charset_name(@_);
437             } # mib_charset_name
438              
439              
440             =item charset_name_to_mib
441              
442             This function takes a string containing the name of a character set in
443             almost any format and returns a MIBenum for the character set. For
444             IANA-registered character sets, this is the IANA-registered MIB. For
445             non-IANA character sets, this is an unambiguous unique string whose
446             only use is to pass to other functions in this module. If no valid
447             character set name can be identified, then C will be returned.
448              
449             $iMIB = charset_name_to_mib('US-ASCII');
450              
451             =cut
452              
453             sub charset_name_to_mib
454             {
455 10123     10123 1 13009 my $s = shift;
456 10123 100       16566 return undef unless defined($s);
457             return $hsMIBofLongname{$s} || $hsMIBofLongname{
458 10121   100     25276 iana_charset_name($s) ||
459             umap_charset_name($s) ||
460             map8_charset_name($s) ||
461             umu8_charset_name($s) ||
462             ''
463             };
464             } # charset_name_to_mib
465              
466              
467             =item map8_charset_name()
468              
469             This function takes a string containing the name of a character set
470             (in almost any format) and returns a string which contains a name for
471             the character set that can be passed to Unicode::Map8::new().
472             Note: the returned string will be capitalized just like
473             the name of the .bin file in the Unicode::Map8::MAPS_DIR directory.
474             If no valid character set name can be identified,
475             then C will be returned.
476             The case and punctuation within the argument string are not important.
477              
478             $sCharset = map8_charset_name('windows-1251');
479              
480             =cut
481              
482             sub map8_charset_name
483             {
484 468     468 1 854 my $code = shift;
485 468 100       946 return undef unless defined $code;
486 466 100       836 return undef unless $code ne '';
487             # $iDebug = 0 && ($code =~ m!037!);
488             # print STDERR " + map8_charset_name($code)..." if $iDebug;
489 464         705 $code = _strip($code);
490             # print STDERR "$code..." if $iDebug;
491 464   100     771 my $iMIB = _short_to_mib($code) || 'undef';
492             # print STDERR "$iMIB..." if $iDebug;
493 464 100       877 if ($iMIB ne 'undef')
494             {
495             # print STDERR "$MIBtoMAP8{$iMIB}\n" if $iDebug;
496 445         1198 return $MIBtoMAP8{$iMIB};
497             } # if
498             # print STDERR "undef\n" if $iDebug;
499 19         98 return undef;
500             } # map8_charset_name
501              
502              
503             =item umap_charset_name()
504              
505             This function takes a string containing the name of a character set
506             (in almost any format) and returns a string which contains a name for
507             the character set that can be passed to Unicode::Map::new(). If no
508             valid character set name can be identified, then C will be
509             returned. The case and punctuation within the argument string are not
510             important.
511              
512             $sCharset = umap_charset_name('hebrew');
513              
514             =cut
515              
516             sub umap_charset_name
517             {
518 802     802 1 1217 my $code = shift;
519 802 100       1434 return undef unless defined $code;
520 800 100       1405 return undef unless $code ne '';
521             # $iDebug = ($code =~ m!apple!i);
522             # print STDERR "\n + MIBtoUMAP{dummymib029} == $MIBtoUMAP{$sDummy .'029'}\n\n" if $iDebug;
523             # print STDERR " + umap_charset_name($code)..." if $iDebug;
524 798   100     1245 my $iMIB = _short_to_mib(_strip($code)) || 'undef';
525             # print STDERR "$iMIB..." if $iDebug;
526 798 100       1578 if ($iMIB ne 'undef')
527             {
528             # print STDERR "$MIBtoUMAP{$iMIB}\n" if $iDebug;
529 778         2384 return $MIBtoUMAP{$iMIB};
530             } # if
531             # print STDERR "undef\n" if $iDebug;
532 20         86 return undef;
533             } # umap_charset_name
534              
535              
536             our @asMap8Debug;
537              
538             =item umu8_charset_name()
539              
540             This function takes a string containing the name of a character set
541             (in almost any format) and returns a string which contains a name for
542             the character set that can be passed to Unicode::MapUTF8::new(). If no
543             valid character set name can be identified, then C will be
544             returned. The case and punctuation within the argument string are not
545             important.
546              
547             $sCharset = umu8_charset_name('windows-1251');
548              
549             =cut
550              
551             sub umu8_charset_name
552             {
553 26     26 1 2205 my $code = shift;
554 26 100       74 return undef unless defined $code;
555 24 100       60 return undef unless $code ne '';
556             # $iDebug = ($code =~ m!u!);
557             # print STDERR " + umu8_charset_name($code)..." if $iDebug;
558 22   100     49 my $iMIB = _short_to_mib($code) || 'undef';
559             # print STDERR "$iMIB..." if $iDebug;
560 22 100       47 if ($iMIB ne 'undef')
561             {
562             # print STDERR "$MIBtoUMU8{$iMIB}\n" if $iDebug;
563 16         79 return $MIBtoUMU8{$iMIB};
564             } # if
565             # print STDERR "undef\n" if $iDebug;
566 6         39 return undef;
567             } # umu8_charset_name
568              
569             =back
570              
571             =head1 QUERY ROUTINES
572              
573             There is one function which can be used to obtain a list of all
574             IANA-registered character set names.
575              
576             =over 4
577              
578             =item C
579              
580             Returns a list of all registered IANA character set names.
581             The names are not in any particular order.
582              
583             =back
584              
585             =cut
586              
587             sub all_iana_charset_names
588             {
589 1     1 1 155 return values %hsLongnameOfMIB;
590             } # all_iana_charset_names
591              
592             #-----------------------------------------------------------------------
593              
594             =head1 CHARACTER SET NAME ALIASING
595              
596             This module supports several semi-private routines for specifying
597             character set name aliases.
598              
599             =over 4
600              
601             =item add_iana_alias()
602              
603             This function takes two strings: a new alias, and a target IANA
604             Character Set Name (or another alias). It defines the new alias to
605             refer to that character set name (or to the character set name to
606             which the second alias refers).
607              
608             Returns the target character set name of the successfully installed alias.
609             Returns 'undef' if the target character set name is not registered.
610             Returns 'undef' if the target character set name of the second alias
611             is not registered.
612              
613             I18N::Charset::add_iana_alias('my-alias1' => 'Shift_JIS');
614              
615             With this code, "my-alias1" becomes an alias for the existing IANA
616             character set name 'Shift_JIS'.
617              
618             I18N::Charset::add_iana_alias('my-alias2' => 'sjis');
619              
620             With this code, "my-alias2" becomes an alias for the IANA character set
621             name referred to by the existing alias 'sjis' (which happens to be 'Shift_JIS').
622              
623             =cut
624              
625             sub add_iana_alias
626             {
627 3     3 1 9 my ($sAlias, $sReal) = @_;
628             # print STDERR " + add_iana_alias($sAlias, $sReal)\n";
629 3         7 my $sName = iana_charset_name($sReal);
630 3 100       9 if (not defined($sName))
631             {
632 1         214 carp qq{attempt to alias "$sAlias" to unknown IANA charset "$sReal"};
633 1         13 return undef;
634             } # if
635 2         5 my $mib = _short_to_mib(_strip($sName));
636             # print STDERR " --> $sName --> $mib\n";
637 2         5 $hsMIBofShortname{_strip($sAlias)} = $mib;
638 2         28 return $sName;
639             } # add_iana_alias
640              
641             #-----------------------------------------------------------------------
642              
643             =item add_map8_alias()
644              
645             This function takes two strings: a new alias, and a target
646             Unicode::Map8 Character Set Name (or an existing alias to a Map8 name).
647             It defines the new alias to refer to that mapping name (or to the
648             mapping name to which the second alias refers).
649              
650             If the first argument is a registered IANA character set name, then
651             all aliases of that IANA character set name will end up pointing to
652             the target Map8 mapping name.
653              
654             Returns the target mapping name of the successfully installed alias.
655             Returns 'undef' if the target mapping name is not registered.
656             Returns 'undef' if the target mapping name of the second alias
657             is not registered.
658              
659             I18N::Charset::add_map8_alias('normal' => 'ANSI_X3.4-1968');
660              
661             With the above statement, "normal" becomes an alias for the existing
662             Unicode::Map8 mapping name 'ANSI_X3.4-1968'.
663              
664             I18N::Charset::add_map8_alias('normal' => 'US-ASCII');
665              
666             With the above statement, "normal" becomes an alias for the existing
667             Unicode::Map mapping name 'ANSI_X3.4-1968' (which is what "US-ASCII"
668             is an alias for).
669              
670             I18N::Charset::add_map8_alias('IBM297' => 'EBCDIC-CA-FR');
671              
672             With the above statement, "IBM297" becomes an alias for the existing
673             Unicode::Map mapping name 'EBCDIC-CA-FR'. As a side effect, all the
674             aliases for 'IBM297' (i.e. 'cp297' and 'ebcdic-cp-fr') also become
675             aliases for 'EBCDIC-CA-FR'.
676              
677             =cut
678              
679             sub add_map8_alias
680             {
681 114     114 1 236 my ($sAlias, $sReal) = @_;
682 114         214 my $sName = map8_charset_name($sReal);
683 114         215 my $sShort = _strip($sAlias);
684 114         217 my $sShortName = _strip($sName);
685 114 100       239 if (not defined($sName))
686             {
687 1         205 carp qq{attempt to alias "$sAlias" to unknown Map8 charset "$sReal"};
688 1         13 return undef;
689             } # if
690 113 50       218 if (exists $hsMIBofShortname{$sShortName})
691             {
692 113         269 $hsMIBofShortname{$sShort} = $hsMIBofShortname{$sShortName};
693             } # if
694 113         185 return $sName;
695             } # add_map8_alias
696              
697             #-----------------------------------------------------------------------
698              
699             =item add_umap_alias()
700              
701             This function works identically to add_map8_alias() above, but
702             operates on Unicode::Map encoding tables.
703              
704             =cut
705              
706             sub add_umap_alias
707             {
708 3     3 1 10 my ($sAlias, $sReal) = @_;
709 3         8 my $sName = umap_charset_name($sReal);
710 3         8 my $sShort = _strip($sAlias);
711 3         8 my $sShortName = _strip($sName);
712 3 100       9 if (not defined($sName))
713             {
714 1         205 carp qq{attempt to alias "$sAlias" to unknown U::Map charset "$sReal"};
715 1         13 return undef;
716             } # if
717 2 50       6 if (exists $hsMIBofShortname{$sShortName})
718             {
719 2         8 $hsMIBofShortname{$sShort} = $hsMIBofShortname{$sShortName};
720             } # if
721 2         9 return $sName;
722             } # add_umap_alias
723              
724             #-----------------------------------------------------------------------
725              
726             =item add_libi_alias()
727              
728             This function takes two strings: a new alias, and a target iconv
729             Character Set Name (or existing iconv alias). It defines the new
730             alias to refer to that character set name (or to the character set
731             name to which the existing alias refers).
732              
733             Returns the target conversion scheme name of the successfully installed alias.
734             Returns 'undef' if there is no such target conversion scheme or alias.
735              
736             Examples:
737              
738             I18N::Charset::add_libi_alias('my-chinese1' => 'CN-GB');
739              
740             With this code, "my-chinese1" becomes an alias for the existing iconv
741             conversion scheme 'CN-GB'.
742              
743             I18N::Charset::add_libi_alias('my-chinese2' => 'EUC-CN');
744              
745             With this code, "my-chinese2" becomes an alias for the iconv
746             conversion scheme referred to by the existing alias 'EUC-CN' (which
747             happens to be 'CN-GB').
748              
749             =cut
750              
751             sub add_libi_alias
752             {
753 1     1 1 5 my ($sAlias, $sReal) = @_;
754             # print STDERR " + add_libi_alias($sAlias,$sReal)...";
755 1         4 my $sName = libi_charset_name($sReal);
756 1 50       4 if (not defined($sName))
757             {
758 1         239 carp qq{attempt to alias "$sAlias" to unknown iconv charset "$sReal"};
759 1         16 return undef;
760             } # if
761 0         0 my $mib = _short_to_mib(_strip($sName));
762             # print STDERR "sName=$sName...mib=$mib\n";
763 0         0 $hsMIBofShortname{_strip($sAlias)} = $mib;
764 0         0 return $sName;
765             } # add_libi_alias
766              
767             #-----------------------------------------------------------------------
768              
769             =item add_enco_alias()
770              
771             This function takes two strings: a new alias, and a target Encode
772             encoding Name (or existing Encode alias). It defines the new alias
773             referring to that encoding name (or to the encoding to which the
774             existing alias refers).
775              
776             Returns the target encoding name of the successfully installed alias.
777             Returns 'undef' if there is no such encoding or alias.
778              
779             Examples:
780              
781             I18N::Charset::add_enco_alias('my-japanese1' => 'jis0201-raw');
782              
783             With this code, "my-japanese1" becomes an alias for the existing
784             encoding 'jis0201-raw'.
785              
786             I18N::Charset::add_enco_alias('my-japanese2' => 'my-japanese1');
787              
788             With this code, "my-japanese2" becomes an alias for the encoding
789             referred to by the existing alias 'my-japanese1' (which happens to be
790             'jis0201-raw' after the previous call).
791              
792             =cut
793              
794             sub add_enco_alias
795             {
796 10     10 1 712 my ($sAlias, $sReal) = @_;
797 10         18 my $iDebug = 0;
798 10 50 50     55 print STDERR " + add_enco_alias($sAlias,$sReal)..." if ($iDebug || DEBUG_ENCO);
799 10         33 my $sName = enco_charset_name($sReal);
800 10 100       26 if (not defined($sName))
801             {
802 3         458 carp qq{attempt to alias "$sAlias" to unknown Encode charset "$sReal"};
803 3         39 return undef;
804             } # if
805 7         14 my $mib = _short_to_mib(_strip($sName));
806 7 50 50     47 print STDERR "sName=$sName...mib=$mib\n" if ($iDebug || DEBUG_ENCO);
807 7         19 $hsMIBofShortname{_strip($sAlias)} = $mib;
808 7         48 return $sName;
809             } # add_enco_alias
810              
811             #-----------------------------------------------------------------------
812              
813             =back
814              
815             =head1 KNOWN BUGS AND LIMITATIONS
816              
817             =over 4
818              
819             =item *
820              
821             There could probably be many more aliases added (for convenience) to
822             all the IANA names.
823             If you have some specific recommendations, please email the author!
824              
825             =item *
826              
827             The only character set names which have a corresponding mapping in the
828             Unicode::Map8 module are the character sets that Unicode::Map8 can
829             convert.
830              
831             Similarly, the only character set names which have a corresponding
832             mapping in the Unicode::Map module are the character sets that
833             Unicode::Map can convert.
834              
835             =item *
836              
837             In the current implementation, all tables are read in and initialized
838             when the module is loaded, and then held in memory until the program
839             exits. A "lazy" implementation (or a less-portable tied hash) might
840             lead to a shorter startup time. Suggestions, patches, comments are
841             always welcome!
842              
843             =back
844              
845             =head1 SEE ALSO
846              
847             =over 4
848              
849             =item Unicode::Map
850              
851             Convert strings from various multi-byte character encodings to and from Unicode.
852              
853             =item Unicode::Map8
854              
855             Convert strings from various 8-bit character encodings to and from Unicode.
856              
857             =item Jcode
858              
859             Convert strings among various Japanese character encodings and Unicode.
860              
861             =item Unicode::MapUTF8
862              
863             A wrapper around all three of these character set conversion distributions.
864              
865             =back
866              
867             =head1 AUTHOR
868              
869             Martin 'Kingpin' Thurn, C, L.
870              
871             =head1 LICENSE
872              
873             This module is free software; you can redistribute it and/or
874             modify it under the same terms as Perl itself.
875              
876             =cut
877              
878             #-----------------------------------------------------------------------
879              
880             sub _strip
881             {
882 33597     33597   50317 my $s = lc(shift);
883 33597         48102 $s =~ tr/[0-9a-zA-Z]//dc;
884 33597         95138 return $s;
885             } # _strip
886              
887             # initialization code - stuff the DATA into some data structure
888              
889             # The only reason this is a while loop is so that I can bail out
890             # (e.g. for debugging) without using goto ;-)
891             INITIALIZATION:
892             {
893             my ($sName, $iMIB, $sAlias, $mimename);
894             my $iDebug = 0;
895             # I used to use the __DATA__ mechanism to initialize the data, but
896             # that is not compatible with perlapp. NOTE that storing the IANA
897             # charset data as a file separate from this module code will not
898             # work with perlapp either!
899             my $s = _init_data();
900             my $iRecord = 0;
901             RECORD:
902             while ($s =~ m//gs)
903             {
904             my $sRecord = $1;
905             $iRecord++;
906             if ($sRecord !~ m/(.+?)<\/name>/)
907             {
908             warn " WWW found record with no name.\n";
909             next RECORD;
910             } # if
911             my $sName = $1;
912             if ($sRecord !~ m/(\d+)<\/value>/)
913             {
914             warn " WWW found record '$sName' with no value.\n";
915             next RECORD;
916             } # if
917             my $iMIB = $1;
918             if ($sRecord =~ m/(.+?)<\/preferred_alias>/)
919             {
920             $hsMIMEofMIB{$iMIB} = $1;
921             $hsMIBofShortname{_strip($1)} = $iMIB;
922             }
923             else
924             {
925             # warn " WWW found record '$sName' with no preferred alias.\n";
926             } # if
927             my $sMime = $1;
928             $hsLongnameOfMIB{$iMIB} = $sName;
929             $hsMIBofLongname{$sName} = $iMIB;
930             # warn " DDD '$sName' ==> $iMIB\n";
931             $hsMIBofShortname{_strip($sName)} = $iMIB;
932             ALIAS:
933             while ($sRecord =~ m/(.+?)<\/alias>/g)
934             {
935             my $sAlias = $1;
936             $hsMIBofShortname{_strip($sAlias)} = $iMIB;
937             } # while ALIAS
938             } # while RECORD
939             # Now that we have all the standard definitions, process the special
940             # === directives:
941             my @asEqualLines = split(/\n/, _init_data_extra());
942             chomp @asEqualLines;
943             EQUAL_LINE:
944             foreach my $sLine (@asEqualLines)
945             {
946             next if ($sLine =~ m!\A#!);
947             # print STDERR " + equal-sign line $sLine...\n";
948             my @as = split(/\ ===\ /, $sLine);
949             my $sName = shift @as || q{};
950             next unless $sName ne '';
951             my $iMIB = $hsMIBofShortname{_strip($sName)} || 0;
952             if (! $iMIB)
953             {
954             print STDERR " EEE can not find IANA entry for equal-sign directive $sName\n";
955             next EQUAL_LINE;
956             } # unless
957             EQUAL_ITEM:
958             foreach my $s (@as)
959             {
960             my $sStrip = _strip($s);
961             # print STDERR " + $sStrip --> $iMIB\n";
962             $hsMIBofShortname{$sStrip} = $iMIB;
963             } # foreach EQUAL_ITEM
964             } # foreach EQUAL_LINE
965              
966             # last; # for debugging
967              
968             if (eval "require Unicode::Map8")
969             {
970             # $iDebug = 1;
971             my $sDir = $Unicode::Map8::MAPS_DIR;
972             my $sAliasesFname = "$sDir/aliases";
973             # Ah, how to get all the Unicode::Map8 supported charsets... It
974             # sure ain't easy! The aliases file in the MAPS_DIR has a nice
975             # set of aliases, but since some charsets have no aliases, they're
976             # not listed in the aliases file! Ergo, we have to read the
977             # aliases file *and* all the file names in the MAPS_DIR!
978             push @asMap8Debug, " DDD found Unicode::Map8 installed, will build map8 tables based on $sAliasesFname and files in that directory...\n";
979             # First, read all the files in the MAPS_DIR folder and register in our local data structures:
980             if (opendir(DIR, $sDir))
981             {
982             my @asFname = grep(!/^\.\.?$/, readdir(DIR));
983             foreach my $sLong (@asFname)
984             {
985             next unless -f "$Unicode::Map8::MAPS_DIR/$sLong";
986             $sLong =~ s/\.(?:bin|txt)$//;
987             # Try to find the official IANA name for this encoding:
988             push @asMap8Debug, " DDD looking for $sLong in iana table...\n";
989             my $sFound = '';
990             if (defined (my $sTemp = iana_charset_name($sLong)))
991             {
992             $sFound = $sTemp;
993             } # if
994             if ($sFound eq '')
995             {
996             # $iDebug = 1;
997             $iMIB = $sFakeMIB++;
998             push @asMap8Debug, " DDD had to use a dummy mib ($iMIB) for U::Map8==$sLong==\n";
999             $hsMIBofLongname{$sLong} = $iMIB;
1000             } # unless
1001             else
1002             {
1003             $iMIB = $hsMIBofLongname{$sFound};
1004             push @asMap8Debug, " DDD found IANA name $sFound ($iMIB) for Map8 entry $sLong\n";
1005             }
1006             # Make this IANA mib map to this Map8 name:
1007             push @asMap8Debug, " DDD map $iMIB to $sLong in MIBtoMAP8...\n";
1008             $MIBtoMAP8{$iMIB} = $sLong;
1009             my $s = _strip($sLong);
1010             push @asMap8Debug, " DDD map $s to $iMIB in hsMIBofShortname...\n";
1011             $hsMIBofShortname{$s} = $iMIB;
1012             } # foreach
1013             } # if
1014             # Now, go through the Unicode::Map8 aliases hash and process the aliases:
1015             my $avoid_warning = keys %Unicode::Map8::ALIASES;
1016             while (my ($alias, $charset) = each %Unicode::Map8::ALIASES)
1017             {
1018             my $iMIB = charset_name_to_mib($charset); # qqq
1019             my $s = _strip($alias);
1020             push @asMap8Debug, " DDD map $s to $iMIB in hsMIBofShortname...\n";
1021             $hsMIBofShortname{$s} = $iMIB;
1022             } # while
1023             # If there are special cases for Unicode::Map8, add them here:
1024             add_map8_alias('ISO_8859-13:1998', 'ISO_8859-13');
1025             add_map8_alias('L 7', 'ISO_8859-13');
1026             add_map8_alias('Latin 7', 'ISO_8859-13');
1027             add_map8_alias('ISO_8859-15:1998', 'ISO_8859-15');
1028             add_map8_alias('L 0', 'ISO_8859-15');
1029             add_map8_alias('Latin 0', 'ISO_8859-15');
1030             add_map8_alias('L 9', 'ISO_8859-15');
1031             add_map8_alias('Latin 9', 'ISO_8859-15');
1032             add_map8_alias('ISO-8859-1-Windows-3.1-Latin-1', 'cp1252');
1033             add_map8_alias('csWindows31Latin1', 'cp1252');
1034             # Above aliases were described in RT#18802
1035             push @asMap8Debug, "done.\n";
1036             print STDERR @asMap8Debug if $iDebug;
1037             } # if Unicode::Map8 installed
1038              
1039             # last; # for debugging
1040              
1041             # $iDebug = 1;
1042             if (eval "require Unicode::Map")
1043             {
1044             print STDERR " + found Unicode::Map installed, will build tables..." if $iDebug;
1045             my $MAP_Path = $INC{'Unicode/Map.pm'};
1046             $MAP_Path =~ s/\.pm//;
1047             my $sMapFile = "$MAP_Path/REGISTRY";
1048             if (open MAPS, $sMapFile)
1049             {
1050             local $/ = undef;
1051             my @asMAPS = split(/\n\s*\n/, );
1052             UMAP_ENTRY:
1053             foreach my $sEntry (@asMAPS)
1054             {
1055             $iDebug = 0;
1056             # print STDERR " + working on Umap entry >>>>>$sEntry<<<<<...\n";
1057             my ($sName, $iMIB) = ('', '');
1058             # Get the value of the name field, and skip entries with no name:
1059             next UMAP_ENTRY unless $sEntry =~ m!^name:\s+(\S+)!mi;
1060             $sName = $1;
1061             # $iDebug = ($sName =~ m!apple!);
1062             print STDERR " + UMAP sName is $sName\n" if $iDebug;
1063             my @asAlias = split /\n/, $sEntry;
1064             @asAlias = map { /alias:\s+(.*)/; $1 } (grep /alias/, @asAlias);
1065             # See if this entry already has the MIB identified:
1066             if ($sEntry =~ m!^#mib:\s+(\d+)!mi)
1067             {
1068             $iMIB = $1;
1069             } # if
1070             else
1071             {
1072             # This entry does not have the MIB listed. See if the name
1073             # of any of the aliases are known to our iana tables:
1074             UMAP_ALIAS:
1075             foreach my $sAlias ($sName, @asAlias)
1076             {
1077             print STDERR " + try alias $sAlias\n" if $iDebug;
1078             my $iMIBtry = _short_to_mib(_strip($sAlias));
1079             if ($iMIBtry)
1080             {
1081             print STDERR " + matched\n" if $iDebug;
1082             $iMIB = $iMIBtry;
1083             last UMAP_ALIAS;
1084             } # if
1085             } # foreach
1086             # If nothing matched, create a dummy mib:
1087             if ($iMIB eq '')
1088             {
1089             $iMIB = $sFakeMIB++;
1090             print STDERR " + had to use a dummy mib ($iMIB) for U::Map==$sName==\n" if $iDebug;
1091             } # if
1092             } # else
1093             # $iDebug = ($iMIB =~ m!225[23]!);
1094             # $iDebug = ($iMIB eq '17');
1095             print STDERR " + UMAP mib is $iMIB\n" if $iDebug;
1096             $MIBtoUMAP{$iMIB} = $sName;
1097             $hsMIBofLongname{$sName} ||= $iMIB;
1098             $hsMIBofShortname{_strip($sName)} ||= $iMIB;
1099             foreach my $sAlias (@asAlias)
1100             {
1101             print STDERR " + UMAP alias $sAlias\n" if $iDebug;
1102             $hsMIBofShortname{_strip($sAlias)} = $iMIB;
1103             } # foreach $sAlias
1104             } # foreach UMAP_ENTRY
1105             close MAPS;
1106             # print STDERR "\n + MIBtoUMAP{dummymib029} == $MIBtoUMAP{$sDummy .'029'}\n\n";
1107             } # if open
1108             else
1109             {
1110             carp " --- couldn't open $sMapFile for read" if $iDebug;
1111             }
1112             # If there are special cases for Unicode::Map, add them here:
1113             # add_umap_alias("new-name", "existing-name");
1114             print STDERR "done.\n" if $iDebug;
1115             } # if Unicode::Map installed
1116              
1117             # Make sure to do U::MapUTF8 last, because it (in turn) depends on
1118             # the others.
1119             # $iDebug = 1;
1120             if (1.0 <= (eval q{ require Unicode::MapUTF8; $Unicode::MapUTF8::VERSION } || 0))
1121             {
1122             print STDERR " + found Unicode::MapUTF8 $Unicode::MapUTF8::VERSION installed, will build tables...\n" if $iDebug;
1123             my @as;
1124             # Wrap this in an eval to avoid compiler warning(?):
1125             eval { @as = Unicode::MapUTF8::utf8_supported_charset() };
1126             UMU8_NAME:
1127             foreach my $sName (@as)
1128             {
1129             # $iDebug = ($sName =~ m!jis!i);
1130             print STDERR " + working on UmapUTF8 entry >>>>>$sName<<<<<...\n" if $iDebug;
1131             my $s = iana_charset_name($sName) || '';
1132             if ($s ne '')
1133             {
1134             # print STDERR " + iana name is >>>>>$s<<<<<...\n" if $iDebug;
1135             $MIBtoUMU8{charset_name_to_mib($s)} = $sName;
1136             next UMU8_NAME;
1137             } # if already maps to IANA
1138             # print STDERR " + UmapUTF8 entry ===$sName=== has no iana entry\n" if $iDebug;
1139             $s = umap_charset_name($sName) || '';
1140             if ($s ne '')
1141             {
1142             print STDERR " + U::Map name is >>>>>$s<<<<<...\n" if $iDebug;
1143             $MIBtoUMU8{charset_name_to_mib($s)} = $sName;
1144             next UMU8_NAME;
1145             } # if maps to U::Map
1146             # print STDERR " + UmapUTF8 entry ==$sName== has no U::Map entry\n" if $iDebug;
1147             $s = map8_charset_name($sName) || '';
1148             if ($s ne '')
1149             {
1150             print STDERR " + U::Map8 name is >>>>>$s<<<<<...\n" if $iDebug;
1151             $MIBtoUMU8{charset_name_to_mib($s)} = $sName;
1152             next UMU8_NAME;
1153             } # if maps to U::Map8
1154             print STDERR " + UmapUTF8 entry ==$sName== has no entries at all\n" if $iDebug;
1155             } # foreach
1156             # If there are special cases for Unicode::MapUTF8, add them here:
1157             # add_umap_alias("new-name", "existing-name");
1158             print STDERR "done.\n" if $iDebug;
1159             } # if Unicode::MapUTF8 installed
1160              
1161             # Initialization is all finished:
1162             last;
1163             # Below here is debugging code:
1164              
1165             print STDERR " + the following IANA names do *not* have entries in the Map8 table:\n";
1166             my %hiTried = ();
1167             foreach my $sIANA (sort values %hsLongnameOfMIB)
1168             {
1169             next if $hiTried{$sIANA};
1170             print "$sIANA\n" unless defined map8_charset_name($sIANA);
1171             $hiTried{$sIANA}++;
1172             } # foreach
1173              
1174             # last; # for debugging
1175              
1176             # debugging: selective dump:
1177             print STDERR " + after init, iana_charset_name returns:\n";
1178             foreach my $key (qw(cp1251 windows-1251 WinCyrillic sjis x-sjis Shift_JIS ASCII US-ASCII us-ascii iso-2022-jp iso-8859-1 Unicode-2-0-utf-8 EUC-KR big5 x-x-big5))
1179             {
1180             print STDERR " + $key => ", iana_charset_name($key) || 'undef', "\n";
1181             } # foreach
1182              
1183             # exit 88;
1184              
1185             print STDERR " + after init, map8_charset_name() returns:\n";
1186             foreach my $key (qw(cp1251 windows-1251 WinCyrillic sjis x-sjis Shift_JIS ASCII US-ASCII us-ascii iso-2022-jp iso-8859-1 Unicode-2-0-utf-8 EUC-KR big5 x-x-big5))
1187             {
1188             print STDERR " + $key => ", map8_charset_name($key) || 'undef', "\n";
1189             } # foreach
1190              
1191             last;
1192              
1193             # debugging: huge dump:
1194             # _dump_hash('hsLongnameOfMIB', \%hsLongnameOfMIB);
1195             # _dump_hash('hsMIBofLongname', \%hsMIBofLongname);
1196             # _dump_hash('hsMIBofShortname', \%hsMIBofShortname);
1197             foreach (keys %hsMIBofShortname)
1198             {
1199             print STDERR " + _short_to_long($_) == ", _short_to_long($_) || 'undef', "\n";
1200             } # foreach
1201              
1202             } # end of INITIALIZATION block
1203              
1204             sub _dump_hash
1205             {
1206 0     0   0 my ($sName, $rh) = @_;
1207 0         0 print STDERR " + after initialization, $sName is:\n";
1208 0         0 foreach my $key (keys %$rh)
1209             {
1210 0         0 print STDERR " + $key => $$rh{$key}\n";
1211             } # foreach
1212             } # _dump_hash
1213              
1214             sub _init_data_extra
1215             {
1216             # This little piece of data is a hand-made list of IANA names and
1217             # aliases, in the form AAA === BBB === CCC, where AAA is the
1218             # canonical IANA name and BBB and CCC are aliases. Note that
1219             # capitalization and punctuation of aliases are meaningless (but
1220             # whitespace is not allowed).
1221 11     11   387 return <<'XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX';
1222              
1223             Shift_JIS === sjis
1224             windows-1250 === winlatin2 === cp1250
1225             windows-1251 === wincyrillic === cp1251
1226             windows-1252 === winlatin1 === cp1252
1227             windows-1253 === wingreek === cp1253
1228             windows-1254 === winturkish === cp1254
1229             windows-1255 === winhebrew === cp1255
1230             windows-1256 === winarabic === cp1256
1231             windows-1257 === winbaltic === cp1257
1232             windows-1258 === winvietnamese === cp1258
1233             Adobe-Standard-Encoding === adobe-standard
1234             Adobe-Symbol-Encoding === adobe-symbol
1235             EBCDIC-ES === ebcdic-cp-es
1236             EBCDIC-FR === ebcdic-cp-fr
1237             EBCDIC-IT === ebcdic-cp-it
1238             EBCDIC-UK === ebcdic-cp-gb
1239             EBCDIC-FI-SE === ebcdic-cp-fi
1240             UTF-7 === Unicode-2-0-utf-7
1241             UTF-8 === Unicode-2-0-utf-8
1242             Extended_UNIX_Code_Packed_Format_for_Japanese === euc === euc-jp
1243             # These are for Unicode::MapUTF8:
1244             ISO-10646-UCS-2 === ucs2
1245             ISO-10646-UCS-4 === ucs4
1246             # These are for iconv:
1247             ISO-2022-JP === ISO-2022-JP-1
1248             # These are for Encode:
1249             IBM1047 === cp1047
1250             GB2312 === gb2312-raw
1251             HZ-GB-2312 === hz
1252             JIS_X0201 === jis0201-raw
1253             JIS_C6226-1983 === jis0208-raw
1254             JIS_X0212-1990 === jis0212-raw
1255             KS_C_5601-1987 === ksc5601-raw
1256             CP037 === CP37
1257             cp863 === DOSCanadaF
1258             cp860 === DOSPortuguese
1259             cp869 === DOSGreek2
1260             koi8-r === cp878
1261             # These encodings are handled by Encode, but I don't know what they are:
1262             # ??? === AdobeZdingbats
1263             # ??? === MacArabic
1264             # ??? === MacCentralEurRoman
1265             # ??? === MacChineseSimp
1266             # ??? === MacChineseTrad
1267             # ??? === MacCroatian
1268             # ??? === MacCyrillic
1269             # ??? === MacDingbats
1270             # ??? === MacFarsi
1271             # ??? === MacGreek
1272             # ??? === MacHebrew
1273             # ??? === MacIcelandic
1274             # ??? === MacJapanese
1275             # ??? === MacKorean
1276             # ??? === MacRomanian
1277             # ??? === MacRumanian
1278             # ??? === MacSami
1279             # ??? === MacThai
1280             # ??? === MacTurkish
1281             # ??? === MacUkrainian
1282             # ??? === MacVietnamese
1283             # ??? === cp1006
1284             # ??? === dingbats
1285             # ??? === nextstep
1286             # ??? === posix-bc
1287             # The following aliases are listed in RT#18802:
1288             ISO-8859-10 === 8859-10 === ISO_8859-10:1993
1289             # TCVN-5712 x-viet-tcvn viet-tcvn VN-1 TCVN-5712:1993
1290             TIS-620 === TIS_620-2553 === TIS_620-2553:1990
1291             # VPS x-viet-vps viet-vps
1292             # The above aliases are listed in RT#18802
1293             XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
1294             } # _init_data_extra
1295              
1296              
1297             sub _init_data
1298             {
1299             # This big piece of data is the original document from
1300             # http://www.iana.org/assignments/character-sets
1301 11     11   28 return <<'EEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEE';
1302            
1303            
1304            
1305            
1306             2021-01-04
1307             Character Sets
1308             Character Sets
1309              
1310            
1311             Character Sets
1312            
1313             Expert Review
1314             Ned Freed (primary), Martin Dürst (secondary)
1315             These are the official names for character sets that may be used in
1316             the Internet and may be referred to in Internet documentation. These
1317             names are expressed in ANSI_X3.4-1968 which is commonly called
1318             US-ASCII or simply ASCII. The character set most commonly use in the
1319             Internet and used especially in protocol standards is US-ASCII, this
1320             is strongly encouraged. The use of the name US-ASCII is also
1321             encouraged.
1322              
1323             The character set names may be up to 40 characters taken from the
1324             printable characters of US-ASCII. However, no distinction is made
1325             between use of upper and lower case letters.
1326              
1327             The MIBenum value is a unique value for use in MIBs to identify coded
1328             character sets.
1329              
1330             The value space for MIBenum values has been divided into three
1331             regions. The first region (3-999) consists of coded character sets
1332             that have been standardized by some standard setting organization.
1333             This region is intended for standards that do not have subset
1334             implementations. The second region (1000-1999) is for the Unicode and
1335             ISO/IEC 10646 coded character sets together with a specification of a
1336             (set of) sub-repertoires that may occur. The third region (>1999) is
1337             intended for vendor specific coded character sets.
1338              
1339             Assigned MIB enum Numbers
1340             -------------------------
1341             0-2 Reserved
1342             3-999 Set By Standards Organizations
1343             1000-1999 Unicode / 10646
1344             2000-2999 Vendor
1345              
1346             The aliases that start with "cs" have been added for use with the
1347             IANA-CHARSET-MIB as originally defined in , and as currently
1348             maintained by IANA at .
1349             Note that the ianacharset-mib needs to be kept in sync with this
1350             registry. These aliases that start with "cs" contain the standard
1351             numbers along with suggestive names in order to facilitate applications
1352             that want to display the names in user interfaces. The "cs" stands
1353             for character set and is provided for applications that need a lower
1354             case first letter but want to use mixed case thereafter that cannot
1355             contain any special characters, such as underbar ("_") and dash ("-").
1356              
1357             If the character set is from an ISO standard, its cs alias is the ISO
1358             standard number or name. If the character set is not from an ISO
1359             standard, but is registered with ISO (IPSJ/ITSCJ is the current ISO
1360             Registration Authority), the ISO Registry number is specified as
1361             ISOnnn followed by letters suggestive of the name or standards number
1362             of the code set. When a national or international standard is
1363             revised, the year of revision is added to the cs alias of the new
1364             character set entry in the IANA Registry in order to distinguish the
1365             revised character set from the original character set.
1366            
1367              
1368            
1369             US-ASCII
1370            
1371             3
1372             ANSI X3.4-1986
1373             iso-ir-6
1374             ANSI_X3.4-1968
1375             ANSI_X3.4-1986
1376             ISO_646.irv:1991
1377             ISO646-US
1378             US-ASCII
1379             us
1380             IBM367
1381             cp367
1382             csASCII
1383             US-ASCII
1384            
1385            
1386             ISO_8859-1:1987
1387            
1388            
1389             4
1390            
1391             ISO-IR: International Register of Escape Sequences
1392             Note: The current registration authority is IPSJ/ITSCJ, Japan.
1393            
1394             iso-ir-100
1395             ISO_8859-1
1396             ISO-8859-1
1397             latin1
1398             l1
1399             IBM819
1400             CP819
1401             csISOLatin1
1402             ISO-8859-1
1403            
1404            
1405             ISO_8859-2:1987
1406            
1407            
1408             5
1409            
1410             ISO-IR: International Register of Escape Sequences
1411             Note: The current registration authority is IPSJ/ITSCJ, Japan.
1412            
1413             iso-ir-101
1414             ISO_8859-2
1415             ISO-8859-2
1416             latin2
1417             l2
1418             csISOLatin2
1419             ISO-8859-2
1420            
1421            
1422             ISO_8859-3:1988
1423            
1424            
1425             6
1426            
1427             ISO-IR: International Register of Escape Sequences
1428             Note: The current registration authority is IPSJ/ITSCJ, Japan.
1429            
1430             iso-ir-109
1431             ISO_8859-3
1432             ISO-8859-3
1433             latin3
1434             l3
1435             csISOLatin3
1436             ISO-8859-3
1437            
1438            
1439             ISO_8859-4:1988
1440            
1441            
1442             7
1443            
1444             ISO-IR: International Register of Escape Sequences
1445             Note: The current registration authority is IPSJ/ITSCJ, Japan.
1446            
1447             iso-ir-110
1448             ISO_8859-4
1449             ISO-8859-4
1450             latin4
1451             l4
1452             csISOLatin4
1453             ISO-8859-4
1454            
1455            
1456             ISO_8859-5:1988
1457            
1458            
1459             8
1460            
1461             ISO-IR: International Register of Escape Sequences
1462             Note: The current registration authority is IPSJ/ITSCJ, Japan.
1463            
1464             iso-ir-144
1465             ISO_8859-5
1466             ISO-8859-5
1467             cyrillic
1468             csISOLatinCyrillic
1469             ISO-8859-5
1470            
1471            
1472             ISO_8859-6:1987
1473            
1474            
1475             9
1476            
1477             ISO-IR: International Register of Escape Sequences
1478             Note: The current registration authority is IPSJ/ITSCJ, Japan.
1479            
1480             iso-ir-127
1481             ISO_8859-6
1482             ISO-8859-6
1483             ECMA-114
1484             ASMO-708
1485             arabic
1486             csISOLatinArabic
1487             ISO-8859-6
1488            
1489            
1490             ISO_8859-7:1987
1491            
1492            
1493            
1494             10
1495            
1496             ISO-IR: International Register of Escape Sequences
1497             Note: The current registration authority is IPSJ/ITSCJ, Japan.
1498            
1499             iso-ir-126
1500             ISO_8859-7
1501             ISO-8859-7
1502             ELOT_928
1503             ECMA-118
1504             greek
1505             greek8
1506             csISOLatinGreek
1507             ISO-8859-7
1508            
1509            
1510             ISO_8859-8:1988
1511            
1512            
1513             11
1514            
1515             ISO-IR: International Register of Escape Sequences
1516             Note: The current registration authority is IPSJ/ITSCJ, Japan.
1517            
1518             iso-ir-138
1519             ISO_8859-8
1520             ISO-8859-8
1521             hebrew
1522             csISOLatinHebrew
1523             ISO-8859-8
1524            
1525            
1526             ISO_8859-9:1989
1527            
1528            
1529             12
1530            
1531             ISO-IR: International Register of Escape Sequences
1532             Note: The current registration authority is IPSJ/ITSCJ, Japan.
1533            
1534             iso-ir-148
1535             ISO_8859-9
1536             ISO-8859-9
1537             latin5
1538             l5
1539             csISOLatin5
1540             ISO-8859-9
1541            
1542            
1543             ISO-8859-10
1544            
1545            
1546             13
1547            
1548             ISO-IR: International Register of Escape Sequences
1549             Note: The current registration authority is IPSJ/ITSCJ, Japan.
1550            
1551             iso-ir-157
1552             l6
1553             ISO_8859-10:1992
1554             csISOLatin6
1555             latin6
1556             ISO-8859-10
1557            
1558            
1559             ISO_6937-2-add
1560            
1561            
1562             14
1563            
1564             ISO-IR: International Register of Escape Sequences and ISO 6937-2:1983
1565             Note: The current registration authority is IPSJ/ITSCJ, Japan.
1566            
1567             iso-ir-142
1568             csISOTextComm
1569            
1570            
1571             JIS_X0201
1572            
1573            
1574             15
1575             JIS X 0201-1976. One byte only, this is equivalent to
1576             JIS/Roman (similar to ASCII) plus eight-bit half-width
1577             Katakana
1578             X0201
1579             csHalfWidthKatakana
1580            
1581            
1582             JIS_Encoding
1583             16
1584             JIS X 0202-1991. Uses ISO 2022 escape sequences to
1585             shift code sets as documented in JIS X 0202-1991.
1586             csJISEncoding
1587            
1588            
1589             Shift_JIS
1590             17
1591             This charset is an extension of csHalfWidthKatakana by
1592             adding graphic characters in JIS X 0208. The CCS's are
1593             JIS X0201:1997 and JIS X0208:1997. The
1594             complete definition is shown in Appendix 1 of JIS
1595             X0208:1997.
1596             This charset can be used for the top-level media type "text".
1597             MS_Kanji
1598             csShiftJIS
1599             Shift_JIS
1600            
1601            
1602             Extended_UNIX_Code_Packed_Format_for_Japanese
1603             18
1604             Standardized by OSF, UNIX International, and UNIX Systems
1605             Laboratories Pacific. Uses ISO 2022 rules to select
1606             code set 0: US-ASCII (a single 7-bit byte set)
1607             code set 1: JIS X0208-1990 (a double 8-bit byte set)
1608             restricted to A0-FF in both bytes
1609             code set 2: Half Width Katakana (a single 7-bit byte set)
1610             requiring SS2 as the character prefix
1611             code set 3: JIS X0212-1990 (a double 7-bit byte set)
1612             restricted to A0-FF in both bytes
1613             requiring SS3 as the character prefix
1614             csEUCPkdFmtJapanese
1615             EUC-JP
1616             EUC-JP
1617            
1618            
1619             Extended_UNIX_Code_Fixed_Width_for_Japanese
1620             19
1621             Used in Japan. Each character is 2 octets.
1622             code set 0: US-ASCII (a single 7-bit byte set)
1623             1st byte = 00
1624             2nd byte = 20-7E
1625             code set 1: JIS X0208-1990 (a double 7-bit byte set)
1626             restricted to A0-FF in both bytes
1627             code set 2: Half Width Katakana (a single 7-bit byte set)
1628             1st byte = 00
1629             2nd byte = A0-FF
1630             code set 3: JIS X0212-1990 (a double 7-bit byte set)
1631             restricted to A0-FF in
1632             the first byte
1633             and 21-7E in the second byte
1634             csEUCFixWidJapanese
1635            
1636            
1637             BS_4730
1638            
1639            
1640             20
1641            
1642             ISO-IR: International Register of Escape Sequences
1643             Note: The current registration authority is IPSJ/ITSCJ, Japan.
1644            
1645             iso-ir-4
1646             ISO646-GB
1647             gb
1648             uk
1649             csISO4UnitedKingdom
1650            
1651            
1652             SEN_850200_C
1653            
1654            
1655             21
1656            
1657             ISO-IR: International Register of Escape Sequences
1658             Note: The current registration authority is IPSJ/ITSCJ, Japan.
1659            
1660             iso-ir-11
1661             ISO646-SE2
1662             se2
1663             csISO11SwedishForNames
1664            
1665            
1666             IT
1667            
1668            
1669             22
1670            
1671             ISO-IR: International Register of Escape Sequences
1672             Note: The current registration authority is IPSJ/ITSCJ, Japan.
1673            
1674             iso-ir-15
1675             ISO646-IT
1676             csISO15Italian
1677            
1678            
1679             ES
1680            
1681            
1682             23
1683            
1684             ISO-IR: International Register of Escape Sequences
1685             Note: The current registration authority is IPSJ/ITSCJ, Japan.
1686            
1687             iso-ir-17
1688             ISO646-ES
1689             csISO17Spanish
1690            
1691            
1692             DIN_66003
1693            
1694            
1695             24
1696            
1697             ISO-IR: International Register of Escape Sequences
1698             Note: The current registration authority is IPSJ/ITSCJ, Japan.
1699            
1700             iso-ir-21
1701             de
1702             ISO646-DE
1703             csISO21German
1704            
1705            
1706             NS_4551-1
1707            
1708            
1709             25
1710            
1711             ISO-IR: International Register of Escape Sequences
1712             Note: The current registration authority is IPSJ/ITSCJ, Japan.
1713            
1714             iso-ir-60
1715             ISO646-NO
1716             no
1717             csISO60DanishNorwegian
1718             csISO60Norwegian1
1719            
1720            
1721             NF_Z_62-010
1722            
1723            
1724             26
1725            
1726             ISO-IR: International Register of Escape Sequences
1727             Note: The current registration authority is IPSJ/ITSCJ, Japan.
1728            
1729             iso-ir-69
1730             ISO646-FR
1731             fr
1732             csISO69French
1733            
1734            
1735             ISO-10646-UTF-1
1736             27
1737             Universal Transfer Format (1), this is the multibyte
1738             encoding, that subsets ASCII-7. It does not have byte
1739             ordering issues.
1740             csISO10646UTF1
1741            
1742            
1743             ISO_646.basic:1983
1744            
1745            
1746             28
1747            
1748             ISO-IR: International Register of Escape Sequences
1749             Note: The current registration authority is IPSJ/ITSCJ, Japan.
1750            
1751             ref
1752             csISO646basic1983
1753            
1754            
1755             INVARIANT
1756            
1757            
1758             29
1759             csINVARIANT
1760            
1761            
1762             ISO_646.irv:1983
1763            
1764            
1765             30
1766            
1767             ISO-IR: International Register of Escape Sequences
1768             Note: The current registration authority is IPSJ/ITSCJ, Japan.
1769            
1770             iso-ir-2
1771             irv
1772             csISO2IntlRefVersion
1773            
1774            
1775             NATS-SEFI
1776            
1777            
1778             31
1779            
1780             ISO-IR: International Register of Escape Sequences
1781             Note: The current registration authority is IPSJ/ITSCJ, Japan.
1782            
1783             iso-ir-8-1
1784             csNATSSEFI
1785            
1786            
1787             NATS-SEFI-ADD
1788            
1789            
1790             32
1791            
1792             ISO-IR: International Register of Escape Sequences
1793             Note: The current registration authority is IPSJ/ITSCJ, Japan.
1794            
1795             iso-ir-8-2
1796             csNATSSEFIADD
1797            
1798            
1799             NATS-DANO
1800            
1801            
1802             33
1803            
1804             ISO-IR: International Register of Escape Sequences
1805             Note: The current registration authority is IPSJ/ITSCJ, Japan.
1806            
1807             iso-ir-9-1
1808             csNATSDANO
1809            
1810            
1811             NATS-DANO-ADD
1812            
1813            
1814             34
1815            
1816             ISO-IR: International Register of Escape Sequences
1817             Note: The current registration authority is IPSJ/ITSCJ, Japan.
1818            
1819             iso-ir-9-2
1820             csNATSDANOADD
1821            
1822            
1823             SEN_850200_B
1824            
1825            
1826             35
1827            
1828             ISO-IR: International Register of Escape Sequences
1829             Note: The current registration authority is IPSJ/ITSCJ, Japan.
1830            
1831             iso-ir-10
1832             FI
1833             ISO646-FI
1834             ISO646-SE
1835             se
1836             csISO10Swedish
1837            
1838            
1839             KS_C_5601-1987
1840            
1841            
1842             36
1843            
1844             ISO-IR: International Register of Escape Sequences
1845             Note: The current registration authority is IPSJ/ITSCJ, Japan.
1846            
1847             iso-ir-149
1848             KS_C_5601-1989
1849             KSC_5601
1850             korean
1851             csKSC56011987
1852            
1853            
1854             ISO-2022-KR
1855            
1856            
1857             37
1858             (see also KS_C_5601-1987)
1859             csISO2022KR
1860             ISO-2022-KR
1861            
1862            
1863             EUC-KR
1864            
1865            
1866             38
1867             (see also KS_C_5861-1992)
1868             csEUCKR
1869             EUC-KR
1870            
1871            
1872             ISO-2022-JP
1873            
1874            
1875             39
1876             (see also )
1877             csISO2022JP
1878             ISO-2022-JP
1879            
1880            
1881             ISO-2022-JP-2
1882            
1883            
1884             40
1885            
1886            
1887            
1888             csISO2022JP2
1889             ISO-2022-JP-2
1890            
1891            
1892             JIS_C6220-1969-jp
1893            
1894            
1895             41
1896            
1897             ISO-IR: International Register of Escape Sequences
1898             Note: The current registration authority is IPSJ/ITSCJ, Japan.
1899            
1900             JIS_C6220-1969
1901             iso-ir-13
1902             katakana
1903             x0201-7
1904             csISO13JISC6220jp
1905            
1906            
1907             JIS_C6220-1969-ro
1908            
1909            
1910             42
1911            
1912             ISO-IR: International Register of Escape Sequences
1913             Note: The current registration authority is IPSJ/ITSCJ, Japan.
1914            
1915             iso-ir-14
1916             jp
1917             ISO646-JP
1918             csISO14JISC6220ro
1919            
1920            
1921             PT
1922            
1923            
1924             43
1925            
1926             ISO-IR: International Register of Escape Sequences
1927             Note: The current registration authority is IPSJ/ITSCJ, Japan.
1928            
1929             iso-ir-16
1930             ISO646-PT
1931             csISO16Portuguese
1932            
1933            
1934             greek7-old
1935            
1936            
1937             44
1938            
1939             ISO-IR: International Register of Escape Sequences
1940             Note: The current registration authority is IPSJ/ITSCJ, Japan.
1941            
1942             iso-ir-18
1943             csISO18Greek7Old
1944            
1945            
1946             latin-greek
1947            
1948            
1949             45
1950            
1951             ISO-IR: International Register of Escape Sequences
1952             Note: The current registration authority is IPSJ/ITSCJ, Japan.
1953            
1954             iso-ir-19
1955             csISO19LatinGreek
1956            
1957            
1958             NF_Z_62-010_(1973)
1959            
1960            
1961             46
1962            
1963             ISO-IR: International Register of Escape Sequences
1964             Note: The current registration authority is IPSJ/ITSCJ, Japan.
1965            
1966             iso-ir-25
1967             ISO646-FR1
1968             csISO25French
1969            
1970            
1971             Latin-greek-1
1972            
1973            
1974             47
1975            
1976             ISO-IR: International Register of Escape Sequences
1977             Note: The current registration authority is IPSJ/ITSCJ, Japan.
1978            
1979             iso-ir-27
1980             csISO27LatinGreek1
1981            
1982            
1983             ISO_5427
1984            
1985            
1986             48
1987            
1988             ISO-IR: International Register of Escape Sequences
1989             Note: The current registration authority is IPSJ/ITSCJ, Japan.
1990            
1991             iso-ir-37
1992             csISO5427Cyrillic
1993            
1994            
1995             JIS_C6226-1978
1996            
1997            
1998             49
1999            
2000             ISO-IR: International Register of Escape Sequences
2001             Note: The current registration authority is IPSJ/ITSCJ, Japan.
2002            
2003             iso-ir-42
2004             csISO42JISC62261978
2005            
2006            
2007             BS_viewdata
2008            
2009            
2010             50
2011            
2012             ISO-IR: International Register of Escape Sequences
2013             Note: The current registration authority is IPSJ/ITSCJ, Japan.
2014            
2015             iso-ir-47
2016             csISO47BSViewdata
2017            
2018            
2019             INIS
2020            
2021            
2022             51
2023            
2024             ISO-IR: International Register of Escape Sequences
2025             Note: The current registration authority is IPSJ/ITSCJ, Japan.
2026            
2027             iso-ir-49
2028             csISO49INIS
2029            
2030            
2031             INIS-8
2032            
2033            
2034             52
2035            
2036             ISO-IR: International Register of Escape Sequences
2037             Note: The current registration authority is IPSJ/ITSCJ, Japan.
2038            
2039             iso-ir-50
2040             csISO50INIS8
2041            
2042            
2043             INIS-cyrillic
2044            
2045            
2046             53
2047            
2048             ISO-IR: International Register of Escape Sequences
2049             Note: The current registration authority is IPSJ/ITSCJ, Japan.
2050            
2051             iso-ir-51
2052             csISO51INISCyrillic
2053            
2054            
2055             ISO_5427:1981
2056            
2057            
2058             54
2059            
2060             ISO-IR: International Register of Escape Sequences
2061             Note: The current registration authority is IPSJ/ITSCJ, Japan.
2062            
2063             iso-ir-54
2064             ISO5427Cyrillic1981
2065             csISO54271981
2066            
2067            
2068             ISO_5428:1980
2069            
2070            
2071             55
2072            
2073             ISO-IR: International Register of Escape Sequences
2074             Note: The current registration authority is IPSJ/ITSCJ, Japan.
2075            
2076             iso-ir-55
2077             csISO5428Greek
2078            
2079            
2080             GB_1988-80
2081            
2082            
2083             56
2084            
2085             ISO-IR: International Register of Escape Sequences
2086             Note: The current registration authority is IPSJ/ITSCJ, Japan.
2087            
2088             iso-ir-57
2089             cn
2090             ISO646-CN
2091             csISO57GB1988
2092            
2093            
2094             GB_2312-80
2095            
2096            
2097             57
2098            
2099             ISO-IR: International Register of Escape Sequences
2100             Note: The current registration authority is IPSJ/ITSCJ, Japan.
2101            
2102             iso-ir-58
2103             chinese
2104             csISO58GB231280
2105            
2106            
2107             NS_4551-2
2108            
2109            
2110             58
2111            
2112             ISO-IR: International Register of Escape Sequences
2113             Note: The current registration authority is IPSJ/ITSCJ, Japan.
2114            
2115             ISO646-NO2
2116             iso-ir-61
2117             no2
2118             csISO61Norwegian2
2119            
2120            
2121             videotex-suppl
2122            
2123            
2124             59
2125            
2126             ISO-IR: International Register of Escape Sequences
2127             Note: The current registration authority is IPSJ/ITSCJ, Japan.
2128            
2129             iso-ir-70
2130             csISO70VideotexSupp1
2131            
2132            
2133             PT2
2134            
2135            
2136             60
2137            
2138             ISO-IR: International Register of Escape Sequences
2139             Note: The current registration authority is IPSJ/ITSCJ, Japan.
2140            
2141             iso-ir-84
2142             ISO646-PT2
2143             csISO84Portuguese2
2144            
2145            
2146             ES2
2147            
2148            
2149             61
2150            
2151             ISO-IR: International Register of Escape Sequences
2152             Note: The current registration authority is IPSJ/ITSCJ, Japan.
2153            
2154             iso-ir-85
2155             ISO646-ES2
2156             csISO85Spanish2
2157            
2158            
2159             MSZ_7795.3
2160            
2161            
2162             62
2163            
2164             ISO-IR: International Register of Escape Sequences
2165             Note: The current registration authority is IPSJ/ITSCJ, Japan.
2166            
2167             iso-ir-86
2168             ISO646-HU
2169             hu
2170             csISO86Hungarian
2171            
2172            
2173             JIS_C6226-1983
2174            
2175            
2176             63
2177            
2178             ISO-IR: International Register of Escape Sequences
2179             Note: The current registration authority is IPSJ/ITSCJ, Japan.
2180            
2181             iso-ir-87
2182             x0208
2183             JIS_X0208-1983
2184             csISO87JISX0208
2185            
2186            
2187             greek7
2188            
2189            
2190             64
2191            
2192             ISO-IR: International Register of Escape Sequences
2193             Note: The current registration authority is IPSJ/ITSCJ, Japan.
2194            
2195             iso-ir-88
2196             csISO88Greek7
2197            
2198            
2199             ASMO_449
2200            
2201            
2202             65
2203            
2204             ISO-IR: International Register of Escape Sequences
2205             Note: The current registration authority is IPSJ/ITSCJ, Japan.
2206            
2207             ISO_9036
2208             arabic7
2209             iso-ir-89
2210             csISO89ASMO449
2211            
2212            
2213             iso-ir-90
2214            
2215            
2216             66
2217            
2218             ISO-IR: International Register of Escape Sequences
2219             Note: The current registration authority is IPSJ/ITSCJ, Japan.
2220            
2221             csISO90
2222            
2223            
2224             JIS_C6229-1984-a
2225            
2226            
2227             67
2228            
2229             ISO-IR: International Register of Escape Sequences
2230             Note: The current registration authority is IPSJ/ITSCJ, Japan.
2231            
2232             iso-ir-91
2233             jp-ocr-a
2234             csISO91JISC62291984a
2235            
2236            
2237             JIS_C6229-1984-b
2238            
2239            
2240             68
2241            
2242             ISO-IR: International Register of Escape Sequences
2243             Note: The current registration authority is IPSJ/ITSCJ, Japan.
2244            
2245             iso-ir-92
2246             ISO646-JP-OCR-B
2247             jp-ocr-b
2248             csISO92JISC62991984b
2249            
2250            
2251             JIS_C6229-1984-b-add
2252            
2253            
2254             69
2255            
2256             ISO-IR: International Register of Escape Sequences
2257             Note: The current registration authority is IPSJ/ITSCJ, Japan.
2258            
2259             iso-ir-93
2260             jp-ocr-b-add
2261             csISO93JIS62291984badd
2262            
2263            
2264             JIS_C6229-1984-hand
2265            
2266            
2267             70
2268            
2269             ISO-IR: International Register of Escape Sequences
2270             Note: The current registration authority is IPSJ/ITSCJ, Japan.
2271            
2272             iso-ir-94
2273             jp-ocr-hand
2274             csISO94JIS62291984hand
2275            
2276            
2277             JIS_C6229-1984-hand-add
2278            
2279            
2280             71
2281            
2282             ISO-IR: International Register of Escape Sequences
2283             Note: The current registration authority is IPSJ/ITSCJ, Japan.
2284            
2285             iso-ir-95
2286             jp-ocr-hand-add
2287             csISO95JIS62291984handadd
2288            
2289            
2290             JIS_C6229-1984-kana
2291            
2292            
2293             72
2294            
2295             ISO-IR: International Register of Escape Sequences
2296             Note: The current registration authority is IPSJ/ITSCJ, Japan.
2297            
2298             iso-ir-96
2299             csISO96JISC62291984kana
2300            
2301            
2302             ISO_2033-1983
2303            
2304            
2305             73
2306            
2307             ISO-IR: International Register of Escape Sequences
2308             Note: The current registration authority is IPSJ/ITSCJ, Japan.
2309            
2310             iso-ir-98
2311             e13b
2312             csISO2033
2313            
2314            
2315             ANSI_X3.110-1983
2316            
2317            
2318             74
2319            
2320             ISO-IR: International Register of Escape Sequences
2321             Note: The current registration authority is IPSJ/ITSCJ, Japan.
2322            
2323             iso-ir-99
2324             CSA_T500-1983
2325             NAPLPS
2326             csISO99NAPLPS
2327            
2328            
2329             T.61-7bit
2330            
2331            
2332             75
2333            
2334             ISO-IR: International Register of Escape Sequences
2335             Note: The current registration authority is IPSJ/ITSCJ, Japan.
2336            
2337             iso-ir-102
2338             csISO102T617bit
2339            
2340            
2341             T.61-8bit
2342            
2343            
2344             76
2345            
2346             ISO-IR: International Register of Escape Sequences
2347             Note: The current registration authority is IPSJ/ITSCJ, Japan.
2348            
2349             T.61
2350             iso-ir-103
2351             csISO103T618bit
2352            
2353            
2354             ECMA-cyrillic
2355             77
2356             ISO registry
2357            
2358             iso-ir-111
2359             KOI8-E
2360             csISO111ECMACyrillic
2361            
2362            
2363             CSA_Z243.4-1985-1
2364            
2365            
2366             78
2367            
2368             ISO-IR: International Register of Escape Sequences
2369             Note: The current registration authority is IPSJ/ITSCJ, Japan.
2370            
2371             iso-ir-121
2372             ISO646-CA
2373             csa7-1
2374             csa71
2375             ca
2376             csISO121Canadian1
2377            
2378            
2379             CSA_Z243.4-1985-2
2380            
2381            
2382             79
2383            
2384             ISO-IR: International Register of Escape Sequences
2385             Note: The current registration authority is IPSJ/ITSCJ, Japan.
2386            
2387             iso-ir-122
2388             ISO646-CA2
2389             csa7-2
2390             csa72
2391             csISO122Canadian2
2392            
2393            
2394             CSA_Z243.4-1985-gr
2395            
2396            
2397             80
2398            
2399             ISO-IR: International Register of Escape Sequences
2400             Note: The current registration authority is IPSJ/ITSCJ, Japan.
2401            
2402             iso-ir-123
2403             csISO123CSAZ24341985gr
2404            
2405            
2406             ISO_8859-6-E
2407            
2408            
2409             81
2410            
2411            
2412            
2413             csISO88596E
2414             ISO-8859-6-E
2415             ISO-8859-6-E
2416            
2417            
2418             ISO_8859-6-I
2419            
2420            
2421             82
2422            
2423            
2424            
2425             csISO88596I
2426             ISO-8859-6-I
2427             ISO-8859-6-I
2428            
2429            
2430             T.101-G2
2431            
2432            
2433             83
2434            
2435             ISO-IR: International Register of Escape Sequences
2436             Note: The current registration authority is IPSJ/ITSCJ, Japan.
2437            
2438             iso-ir-128
2439             csISO128T101G2
2440            
2441            
2442             ISO_8859-8-E
2443            
2444            
2445             84
2446            
2447            
2448            
2449             csISO88598E
2450             ISO-8859-8-E
2451             ISO-8859-8-E
2452            
2453            
2454             ISO_8859-8-I
2455            
2456            
2457             85
2458            
2459            
2460            
2461             csISO88598I
2462             ISO-8859-8-I
2463             ISO-8859-8-I
2464            
2465            
2466             CSN_369103
2467            
2468            
2469             86
2470            
2471             ISO-IR: International Register of Escape Sequences
2472             Note: The current registration authority is IPSJ/ITSCJ, Japan.
2473            
2474             iso-ir-139
2475             csISO139CSN369103
2476            
2477            
2478             JUS_I.B1.002
2479            
2480            
2481             87
2482            
2483             ISO-IR: International Register of Escape Sequences
2484             Note: The current registration authority is IPSJ/ITSCJ, Japan.
2485            
2486             iso-ir-141
2487             ISO646-YU
2488             js
2489             yu
2490             csISO141JUSIB1002
2491            
2492            
2493             IEC_P27-1
2494            
2495            
2496             88
2497            
2498             ISO-IR: International Register of Escape Sequences
2499             Note: The current registration authority is IPSJ/ITSCJ, Japan.
2500            
2501             iso-ir-143
2502             csISO143IECP271
2503            
2504            
2505             JUS_I.B1.003-serb
2506            
2507            
2508             89
2509            
2510             ISO-IR: International Register of Escape Sequences
2511             Note: The current registration authority is IPSJ/ITSCJ, Japan.
2512            
2513             iso-ir-146
2514             serbian
2515             csISO146Serbian
2516            
2517            
2518             JUS_I.B1.003-mac
2519            
2520            
2521             90
2522            
2523             ISO-IR: International Register of Escape Sequences
2524             Note: The current registration authority is IPSJ/ITSCJ, Japan.
2525            
2526             macedonian
2527             iso-ir-147
2528             csISO147Macedonian
2529            
2530            
2531             greek-ccitt
2532            
2533            
2534             91
2535            
2536             ISO-IR: International Register of Escape Sequences
2537             Note: The current registration authority is IPSJ/ITSCJ, Japan.
2538            
2539             iso-ir-150
2540             csISO150
2541             csISO150GreekCCITT
2542            
2543            
2544             NC_NC00-10:81
2545            
2546            
2547             92
2548            
2549             ISO-IR: International Register of Escape Sequences
2550             Note: The current registration authority is IPSJ/ITSCJ, Japan.
2551            
2552             cuba
2553             iso-ir-151
2554             ISO646-CU
2555             csISO151Cuba
2556            
2557            
2558             ISO_6937-2-25
2559            
2560            
2561             93
2562            
2563             ISO-IR: International Register of Escape Sequences
2564             Note: The current registration authority is IPSJ/ITSCJ, Japan.
2565            
2566             iso-ir-152
2567             csISO6937Add
2568            
2569            
2570             GOST_19768-74
2571            
2572            
2573             94
2574            
2575             ISO-IR: International Register of Escape Sequences
2576             Note: The current registration authority is IPSJ/ITSCJ, Japan.
2577            
2578             ST_SEV_358-88
2579             iso-ir-153
2580             csISO153GOST1976874
2581            
2582            
2583             ISO_8859-supp
2584            
2585            
2586             95
2587            
2588             ISO-IR: International Register of Escape Sequences
2589             Note: The current registration authority is IPSJ/ITSCJ, Japan.
2590            
2591             iso-ir-154
2592             latin1-2-5
2593             csISO8859Supp
2594            
2595            
2596             ISO_10367-box
2597            
2598            
2599             96
2600            
2601             ISO-IR: International Register of Escape Sequences
2602             Note: The current registration authority is IPSJ/ITSCJ, Japan.
2603            
2604             iso-ir-155
2605             csISO10367Box
2606            
2607            
2608             latin-lap
2609            
2610            
2611             97
2612            
2613             ISO-IR: International Register of Escape Sequences
2614             Note: The current registration authority is IPSJ/ITSCJ, Japan.
2615            
2616             lap
2617             iso-ir-158
2618             csISO158Lap
2619            
2620            
2621             JIS_X0212-1990
2622            
2623            
2624             98
2625            
2626             ISO-IR: International Register of Escape Sequences
2627             Note: The current registration authority is IPSJ/ITSCJ, Japan.
2628            
2629             x0212
2630             iso-ir-159
2631             csISO159JISX02121990
2632            
2633            
2634             DS_2089
2635            
2636            
2637             99
2638             Danish Standard, DS 2089, February 1974
2639             DS2089
2640             ISO646-DK
2641             dk
2642             csISO646Danish
2643            
2644            
2645             us-dk
2646            
2647            
2648             100
2649             csUSDK
2650            
2651            
2652             dk-us
2653            
2654            
2655             101
2656             csDKUS
2657            
2658            
2659             KSC5636
2660            
2661            
2662             102
2663             ISO646-KR
2664             csKSC5636
2665            
2666            
2667             UNICODE-1-1-UTF-7
2668            
2669             103
2670            
2671            
2672            
2673             csUnicode11UTF7
2674            
2675            
2676             ISO-2022-CN
2677            
2678             104
2679            
2680            
2681            
2682             csISO2022CN
2683            
2684            
2685             ISO-2022-CN-EXT
2686            
2687             105
2688            
2689            
2690            
2691             csISO2022CNEXT
2692            
2693            
2694             UTF-8
2695            
2696             106
2697            
2698            
2699            
2700             csUTF8
2701            
2702            
2703             ISO-8859-13
2704             109
2705             ISO See
2706             csISO885913
2707            
2708            
2709             ISO-8859-14
2710             110
2711             ISO See
2712             iso-ir-199
2713             ISO_8859-14:1998
2714             ISO_8859-14
2715             latin8
2716             iso-celtic
2717             l8
2718             csISO885914
2719            
2720            
2721             ISO-8859-15
2722             111
2723             ISO
2724             Please see:
2725             ISO_8859-15
2726             Latin-9
2727             csISO885915
2728            
2729            
2730             ISO-8859-16
2731             112
2732             ISO
2733             iso-ir-226
2734             ISO_8859-16:2001
2735             ISO_8859-16
2736             latin10
2737             l10
2738             csISO885916
2739            
2740            
2741             GBK
2742             113
2743             Chinese IT Standardization Technical Committee
2744             Please see:
2745             CP936
2746             MS936
2747             windows-936
2748             csGBK
2749            
2750            
2751             GB18030
2752             114
2753             Chinese IT Standardization Technical Committee
2754             Please see:
2755             csGB18030
2756            
2757            
2758             OSD_EBCDIC_DF04_15
2759             115
2760             Fujitsu-Siemens standard mainframe EBCDIC encoding
2761             Please see:
2762             csOSDEBCDICDF0415
2763            
2764            
2765             OSD_EBCDIC_DF03_IRV
2766             116
2767             Fujitsu-Siemens standard mainframe EBCDIC encoding
2768             Please see:
2769             csOSDEBCDICDF03IRV
2770            
2771            
2772             OSD_EBCDIC_DF04_1
2773             117
2774             Fujitsu-Siemens standard mainframe EBCDIC encoding
2775             Please see:
2776             csOSDEBCDICDF041
2777            
2778            
2779             ISO-11548-1
2780             118
2781             See
2782             ISO_11548-1
2783             ISO_TR_11548-1
2784             csISO115481
2785            
2786            
2787             KZ-1048
2788             119
2789             See
2790             STRK1048-2002
2791             RK1048
2792             csKZ1048
2793            
2794            
2795             ISO-10646-UCS-2
2796             1000
2797             the 2-octet Basic Multilingual Plane, aka Unicode
2798             this needs to specify network byte order: the standard
2799             does not specify (it is a 16-bit integer space)
2800             csUnicode
2801            
2802            
2803             ISO-10646-UCS-4
2804             1001
2805             the full code space. (same comment about byte order,
2806             these are 31-bit numbers.
2807             csUCS4
2808            
2809            
2810             ISO-10646-UCS-Basic
2811             1002
2812             ASCII subset of Unicode. Basic Latin = collection 1
2813             See ISO 10646, Appendix A
2814             csUnicodeASCII
2815            
2816            
2817             ISO-10646-Unicode-Latin1
2818             1003
2819             ISO Latin-1 subset of Unicode. Basic Latin and Latin-1
2820             Supplement = collections 1 and 2. See ISO 10646,
2821             Appendix A. See .
2822             csUnicodeLatin1
2823             ISO-10646
2824            
2825            
2826             ISO-10646-J-1
2827             1004
2828             ISO 10646 Japanese, see .
2829             csUnicodeJapanese
2830            
2831            
2832             ISO-Unicode-IBM-1261
2833             1005
2834             IBM Latin-2, -3, -5, Extended Presentation Set, GCSGID: 1261
2835             csUnicodeIBM1261
2836            
2837            
2838             ISO-Unicode-IBM-1268
2839             1006
2840             IBM Latin-4 Extended Presentation Set, GCSGID: 1268
2841             csUnicodeIBM1268
2842            
2843            
2844             ISO-Unicode-IBM-1276
2845             1007
2846             IBM Cyrillic Greek Extended Presentation Set, GCSGID: 1276
2847             csUnicodeIBM1276
2848            
2849            
2850             ISO-Unicode-IBM-1264
2851             1008
2852             IBM Arabic Presentation Set, GCSGID: 1264
2853             csUnicodeIBM1264
2854            
2855            
2856             ISO-Unicode-IBM-1265
2857             1009
2858             IBM Hebrew Presentation Set, GCSGID: 1265
2859             csUnicodeIBM1265
2860            
2861            
2862             UNICODE-1-1
2863            
2864             1010
2865            
2866            
2867            
2868             csUnicode11
2869            
2870            
2871             SCSU
2872             1011
2873             SCSU See
2874             csSCSU
2875            
2876            
2877             UTF-7
2878            
2879             1012
2880            
2881            
2882            
2883             csUTF7
2884            
2885            
2886             UTF-16BE
2887            
2888             1013
2889            
2890            
2891            
2892             csUTF16BE
2893            
2894            
2895             UTF-16LE
2896            
2897             1014
2898            
2899            
2900            
2901             csUTF16LE
2902            
2903            
2904             UTF-16
2905            
2906             1015
2907            
2908            
2909            
2910             csUTF16
2911            
2912            
2913             CESU-8
2914            
2915             1016
2916            
2917            
2918            
2919             csCESU8
2920             csCESU-8
2921            
2922            
2923             UTF-32
2924            
2925             1017
2926            
2927            
2928            
2929             csUTF32
2930            
2931            
2932             UTF-32BE
2933            
2934             1018
2935            
2936            
2937            
2938             csUTF32BE
2939            
2940            
2941             UTF-32LE
2942            
2943             1019
2944            
2945            
2946            
2947             csUTF32LE
2948            
2949            
2950             BOCU-1
2951            
2952             1020
2953            
2954            
2955            
2956             csBOCU1
2957             csBOCU-1
2958            
2959            
2960             UTF-7-IMAP
2961            
2962             1021
2963             Note: This charset is used to encode Unicode in IMAP mailbox names;
2964             see section 5.1.3 of . It should never be used
2965             outside this context. A name has been assigned so that charset processing
2966             implementations can refer to it in a consistent way.
2967             csUTF7IMAP
2968            
2969            
2970             ISO-8859-1-Windows-3.0-Latin-1
2971             Hewlett-Packard Company, "HP PCL 5 Comparison Guide",
2972             (P/N 5021-0329) pp B-13, 1996.
2973             2000
2974             Extended ISO 8859-1 Latin-1 for Windows 3.0.
2975             PCL Symbol Set id: 9U
2976             csWindows30Latin1
2977            
2978            
2979             ISO-8859-1-Windows-3.1-Latin-1
2980             Hewlett-Packard Company, "HP PCL 5 Comparison Guide",
2981             (P/N 5021-0329) pp B-13, 1996.
2982             2001
2983             Extended ISO 8859-1 Latin-1 for Windows 3.1.
2984             PCL Symbol Set id: 19U
2985             csWindows31Latin1
2986            
2987            
2988             ISO-8859-2-Windows-Latin-2
2989             Hewlett-Packard Company, "HP PCL 5 Comparison Guide",
2990             (P/N 5021-0329) pp B-13, 1996.
2991             2002
2992             Extended ISO 8859-2. Latin-2 for Windows 3.1.
2993             PCL Symbol Set id: 9E
2994             csWindows31Latin2
2995            
2996            
2997             ISO-8859-9-Windows-Latin-5
2998             Hewlett-Packard Company, "HP PCL 5 Comparison Guide",
2999             (P/N 5021-0329) pp B-13, 1996.
3000             2003
3001             Extended ISO 8859-9. Latin-5 for Windows 3.1
3002             PCL Symbol Set id: 5T
3003             csWindows31Latin5
3004            
3005            
3006             hp-roman8
3007             Hewlett-Packard Company, "HP PCL 5 Comparison Guide",
3008             (P/N 5021-0329) pp B-13, 1996.
3009            
3010            
3011             2004
3012             LaserJet IIP Printer User's Manual,
3013             HP part no 33471-90901, Hewlet-Packard, June 1989.
3014             roman8
3015             r8
3016             csHPRoman8
3017            
3018            
3019             Adobe-Standard-Encoding
3020             Adobe Systems Incorporated, PostScript Language Reference
3021             Manual, second edition, Addison-Wesley Publishing Company,
3022             Inc., 1990.
3023             2005
3024             PostScript Language Reference Manual
3025             PCL Symbol Set id: 10J
3026             csAdobeStandardEncoding
3027            
3028            
3029             Ventura-US
3030             Hewlett-Packard Company, "HP PCL 5 Comparison Guide",
3031             (P/N 5021-0329) pp B-13, 1996.
3032             2006
3033             Ventura US. ASCII plus characters typically used in
3034             publishing, like pilcrow, copyright, registered, trade mark,
3035             section, dagger, and double dagger in the range A0 (hex)
3036             to FF (hex).
3037             PCL Symbol Set id: 14J
3038             csVenturaUS
3039            
3040            
3041             Ventura-International
3042             Hewlett-Packard Company, "HP PCL 5 Comparison Guide",
3043             (P/N 5021-0329) pp B-13, 1996.
3044             2007
3045             Ventura International. ASCII plus coded characters similar
3046             to Roman8.
3047             PCL Symbol Set id: 13J
3048             csVenturaInternational
3049            
3050            
3051             DEC-MCS
3052            
3053            
3054             2008
3055             VAX/VMS User's Manual,
3056             Order Number: AI-Y517A-TE, April 1986.
3057             dec
3058             csDECMCS
3059            
3060            
3061             IBM850
3062            
3063            
3064             2009
3065             IBM NLS RM Vol2 SE09-8002-01, March 1990
3066             cp850
3067             850
3068             csPC850Multilingual
3069            
3070            
3071             PC8-Danish-Norwegian
3072             Hewlett-Packard Company, "HP PCL 5 Comparison Guide",
3073             (P/N 5021-0329) pp B-13, 1996.
3074             2012
3075             PC Danish Norwegian
3076             8-bit PC set for Danish Norwegian
3077             PCL Symbol Set id: 11U
3078             csPC8DanishNorwegian
3079            
3080            
3081             IBM862
3082            
3083            
3084             2013
3085             IBM NLS RM Vol2 SE09-8002-01, March 1990
3086             cp862
3087             862
3088             csPC862LatinHebrew
3089            
3090            
3091             PC8-Turkish
3092             Hewlett-Packard Company, "HP PCL 5 Comparison Guide",
3093             (P/N 5021-0329) pp B-13, 1996.
3094             2014
3095             PC Latin Turkish. PCL Symbol Set id: 9T
3096             csPC8Turkish
3097            
3098            
3099             IBM-Symbols
3100             IBM Corporation, "ABOUT TYPE: IBM's Technical Reference
3101             for Core Interchange Digitized Type", Publication number
3102             S544-3708-01
3103             2015
3104             Presentation Set, CPGID: 259
3105             csIBMSymbols
3106            
3107            
3108             IBM-Thai
3109             IBM Corporation, "ABOUT TYPE: IBM's Technical Reference
3110             for Core Interchange Digitized Type", Publication number
3111             S544-3708-01
3112             2016
3113             Presentation Set, CPGID: 838
3114             csIBMThai
3115            
3116            
3117             HP-Legal
3118             Hewlett-Packard Company, "HP PCL 5 Comparison Guide",
3119             (P/N 5021-0329) pp B-13, 1996.
3120             2017
3121             PCL 5 Comparison Guide, Hewlett-Packard,
3122             HP part number 5961-0510, October 1992
3123             PCL Symbol Set id: 1U
3124             csHPLegal
3125            
3126            
3127             HP-Pi-font
3128             Hewlett-Packard Company, "HP PCL 5 Comparison Guide",
3129             (P/N 5021-0329) pp B-13, 1996.
3130             2018
3131             PCL 5 Comparison Guide, Hewlett-Packard,
3132             HP part number 5961-0510, October 1992
3133             PCL Symbol Set id: 15U
3134             csHPPiFont
3135            
3136            
3137             HP-Math8
3138             Hewlett-Packard Company, "HP PCL 5 Comparison Guide",
3139             (P/N 5021-0329) pp B-13, 1996.
3140             2019
3141             PCL 5 Comparison Guide, Hewlett-Packard,
3142             HP part number 5961-0510, October 1992
3143             PCL Symbol Set id: 8M
3144             csHPMath8
3145            
3146            
3147             Adobe-Symbol-Encoding
3148             Adobe Systems Incorporated, PostScript Language Reference
3149             Manual, second edition, Addison-Wesley Publishing Company,
3150             Inc., 1990.
3151             2020
3152             PostScript Language Reference Manual
3153             PCL Symbol Set id: 5M
3154             csHPPSMath
3155            
3156            
3157             HP-DeskTop
3158             Hewlett-Packard Company, "HP PCL 5 Comparison Guide",
3159             (P/N 5021-0329) pp B-13, 1996.
3160             2021
3161             PCL 5 Comparison Guide, Hewlett-Packard,
3162             HP part number 5961-0510, October 1992
3163             PCL Symbol Set id: 7J
3164             csHPDesktop
3165            
3166            
3167             Ventura-Math
3168             Hewlett-Packard Company, "HP PCL 5 Comparison Guide",
3169             (P/N 5021-0329) pp B-13, 1996.
3170             2022
3171             PCL 5 Comparison Guide, Hewlett-Packard,
3172             HP part number 5961-0510, October 1992
3173             PCL Symbol Set id: 6M
3174             csVenturaMath
3175            
3176            
3177             Microsoft-Publishing
3178             Hewlett-Packard Company, "HP PCL 5 Comparison Guide",
3179             (P/N 5021-0329) pp B-13, 1996.
3180             2023
3181             PCL 5 Comparison Guide, Hewlett-Packard,
3182             HP part number 5961-0510, October 1992
3183             PCL Symbol Set id: 6J
3184             csMicrosoftPublishing
3185            
3186            
3187             Windows-31J
3188             2024
3189             Windows Japanese. A further extension of Shift_JIS
3190             to include NEC special characters (Row 13), NEC
3191             selection of IBM extensions (Rows 89 to 92), and IBM
3192             extensions (Rows 115 to 119). The CCS's are
3193             JIS X0201:1997, JIS X0208:1997, and these extensions.
3194             This charset can be used for the top-level media type "text",
3195             but it is of limited or specialized use (see ).
3196             PCL Symbol Set id: 19K
3197             csWindows31J
3198            
3199            
3200             GB2312
3201             2025
3202             Chinese for People's Republic of China (PRC) mixed one byte,
3203             two byte set:
3204             20-7E = one byte ASCII
3205             A1-FE = two byte PRC Kanji
3206             See GB 2312-80
3207             PCL Symbol Set Id: 18C
3208             csGB2312
3209             GB2312
3210            
3211            
3212             Big5
3213             2026
3214             Chinese for Taiwan Multi-byte set.
3215             PCL Symbol Set Id: 18T
3216             csBig5
3217             Big5
3218            
3219            
3220             macintosh
3221            
3222            
3223             2027
3224             The Unicode Standard ver1.0, ISBN 0-201-56788-1, Oct 1991
3225             mac
3226             csMacintosh
3227            
3228            
3229             IBM037
3230            
3231            
3232             2028
3233             IBM NLS RM Vol2 SE09-8002-01, March 1990
3234             cp037
3235             ebcdic-cp-us
3236             ebcdic-cp-ca
3237             ebcdic-cp-wt
3238             ebcdic-cp-nl
3239             csIBM037
3240            
3241            
3242             IBM038
3243            
3244            
3245             2029
3246             IBM 3174 Character Set Ref, GA27-3831-02, March 1990
3247             EBCDIC-INT
3248             cp038
3249             csIBM038
3250            
3251            
3252             IBM273
3253            
3254            
3255             2030
3256             IBM NLS RM Vol2 SE09-8002-01, March 1990
3257             CP273
3258             csIBM273
3259            
3260            
3261             IBM274
3262            
3263            
3264             2031
3265             IBM 3174 Character Set Ref, GA27-3831-02, March 1990
3266             EBCDIC-BE
3267             CP274
3268             csIBM274
3269            
3270            
3271             IBM275
3272            
3273            
3274             2032
3275             IBM NLS RM Vol2 SE09-8002-01, March 1990
3276             EBCDIC-BR
3277             cp275
3278             csIBM275
3279            
3280            
3281             IBM277
3282            
3283            
3284             2033
3285             IBM NLS RM Vol2 SE09-8002-01, March 1990
3286             EBCDIC-CP-DK
3287             EBCDIC-CP-NO
3288             csIBM277
3289            
3290            
3291             IBM278
3292            
3293            
3294             2034
3295             IBM NLS RM Vol2 SE09-8002-01, March 1990
3296             CP278
3297             ebcdic-cp-fi
3298             ebcdic-cp-se
3299             csIBM278
3300            
3301            
3302             IBM280
3303            
3304            
3305             2035
3306             IBM NLS RM Vol2 SE09-8002-01, March 1990
3307             CP280
3308             ebcdic-cp-it
3309             csIBM280
3310            
3311            
3312             IBM281
3313            
3314            
3315             2036
3316             IBM 3174 Character Set Ref, GA27-3831-02, March 1990
3317             EBCDIC-JP-E
3318             cp281
3319             csIBM281
3320            
3321            
3322             IBM284
3323            
3324            
3325             2037
3326             IBM NLS RM Vol2 SE09-8002-01, March 1990
3327             CP284
3328             ebcdic-cp-es
3329             csIBM284
3330            
3331            
3332             IBM285
3333            
3334            
3335             2038
3336             IBM NLS RM Vol2 SE09-8002-01, March 1990
3337             CP285
3338             ebcdic-cp-gb
3339             csIBM285
3340            
3341            
3342             IBM290
3343            
3344            
3345             2039
3346             IBM 3174 Character Set Ref, GA27-3831-02, March 1990
3347             cp290
3348             EBCDIC-JP-kana
3349             csIBM290
3350            
3351            
3352             IBM297
3353            
3354            
3355             2040
3356             IBM NLS RM Vol2 SE09-8002-01, March 1990
3357             cp297
3358             ebcdic-cp-fr
3359             csIBM297
3360            
3361            
3362             IBM420
3363            
3364            
3365             2041
3366             IBM NLS RM Vol2 SE09-8002-01, March 1990,
3367             IBM NLS RM p 11-11
3368             cp420
3369             ebcdic-cp-ar1
3370             csIBM420
3371            
3372            
3373             IBM423
3374            
3375            
3376             2042
3377             IBM NLS RM Vol2 SE09-8002-01, March 1990
3378             cp423
3379             ebcdic-cp-gr
3380             csIBM423
3381            
3382            
3383             IBM424
3384            
3385            
3386             2043
3387             IBM NLS RM Vol2 SE09-8002-01, March 1990
3388             cp424
3389             ebcdic-cp-he
3390             csIBM424
3391            
3392            
3393             IBM437
3394            
3395            
3396             2011
3397             IBM NLS RM Vol2 SE09-8002-01, March 1990
3398             cp437
3399             437
3400             csPC8CodePage437
3401            
3402            
3403             IBM500
3404            
3405            
3406             2044
3407             IBM NLS RM Vol2 SE09-8002-01, March 1990
3408             CP500
3409             ebcdic-cp-be
3410             ebcdic-cp-ch
3411             csIBM500
3412            
3413            
3414             IBM851
3415            
3416            
3417             2045
3418             IBM NLS RM Vol2 SE09-8002-01, March 1990
3419             cp851
3420             851
3421             csIBM851
3422            
3423            
3424             IBM852
3425            
3426            
3427             2010
3428             IBM NLS RM Vol2 SE09-8002-01, March 1990
3429             cp852
3430             852
3431             csPCp852
3432            
3433            
3434             IBM855
3435            
3436            
3437             2046
3438             IBM NLS RM Vol2 SE09-8002-01, March 1990
3439             cp855
3440             855
3441             csIBM855
3442            
3443            
3444             IBM857
3445            
3446            
3447             2047
3448             IBM NLS RM Vol2 SE09-8002-01, March 1990
3449             cp857
3450             857
3451             csIBM857
3452            
3453            
3454             IBM860
3455            
3456            
3457             2048
3458             IBM NLS RM Vol2 SE09-8002-01, March 1990
3459             cp860
3460             860
3461             csIBM860
3462            
3463            
3464             IBM861
3465            
3466            
3467             2049
3468             IBM NLS RM Vol2 SE09-8002-01, March 1990
3469             cp861
3470             861
3471             cp-is
3472             csIBM861
3473            
3474            
3475             IBM863
3476            
3477            
3478             2050
3479             IBM Keyboard layouts and code pages, PN 07G4586 June 1991
3480             cp863
3481             863
3482             csIBM863
3483            
3484            
3485             IBM864
3486            
3487            
3488             2051
3489             IBM Keyboard layouts and code pages, PN 07G4586 June 1991
3490             cp864
3491             csIBM864
3492            
3493            
3494             IBM865
3495            
3496            
3497             2052
3498             IBM DOS 3.3 Ref (Abridged), 94X9575 (Feb 1987)
3499             cp865
3500             865
3501             csIBM865
3502            
3503            
3504             IBM868
3505            
3506            
3507             2053
3508             IBM NLS RM Vol2 SE09-8002-01, March 1990
3509             CP868
3510             cp-ar
3511             csIBM868
3512            
3513            
3514             IBM869
3515            
3516            
3517             2054
3518             IBM Keyboard layouts and code pages, PN 07G4586 June 1991
3519             cp869
3520             869
3521             cp-gr
3522             csIBM869
3523            
3524            
3525             IBM870
3526            
3527            
3528             2055
3529             IBM NLS RM Vol2 SE09-8002-01, March 1990
3530             CP870
3531             ebcdic-cp-roece
3532             ebcdic-cp-yu
3533             csIBM870
3534            
3535            
3536             IBM871
3537            
3538            
3539             2056
3540             IBM NLS RM Vol2 SE09-8002-01, March 1990
3541             CP871
3542             ebcdic-cp-is
3543             csIBM871
3544            
3545            
3546             IBM880
3547            
3548            
3549             2057
3550             IBM NLS RM Vol2 SE09-8002-01, March 1990
3551             cp880
3552             EBCDIC-Cyrillic
3553             csIBM880
3554            
3555            
3556             IBM891
3557            
3558            
3559             2058
3560             IBM NLS RM Vol2 SE09-8002-01, March 1990
3561             cp891
3562             csIBM891
3563            
3564            
3565             IBM903
3566            
3567            
3568             2059
3569             IBM NLS RM Vol2 SE09-8002-01, March 1990
3570             cp903
3571             csIBM903
3572            
3573            
3574             IBM904
3575            
3576            
3577             2060
3578             IBM NLS RM Vol2 SE09-8002-01, March 1990
3579             cp904
3580             904
3581             csIBBM904
3582            
3583            
3584             IBM905
3585            
3586            
3587             2061
3588             IBM 3174 Character Set Ref, GA27-3831-02, March 1990
3589             CP905
3590             ebcdic-cp-tr
3591             csIBM905
3592            
3593            
3594             IBM918
3595            
3596            
3597             2062
3598             IBM NLS RM Vol2 SE09-8002-01, March 1990
3599             CP918
3600             ebcdic-cp-ar2
3601             csIBM918
3602            
3603            
3604             IBM1026
3605            
3606            
3607             2063
3608             IBM NLS RM Vol2 SE09-8002-01, March 1990
3609             CP1026
3610             csIBM1026
3611            
3612            
3613             EBCDIC-AT-DE
3614            
3615            
3616             2064
3617             IBM 3270 Char Set Ref Ch 10, GA27-2837-9, April 1987
3618             csIBMEBCDICATDE
3619            
3620            
3621             EBCDIC-AT-DE-A
3622            
3623            
3624             2065
3625             IBM 3270 Char Set Ref Ch 10, GA27-2837-9, April 1987
3626             csEBCDICATDEA
3627            
3628            
3629             EBCDIC-CA-FR
3630            
3631            
3632             2066
3633             IBM 3270 Char Set Ref Ch 10, GA27-2837-9, April 1987
3634             csEBCDICCAFR
3635            
3636            
3637             EBCDIC-DK-NO
3638            
3639            
3640             2067
3641             IBM 3270 Char Set Ref Ch 10, GA27-2837-9, April 1987
3642             csEBCDICDKNO
3643            
3644            
3645             EBCDIC-DK-NO-A
3646            
3647            
3648             2068
3649             IBM 3270 Char Set Ref Ch 10, GA27-2837-9, April 1987
3650             csEBCDICDKNOA
3651            
3652            
3653             EBCDIC-FI-SE
3654            
3655            
3656             2069
3657             IBM 3270 Char Set Ref Ch 10, GA27-2837-9, April 1987
3658             csEBCDICFISE
3659            
3660            
3661             EBCDIC-FI-SE-A
3662            
3663            
3664             2070
3665             IBM 3270 Char Set Ref Ch 10, GA27-2837-9, April 1987
3666             csEBCDICFISEA
3667            
3668            
3669             EBCDIC-FR
3670            
3671            
3672             2071
3673             IBM 3270 Char Set Ref Ch 10, GA27-2837-9, April 1987
3674             csEBCDICFR
3675            
3676            
3677             EBCDIC-IT
3678            
3679            
3680             2072
3681             IBM 3270 Char Set Ref Ch 10, GA27-2837-9, April 1987
3682             csEBCDICIT
3683            
3684            
3685             EBCDIC-PT
3686            
3687            
3688             2073
3689             IBM 3270 Char Set Ref Ch 10, GA27-2837-9, April 1987
3690             csEBCDICPT
3691            
3692            
3693             EBCDIC-ES
3694            
3695            
3696             2074
3697             IBM 3270 Char Set Ref Ch 10, GA27-2837-9, April 1987
3698             csEBCDICES
3699            
3700            
3701             EBCDIC-ES-A
3702            
3703            
3704             2075
3705             IBM 3270 Char Set Ref Ch 10, GA27-2837-9, April 1987
3706             csEBCDICESA
3707            
3708            
3709             EBCDIC-ES-S
3710            
3711            
3712             2076
3713             IBM 3270 Char Set Ref Ch 10, GA27-2837-9, April 1987
3714             csEBCDICESS
3715            
3716            
3717             EBCDIC-UK
3718            
3719            
3720             2077
3721             IBM 3270 Char Set Ref Ch 10, GA27-2837-9, April 1987
3722             csEBCDICUK
3723            
3724            
3725             EBCDIC-US
3726            
3727            
3728             2078
3729             IBM 3270 Char Set Ref Ch 10, GA27-2837-9, April 1987
3730             csEBCDICUS
3731            
3732            
3733             UNKNOWN-8BIT
3734            
3735             2079
3736             csUnknown8BiT
3737            
3738            
3739             MNEMONIC
3740            
3741            
3742             2080
3743             , also known as "mnemonic+ascii+38"
3744             csMnemonic
3745            
3746            
3747             MNEM
3748            
3749            
3750             2081
3751             , also known as "mnemonic+ascii+8200"
3752             csMnem
3753            
3754            
3755             VISCII
3756            
3757             2082
3758            
3759            
3760            
3761             csVISCII
3762            
3763            
3764             VIQR
3765            
3766             2083
3767            
3768            
3769            
3770             csVIQR
3771            
3772            
3773             KOI8-R
3774            
3775             2084
3776             , based on GOST-19768-74, ISO-6937/8,
3777             INIS-Cyrillic, ISO-5427.
3778             csKOI8R
3779             KOI8-R
3780            
3781            
3782             HZ-GB-2312
3783             2085
3784             ,
3785            
3786            
3787             IBM866
3788            
3789             2086
3790             IBM NLDG Volume 2 (SE09-8002-03) August 1994
3791             cp866
3792             866
3793             csIBM866
3794            
3795            
3796             IBM775
3797             Hewlett-Packard Company, "HP PCL 5 Comparison Guide",
3798             (P/N 5021-0329) pp B-13, 1996.
3799             2087
3800             HP PCL 5 Comparison Guide (P/N 5021-0329) pp B-13, 1996
3801             cp775
3802             csPC775Baltic
3803            
3804            
3805             KOI8-U
3806            
3807             2088
3808            
3809            
3810            
3811             csKOI8U
3812            
3813            
3814             IBM00858
3815             2089
3816             IBM See
3817             CCSID00858
3818             CP00858
3819             PC-Multilingual-850+euro
3820             csIBM00858
3821            
3822            
3823             IBM00924
3824             2090
3825             IBM See
3826             CCSID00924
3827             CP00924
3828             ebcdic-Latin9--euro
3829             csIBM00924
3830            
3831            
3832             IBM01140
3833             2091
3834             IBM See
3835             CCSID01140
3836             CP01140
3837             ebcdic-us-37+euro
3838             csIBM01140
3839            
3840            
3841             IBM01141
3842             2092
3843             IBM See
3844             CCSID01141
3845             CP01141
3846             ebcdic-de-273+euro
3847             csIBM01141
3848            
3849            
3850             IBM01142
3851             2093
3852             IBM See
3853             CCSID01142
3854             CP01142
3855             ebcdic-dk-277+euro
3856             ebcdic-no-277+euro
3857             csIBM01142
3858            
3859            
3860             IBM01143
3861             2094
3862             IBM See
3863             CCSID01143
3864             CP01143
3865             ebcdic-fi-278+euro
3866             ebcdic-se-278+euro
3867             csIBM01143
3868            
3869            
3870             IBM01144
3871             2095
3872             IBM See
3873             CCSID01144
3874             CP01144
3875             ebcdic-it-280+euro
3876             csIBM01144
3877            
3878            
3879             IBM01145
3880             2096
3881             IBM See
3882             CCSID01145
3883             CP01145
3884             ebcdic-es-284+euro
3885             csIBM01145
3886            
3887            
3888             IBM01146
3889             2097
3890             IBM See
3891             CCSID01146
3892             CP01146
3893             ebcdic-gb-285+euro
3894             csIBM01146
3895            
3896            
3897             IBM01147
3898             2098
3899             IBM See
3900             CCSID01147
3901             CP01147
3902             ebcdic-fr-297+euro
3903             csIBM01147
3904            
3905            
3906             IBM01148
3907             2099
3908             IBM See
3909             CCSID01148
3910             CP01148
3911             ebcdic-international-500+euro
3912             csIBM01148
3913            
3914            
3915             IBM01149
3916             2100
3917             IBM See
3918             CCSID01149
3919             CP01149
3920             ebcdic-is-871+euro
3921             csIBM01149
3922            
3923            
3924             Big5-HKSCS
3925            
3926             2101
3927             See
3928             csBig5HKSCS
3929            
3930            
3931             IBM1047
3932            
3933             2102
3934             IBM1047 (EBCDIC Latin 1/Open Systems)
3935            
3936             IBM-1047
3937             csIBM1047
3938            
3939            
3940             PTCP154
3941            
3942             2103
3943             See
3944             csPTCP154
3945             PT154
3946             CP154
3947             Cyrillic-Asian
3948            
3949            
3950             Amiga-1251
3951             2104
3952             See
3953             Ami1251
3954             Amiga1251
3955             Ami-1251
3956             csAmiga1251
3957             (Aliases are provided for historical reasons and should not be used) [Malyshev]
3958            
3959            
3960             KOI7-switched
3961             2105
3962             See
3963             csKOI7switched
3964            
3965            
3966             BRF
3967             2106
3968             See
3969             csBRF
3970            
3971            
3972             TSCII
3973             2107
3974             See
3975             csTSCII
3976            
3977            
3978             CP51932
3979             2108
3980             See
3981             csCP51932
3982            
3983            
3984             windows-874
3985             2109
3986             See
3987             cswindows874
3988            
3989            
3990             windows-1250
3991             2250
3992             Microsoft
3993             cswindows1250
3994            
3995            
3996             windows-1251
3997             2251
3998             Microsoft
3999             cswindows1251
4000            
4001            
4002             windows-1252
4003             2252
4004             Microsoft
4005             cswindows1252
4006            
4007            
4008             windows-1253
4009             2253
4010             Microsoft
4011             cswindows1253
4012            
4013            
4014             windows-1254
4015             2254
4016             Microsoft
4017             cswindows1254
4018            
4019            
4020             windows-1255
4021             2255
4022             Microsoft
4023             cswindows1255
4024            
4025            
4026             windows-1256
4027             2256
4028             Microsoft
4029             cswindows1256
4030            
4031            
4032             windows-1257
4033             2257
4034             Microsoft
4035             cswindows1257
4036            
4037            
4038             windows-1258
4039             2258
4040             Microsoft
4041             cswindows1258
4042            
4043            
4044             TIS-620
4045             2259
4046             Thai Industrial Standards Institute (TISI)
4047             csTIS620
4048             ISO-8859-11
4049            
4050            
4051             CP50220
4052             2260
4053             See
4054             csCP50220
4055            
4056            
4057            
4058            
4059             Alexander Uskov
4060             mailto:auskov&idc.kz
4061             2002-09
4062            
4063            
4064             Alexei Veremeev
4065             mailto:Alexey.Veremeev&oracle.com
4066             2006-12-07
4067            
4068            
4069             Chris Wendt
4070             mailto:christw&microsoft.com
4071             1999-12
4072            
4073            
4074             Florian Weimer
4075             mailto:fw&deneb.enyo.de
4076             2021-01-04
4077            
4078            
4079             Hank Nussbacher
4080             mailto:hank&vm.tau.ac.il
4081            
4082            
4083             Internet Assigned Numbers Authority
4084             mailto:iana&iana.org
4085            
4086            
4087             Jun Murai
4088             mailto:jun&wide.ad.jp
4089            
4090            
4091             Katya Lazhintseva
4092             mailto:katyal&microsoft.com
4093             1996-05
4094            
4095            
4096             Keld Simonsen
4097             mailto:Keld&keldix.com
4098             2018-10-19
4099            
4100            
4101             Keld Simonsen
4102             mailto:Keld.Simonsen&rap.dk
4103             2000-08
4104            
4105            
4106             Kuppuswamy Kalyanasundaram
4107             mailto:kalyan.geo&yahoo.com
4108             2007-05-14
4109            
4110            
4111             Mark Davis
4112             mailto:mark&unicode.org
4113             2002-04
4114            
4115            
4116             Markus Scherer
4117             mailto:markus.scherer&jtcsv.com
4118             2002-09
4119            
4120            
4121             Masataka Ohta
4122             mailto:mohta&cc.titech.ac.jp
4123             1995-07
4124            
4125            
4126             Nicky Yick
4127             mailto:cliac&itsd.gcn.gov.hk
4128             2000-10
4129            
4130            
4131             Reuel Robrigado
4132             mailto:reuelr&ca.ibm.com
4133             2002-09
4134            
4135            
4136             Rick Pond
4137             mailto:rickpond&vnet.ibm.com
4138             1997-03
4139            
4140            
4141             Sairan M. Kikkarin
4142             mailto:sairan&sci.kz
4143             2006-12-07
4144            
4145            
4146             Samuel Thibault
4147             mailto:samuel.thibault&ens-lyon.org
4148             2006-12-07
4149            
4150            
4151             Shawn Steele
4152             mailto:Shawn.Steele&microsoft.com
4153             2010-11-04
4154            
4155            
4156             Tamer Mahdi
4157             mailto:tamer&ca.ibm.com
4158             2000-08
4159            
4160            
4161             Toby Phipps
4162             mailto:tphipps&peoplesoft.com
4163             2002-03
4164            
4165            
4166             Trin Tantsetthi
4167             mailto:trin&mozart.inet.co.th
4168             1998-09
4169            
4170            
4171             Vladas Tumasonis
4172             mailto:vladas.tumasonis&maf.vu.lt
4173             2000-08
4174            
4175            
4176             Woohyong Choi
4177             mailto:whchoi&cosmos.kaist.ac.kr
4178            
4179            
4180             Yui Naruse
4181             mailto:naruse&airemix.jp
4182             2011-09-23
4183            
4184            
4185            
4186             EEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEE
4187             } # _init_data
4188              
4189             1;
4190              
4191             __END__