R
Reven
Hi group.
I've installed ActivePerl on win XP and I'm having some problems. I've
tried documentation at activestate but found nothing on this topic.
When a string contains a non-english character (for ex. á [thats
á if you don't see it]) and the script prints that string to the
screen, I get a lousy character, like if the cmd shell didn't support
this character. But I can type it directly in a shell prompt and it
shows ok.
I've tried playing with locale (use locale
and perl uses es_es (that's
my system's locale, aka es_ES.1252), so those character should print
out. Windows local is also set to Spanish.
I tried "use utf8;", "use iso-8859-1;" and "use latin1;" to no avail.
With utf-8 I get a whole lot of warnings and instead of weird chars I
get a blank space.
I've also tried encoding my strings:
#!c:/perl/bin/perl.exe
use Encode;
$u = "á"; # The value of this string is an "a" acute
$s = decode("latin1", $u);
print $s, "\n";
gives no result. Instead of an "a tilde" I get a Greek Beta. I've also
tried "iso-8859-1" and "windows-1252", but to the same effect. I'm quite
lost. This is just a wild guess: could there be any problem with the
console itself? Could I be *so* lucky to find a bug?
I'd really appreciate any help on this.
Reven.
I've installed ActivePerl on win XP and I'm having some problems. I've
tried documentation at activestate but found nothing on this topic.
When a string contains a non-english character (for ex. á [thats
á if you don't see it]) and the script prints that string to the
screen, I get a lousy character, like if the cmd shell didn't support
this character. But I can type it directly in a shell prompt and it
shows ok.
I've tried playing with locale (use locale
my system's locale, aka es_ES.1252), so those character should print
out. Windows local is also set to Spanish.
I tried "use utf8;", "use iso-8859-1;" and "use latin1;" to no avail.
With utf-8 I get a whole lot of warnings and instead of weird chars I
get a blank space.
I've also tried encoding my strings:
#!c:/perl/bin/perl.exe
use Encode;
$u = "á"; # The value of this string is an "a" acute
$s = decode("latin1", $u);
print $s, "\n";
gives no result. Instead of an "a tilde" I get a Greek Beta. I've also
tried "iso-8859-1" and "windows-1252", but to the same effect. I'm quite
lost. This is just a wild guess: could there be any problem with the
console itself? Could I be *so* lucky to find a bug?
I'd really appreciate any help on this.
Reven.