Codpeage in Perl
[email protected] (Tao Sun)
| Newsgroups | perl.unicode |
|---|---|
| Message-ID | <OFE0509A46.A0901C8D-ON872570A0.00522CAD-852570A0.00530E5D@us.ibm.com> |
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