xref: /onnv-gate/usr/src/cmd/perl/5.8.4/distrib/ext/Encode/TW/TW.pm (revision 0:68f95e015346)
1*0Sstevel@tonic-gatepackage Encode::TW;
2*0Sstevel@tonic-gateBEGIN {
3*0Sstevel@tonic-gate    if (ord("A") == 193) {
4*0Sstevel@tonic-gate	die "Encode::TW not supported on EBCDIC\n";
5*0Sstevel@tonic-gate    }
6*0Sstevel@tonic-gate}
7*0Sstevel@tonic-gateour $VERSION = do { my @r = (q$Revision: 1.26 $ =~ /\d+/g); sprintf "%d."."%02d" x $#r, @r };
8*0Sstevel@tonic-gate
9*0Sstevel@tonic-gateuse Encode;
10*0Sstevel@tonic-gateuse XSLoader;
11*0Sstevel@tonic-gateXSLoader::load(__PACKAGE__,$VERSION);
12*0Sstevel@tonic-gate
13*0Sstevel@tonic-gate1;
14*0Sstevel@tonic-gate__END__
15*0Sstevel@tonic-gate
16*0Sstevel@tonic-gate=head1 NAME
17*0Sstevel@tonic-gate
18*0Sstevel@tonic-gateEncode::TW - Taiwan-based Chinese Encodings
19*0Sstevel@tonic-gate
20*0Sstevel@tonic-gate=head1 SYNOPSIS
21*0Sstevel@tonic-gate
22*0Sstevel@tonic-gate    use Encode qw/encode decode/;
23*0Sstevel@tonic-gate    $big5 = encode("big5", $utf8); # loads Encode::TW implicitly
24*0Sstevel@tonic-gate    $utf8 = decode("big5", $big5); # ditto
25*0Sstevel@tonic-gate
26*0Sstevel@tonic-gate=head1 DESCRIPTION
27*0Sstevel@tonic-gate
28*0Sstevel@tonic-gateThis module implements tradition Chinese charset encodings as used
29*0Sstevel@tonic-gatein Taiwan and Hong Kong.
30*0Sstevel@tonic-gateEncodings supported are as follows.
31*0Sstevel@tonic-gate
32*0Sstevel@tonic-gate  Canonical   Alias		Description
33*0Sstevel@tonic-gate  --------------------------------------------------------------------
34*0Sstevel@tonic-gate  big5-eten   /\bbig-?5$/i	Big5 encoding (with ETen extensions)
35*0Sstevel@tonic-gate	      /\bbig5-?et(en)?$/i
36*0Sstevel@tonic-gate	      /\btca-?big5$/i
37*0Sstevel@tonic-gate  big5-hkscs  /\bbig5-?hk(scs)?$/i
38*0Sstevel@tonic-gate              /\bhk(scs)?-?big5$/i
39*0Sstevel@tonic-gate                                Big5 + Cantonese characters in Hong Kong
40*0Sstevel@tonic-gate  MacChineseTrad		Big5 + Apple Vendor Mappings
41*0Sstevel@tonic-gate  cp950		                Code Page 950
42*0Sstevel@tonic-gate                                = Big5 + Microsoft vendor mappings
43*0Sstevel@tonic-gate  --------------------------------------------------------------------
44*0Sstevel@tonic-gate
45*0Sstevel@tonic-gateTo find out how to use this module in detail, see L<Encode>.
46*0Sstevel@tonic-gate
47*0Sstevel@tonic-gate=head1 NOTES
48*0Sstevel@tonic-gate
49*0Sstevel@tonic-gateDue to size concerns, C<EUC-TW> (Extended Unix Character), C<CCCII>
50*0Sstevel@tonic-gate(Chinese Character Code for Information Interchange), C<BIG5PLUS>
51*0Sstevel@tonic-gate(CMEX's Big5+) and C<BIG5EXT> (CMEX's Big5e) are distributed separately
52*0Sstevel@tonic-gateon CPAN, under the name L<Encode::HanExtra>. That module also contains
53*0Sstevel@tonic-gateextra China-based encodings.
54*0Sstevel@tonic-gate
55*0Sstevel@tonic-gate=head1 BUGS
56*0Sstevel@tonic-gate
57*0Sstevel@tonic-gateSince the original C<big5> encoding (1984) is not supported anywhere
58*0Sstevel@tonic-gate(glibc and DOS-based systems uses C<big5> to mean C<big5-eten>; Microsoft
59*0Sstevel@tonic-gateuses C<big5> to mean C<cp950>), a conscious decision was made to alias
60*0Sstevel@tonic-gateC<big5> to C<big5-eten>, which is the de facto superset of the original
61*0Sstevel@tonic-gatebig5.
62*0Sstevel@tonic-gate
63*0Sstevel@tonic-gateThe C<CNS11643> encoding files are not complete. For common C<CNS11643>
64*0Sstevel@tonic-gatemanipulation, please use C<EUC-TW> in L<Encode::HanExtra>, which contains
65*0Sstevel@tonic-gateplanes 1-7.
66*0Sstevel@tonic-gate
67*0Sstevel@tonic-gateThe ASCII region (0x00-0x7f) is preserved for all encodings, even
68*0Sstevel@tonic-gatethough this conflicts with mappings by the Unicode Consortium.  See
69*0Sstevel@tonic-gate
70*0Sstevel@tonic-gateL<http://www.debian.or.jp/~kubota/unicode-symbols.html.en>
71*0Sstevel@tonic-gate
72*0Sstevel@tonic-gateto find out why it is implemented that way.
73*0Sstevel@tonic-gate
74*0Sstevel@tonic-gate=head1 SEE ALSO
75*0Sstevel@tonic-gate
76*0Sstevel@tonic-gateL<Encode>
77*0Sstevel@tonic-gate
78*0Sstevel@tonic-gate=cut
79