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: 1025

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 - '', this environment value comes properly. When I call another perl code - '' from '' 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 - '' received it right from windows1252->utf-8. When we call another process, should we convert back to windows 1252 code page?


© Stack Overflow or respective owner

Related posts about mod-perl

Related posts about perl