Skip Menu |
 

This queue is for tickets about the Encode CPAN distribution.

Report information
The Basics
Id: 6695
Status: resolved
Priority: 0/
Queue: Encode

People
Owner: DANKOGAI [...] cpan.org
Requestors: steve.hay [...] uk.radan.com
Cc:
AdminCc:

Bug Information
Severity: Normal
Broken in: 2.01
Fixed in: (no value)

Attachments


Subject: Request for new alias in Encode::JP
Download (untitled) / with headers
text/plain 2.3k
Not a bug, but a minor enhancement request: Could we please have "Windows-31J" added as an alias for "cp932". The Encode::Supported manpage mentions that Windows-31J is the IANA name for cp932, but claims that it is not used, hence (presumably) the alias is not provided by default. However, I find that Netscape 7.1 does not understand cp932, while it does understand Windows-31J. For example, the attached HTML file does not display correctly in Netscape 7.1, but if I change the charset declared within the HTML file to say WIndows-31J instead of cp932 then it does display OK. Obviously I can add the alias myself using define_alias(), but in the light of the above, I think it would be helpful if the alias was provided by Encode itself. The following patch (against Encode-2.01) does this: --- JP/JP.pm.orig 2004-05-25 17:27:30.000000000 +0100 +++ JP/JP.pm 2004-06-21 13:44:04.809571800 +0100 @@ -45,7 +45,7 @@ = ISO-2022-JP with JIS X 0212-1990 support. See below MacJapanese Shift JIS + Apple vendor mappings - cp932 Code Page 932 + cp932 /\bwindows-31j$/i Code Page 932 = Shift JIS + MS/IBM vendor mappings jis0201-raw JIS0201, raw format jis0208-raw JIS0201, raw format --- lib/Encode/Alias.pm.orig 2004-05-25 17:27:26.000000000 +0100 +++ lib/Encode/Alias.pm 2004-06-21 13:35:18.373860400 +0100 @@ -211,6 +211,7 @@ define_alias( qr/\bujis$/i => '"euc-jp"' ); define_alias( qr/\bshift.*jis$/i => '"shiftjis"' ); define_alias( qr/\bsjis$/i => '"shiftjis"' ); + define_alias( qr/\bwindows-31j$/i => '"cp932"' ); # for Encode::KR define_alias( qr/\beuc.*kr$/i => '"euc-kr"' ); define_alias( qr/\bkr.*euc$/i => '"euc-kr"' ); --- lib/Encode/Supported.pod.orig 2003-09-24 01:36:26.000000000 +0100 +++ lib/Encode/Supported.pod 2004-06-21 13:41:11.760080600 +0100 @@ -664,7 +664,8 @@ that Microsoft shouldn't have used JIS as part of the name in the first place. -Unambiguous name: C<CP932>. C<IANA> name (not used?): C<Windows-31J>. +Unambiguous name: C<CP932>. C<IANA> name (also used by Mozilla, and +provided as an alias by Encode): C<Windows-31J>. Encode separately supports C<Shift_JIS> and C<cp932>. End of Patch. - Steve
Download japanese.html
text/html 152b
“ú–{Œê


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.