perl-unicode

Codpeage in Perl

2005-10-20 08:41:22
Hi,

I have a few questions about the CODPEGAE under both Windows and Unix. 
Your help would be greatly appreciated.

I'm hard-coding the local codpage in my code, like "CP936", "CP1252" to be 
used by Encode::encode(). Is there a piece of code that will get the 
codepage on both Unix and Windows?
The standard Locale format is defined as something like: 
Lang_Territory.Codeset. Does it mean that I have to extract the number 
(like 936 or 1252...) from the locale string, then concatenate with "CP" 
to make it looks like "CP1252"?

Thanks,
-Tao
<Prev in Thread] Current Thread [Next in Thread>
  • Codpeage in Perl, Tao Sun <=