The problem is simple, but here is the background:

I'm writing an interactive script that needs to work on both Mac and Windows running in Terminal on the Mac and in the "Perl Command Line Interpreter" (ActivePerl 5.10) on Windows.

The script and the text files it reads from are all utf-8 encoded and display properly on both platforms. At the moment I am using Windows 2000 for testing, since that's all I have here, though I have another machine with XP at another location.

Now for the problem:

If the script detects that it is running in Windows then I use Encode::from_to to convert the utf-8 to cp1252 for display in the "Perl Command Line Interpreter" console and for output. Output is fine, but non-ascii characters in the console window are wrongly displayed -- for example:

        Citroën is displayed as CitroÙn
        Microsoft® as Microsoft«
        - as ù

and yet when these incorrectly displayed characters are printed to the output file they are correctly printed, so the problem seems to be merely the "Interpreter's" interpretation of how to display the characters.

Does anybody know what charset this frightful console is using?


Reply via email to