Phoenix.pm: Perl and utf8 on Windows

Scott Walters scott at illogics.org
Mon Apr 12 14:28:08 CDT 2004


You're asking about two things I know nothing of.

The best I can do is suggest 'perldoc perllocale' and 
'perldoc perlopentut'. 

You were probably running RedHat - or another Linux brave enough
to make the jump to LC_ALL=en_US.ISO8859-1. This has actually
caused a lot of bugs in perl and they're backpeddling from the 
current handling to something more Java-like where you have to
specify the character encoding if it is something other than binary
when you open a file for read or write. Hence the mention of
perldoc perlopentut. But the solution will probably come in the
form of a 'use locale "en_US.ISO8859-1";' pragma.

Good luck and feel free to report back with your success/failure =)

-scott

On  0, Matt Alexander <m at phxlinux.org> wrote:
> 
> I have a Perl script that reads data in a SQLite file.  On Linux
> everything works great.  When I move the script and SQLite file to
> Windows, I get garbage characters in my output where the characters should
> have been something like an accented e (é) or accented i (í).
> 
> The original text file was in utf8 and was then imported into SQLite.
> 
> I'm using ActiveState Perl 5.8.3 on Win2K.
> 
> Any suggestions on how to get Windows to display the characters correctly?
> Thanks,
> ~M
> 
> 
> 



More information about the Phoenix-pm mailing list