Blame CN/CN.pm

Packit d0f5c2
package Encode::CN;
Packit d0f5c2
BEGIN {
Packit d0f5c2
    if ( ord("A") == 193 ) {
Packit d0f5c2
        die "Encode::CN not supported on EBCDIC\n";
Packit d0f5c2
    }
Packit d0f5c2
}
Packit d0f5c2
use strict;
Packit d0f5c2
use warnings;
Packit d0f5c2
use Encode;
Packit d0f5c2
our $VERSION = do { my @r = ( q$Revision: 2.3 $ =~ /\d+/g ); sprintf "%d." . "%02d" x $#r, @r };
Packit d0f5c2
use XSLoader;
Packit d0f5c2
XSLoader::load( __PACKAGE__, $VERSION );
Packit d0f5c2
Packit d0f5c2
# Relocated from Encode.pm
Packit d0f5c2
Packit d0f5c2
use Encode::CN::HZ;
Packit d0f5c2
Packit d0f5c2
# use Encode::CN::2022_CN;
Packit d0f5c2
Packit d0f5c2
1;
Packit d0f5c2
__END__
Packit d0f5c2
Packit d0f5c2
=head1 NAME
Packit d0f5c2
Packit d0f5c2
Encode::CN - China-based Chinese Encodings
Packit d0f5c2
Packit d0f5c2
=head1 SYNOPSIS
Packit d0f5c2
Packit d0f5c2
    use Encode qw/encode decode/; 
Packit d0f5c2
    $euc_cn = encode("euc-cn", $utf8);   # loads Encode::CN implicitly
Packit d0f5c2
    $utf8   = decode("euc-cn", $euc_cn); # ditto
Packit d0f5c2
Packit d0f5c2
=head1 DESCRIPTION
Packit d0f5c2
Packit d0f5c2
This module implements China-based Chinese charset encodings.
Packit d0f5c2
Encodings supported are as follows.
Packit d0f5c2
Packit d0f5c2
  Canonical   Alias		Description
Packit d0f5c2
  --------------------------------------------------------------------
Packit d0f5c2
  euc-cn      /\beuc.*cn$/i	EUC (Extended Unix Character)
Packit d0f5c2
          /\bcn.*euc$/i
Packit d0f5c2
              /\bGB[-_ ]?2312(?:\D.*$|$)/i (see below)
Packit d0f5c2
  gb2312-raw			The raw (low-bit) GB2312 character map
Packit d0f5c2
  gb12345-raw			Traditional chinese counterpart to 
Packit d0f5c2
                GB2312 (raw)
Packit d0f5c2
  iso-ir-165			GB2312 + GB6345 + GB8565 + additions
Packit d0f5c2
  MacChineseSimp                GB2312 + Apple Additions
Packit d0f5c2
  cp936				Code Page 936, also known as GBK 
Packit d0f5c2
                (Extended GuoBiao)
Packit d0f5c2
  hz				7-bit escaped GB2312 encoding
Packit d0f5c2
  --------------------------------------------------------------------
Packit d0f5c2
Packit d0f5c2
To find how to use this module in detail, see L<Encode>.
Packit d0f5c2
Packit d0f5c2
=head1 NOTES
Packit d0f5c2
Packit d0f5c2
Due to size concerns, C<GB 18030> (an extension to C<GBK>) is distributed
Packit d0f5c2
separately on CPAN, under the name L<Encode::HanExtra>. That module
Packit d0f5c2
also contains extra Taiwan-based encodings.
Packit d0f5c2
Packit d0f5c2
=head1 BUGS
Packit d0f5c2
Packit d0f5c2
When you see C<charset=gb2312> on mails and web pages, they really
Packit d0f5c2
mean C<euc-cn> encodings.  To fix that, C<gb2312> is aliased to C<euc-cn>.
Packit d0f5c2
Use C<gb2312-raw> when you really mean it.
Packit d0f5c2
Packit d0f5c2
The ASCII region (0x00-0x7f) is preserved for all encodings, even though
Packit d0f5c2
this conflicts with mappings by the Unicode Consortium.
Packit d0f5c2
Packit d0f5c2
=head1 SEE ALSO
Packit d0f5c2
Packit d0f5c2
L<Encode>
Packit d0f5c2
Packit d0f5c2
=cut