Commit | Line | Data |
---|---|---|
0e567a6c | 1 | package Encode::KR; |
d1256cb1 | 2 | |
071db25d | 3 | BEGIN { |
d1256cb1 | 4 | if ( ord("A") == 193 ) { |
5 | die "Encode::KR not supported on EBCDIC\n"; | |
071db25d | 6 | } |
7 | } | |
d1256cb1 | 8 | our $VERSION = do { my @r = ( q$Revision: 2.1 $ =~ /\d+/g ); sprintf "%d." . "%02d" x $#r, @r }; |
c0d88b76 | 9 | |
10 | use Encode; | |
0e567a6c | 11 | use XSLoader; |
d1256cb1 | 12 | XSLoader::load( __PACKAGE__, $VERSION ); |
0e567a6c | 13 | |
0ab8f81e | 14 | use Encode::KR::2022_KR; |
15 | ||
0e567a6c | 16 | 1; |
17 | __END__ | |
b2704119 | 18 | |
b2729934 | 19 | =head1 NAME |
0e567a6c | 20 | |
b2729934 | 21 | Encode::KR - Korean Encodings |
0e567a6c | 22 | |
b2729934 | 23 | =head1 SYNOPSIS |
24 | ||
1b2c56c8 | 25 | use Encode qw/encode decode/; |
2b217bf7 | 26 | $euc_kr = encode("euc-kr", $utf8); # loads Encode::KR implicitly |
ee981de6 | 27 | $utf8 = decode("euc-kr", $euc_kr); # ditto |
b2729934 | 28 | |
29 | =head1 DESCRIPTION | |
30 | ||
31 | This module implements Korean charset encodings. Encodings supported | |
32 | are as follows. | |
33 | ||
fab31126 | 34 | |
35 | Canonical Alias Description | |
36 | -------------------------------------------------------------------- | |
67d7b5ef | 37 | euc-kr /\beuc.*kr$/i EUC (Extended Unix Character) |
d1256cb1 | 38 | /\bkr.*euc$/i |
a999c27c | 39 | ksc5601-raw Korean standard code set (as is) |
40 | cp949 /(?:x-)?uhc$/i | |
41 | /(?:x-)?windows-949$/i | |
42 | /\bks_c_5601-1987$/i | |
43 | Code Page 949 (EUC-KR + 8,822 | |
67d7b5ef | 44 | (additional Hangul syllables) |
a999c27c | 45 | MacKorean EUC-KR + Apple Vendor Mappings |
67d7b5ef | 46 | johab JOHAB A supplementary encoding defined in |
a999c27c | 47 | Annex 3 of KS X 1001:1998 |
67d7b5ef | 48 | iso-2022-kr iso-2022-kr [RFC1557] |
5129552c | 49 | -------------------------------------------------------------------- |
151b5d36 | 50 | |
b2729934 | 51 | To find how to use this module in detail, see L<Encode>. |
52 | ||
53 | =head1 BUGS | |
54 | ||
67d7b5ef | 55 | When you see C<charset=ks_c_5601-1987> on mails and web pages, they really |
56 | mean "cp949" encodings. To fix that, the following aliases are set; | |
57 | ||
58 | qr/(?:x-)?uhc$/i => '"cp949"' | |
59 | qr/(?:x-)?windows-949$/i => '"cp949"' | |
60 | qr/ks_c_5601-1987$/i => '"cp949"' | |
b2729934 | 61 | |
0ab8f81e | 62 | The ASCII region (0x00-0x7f) is preserved for all encodings, even |
63 | though this conflicts with mappings by the Unicode Consortium. See | |
b2729934 | 64 | |
a63c962f | 65 | L<http://www.debian.or.jp/~kubota/unicode-symbols.html.en> |
b2729934 | 66 | |
0ab8f81e | 67 | to find out why it is implemented that way. |
b2729934 | 68 | |
69 | =head1 SEE ALSO | |
70 | ||
71 | L<Encode> | |
72 | ||
73 | =cut |