I do not know if this helps you (I am a Perl beginner, too -
previously i used Java where I did not have problems with character
encoding), but when I needed to print out some special Czech symbols
(ěščřžýáíéďťň etc.), I had to tell Perl to use an utf8 encoding.

use utf8;
binmode (STDIN, 'utf8');
binmode (STDOUT, 'utf8');

Of course, insted utf8 you can use any other encoding in binmode
function (I do not speak Spanish, but for my nature language, Czech,
there are 6 possible character encodings).

The utf8 package provides you some handy functions, for instance
encoding characters to utf8. Binmode sets encoding for some stream or
filehandle (first argument). If you would like to set encoding for a
file, you should use

open(FH, "<:utf8", "filename");

or

open(FH, "<:raw", "filename");
binmode (FH, 'utf8');

I hope I helped you.

Have a nice day!
eMko


--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/


Reply via email to