Subject: | support for HanExtra encodings documented but not enabled |
Encode::Supported reffers to Encode::HanExtra for additional Chinese
encodings, but support for them seems to be disabled in Encode::Config.
Implicit load documented in Encode::HanExtra does not work:
use Encode;
# Traditional Chinese
$euc_tw = encode("euc-tw", $utf8); # loads Encode::HanExtra implicitly
$utf8 = decode("euc-tw", $euc_tw); # ditto
$ perl -MEncode -le '$utf8 = decode("euc-tw", "xxx"); print $utf8'
Unknown encoding 'euc-tw' at -e line 1
$
The attached patch re-enables support for Encode::HanExtra.
--- Encode-2.11/lib/Encode/Config.pm- 2005-08-05 14:58:50 +0400
+++ Encode-2.11/lib/Encode/Config.pm 2005-08-07 16:45:37 +0400
@@ -137,9 +137,21 @@ unless (ord("A") == 193){
'cp950' => 'Encode::TW',
'MacChineseTrad' => 'Encode::TW',
- #'big5plus' => 'Encode::HanExtra',
- #'euc-tw' => 'Encode::HanExtra',
- #'gb18030' => 'Encode::HanExtra',
+ 'big5-1984' => 'Encode::HanExtra',
+ 'big5ext' => 'Encode::HanExtra',
+ 'big5plus' => 'Encode::HanExtra',
+ 'cccii' => 'Encode::HanExtra',
+ 'unisys' => 'Encode::HanExtra',
+ 'euc-tw' => 'Encode::HanExtra',
+ 'gb18030' => 'Encode::HanExtra',
+ 'cns11643-1' => 'Encode::HanExtra',
+ 'cns11643-2' => 'Encode::HanExtra',
+ 'cns11643-3' => 'Encode::HanExtra',
+ 'cns11643-4' => 'Encode::HanExtra',
+ 'cns11643-5' => 'Encode::HanExtra',
+ 'cns11643-6' => 'Encode::HanExtra',
+ 'cns11643-7' => 'Encode::HanExtra',
+ 'cns11643-f' => 'Encode::HanExtra',
'MIME-Header' => 'Encode::MIME::Header',
'MIME-B' => 'Encode::MIME::Header',