in reply to Unicode at Windows' cmd.exe

Your script is probably using UTF-8 (as the encoding of the body of the script). So, you must
use utf8;
I, personally (as a Brasilian that has pt_BR as native language), start all my scripts with:
use strict; use warnings; use utf8; # I will write this script in UTF-8 use open qw(:std :locale); # All files to be open in the native cp use locale; # I want my string comparisons according to native locale
This makes my I/O to be done in cp1252 in Windows, and in Latin1 or UTF-8 in linux. I edit my scripts in vim with UTF-8 encoding in both platforms.
Update:I recently learned that
use open qw(:std :locale);
and
use open qw(:locale);
do the same thing.
[]s, HTH, Massa

Replies are listed 'Best First'.
Re^2: Unicode at Windows' cmd.exe
by Burak (Chaplain) on Jul 14, 2008 at 13:02 UTC
    I think the dosbox uses cp8xx encodings not 12xx ones. That's an annoying problem for all non-latin1 AFAIK :p Dumb dos... And the code sample you gave does not seem to work for my locale (tr). All I get is this warning instead:
    Cannot figure out an encoding to use
      Heh, your OS is not passing the correct locale. You can switch :locale in the use open to:
      use open ':std', ':encoding(iso-8859-9)';
      (for example, if the encoding you use is that, ':encoding(cp857)' if not)...
      []s, HTH, Massa
        Yes :encoding(cp857) seems to work :) Thanks