Perl character encoding

Posted by Kartlee on Stack Overflow See other posts from Stack Overflow or by Kartlee
Published on 2010-03-13T09:39:09Z Indexed on 2010/03/13 9:45 UTC
Read the original article Hit count: 852

Filed under:
|
|

Hi People,

I have an environment variable set in Windows as TEST=abc£ which uses Windows-1252 code page. Now when I run a perl program - 'test.pl', this environment value comes properly. When I call another perl code - 'test2.pl' from 'test1.pl' either by system(..) or Win32::process(..), the environment comes garbled. Can someone provide information why this could be and way to resolve it?

The version of perl I am using is 5.8.

If my understanding is right, perl internally uses 'utf-8', so the initial process - 'test1.pl' received it right from windows1252->utf-8. When we call another process, should we convert back to windows 1252 code page?

-Kartlee

© Stack Overflow or respective owner

Related posts about mod-perl

Related posts about perl