This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Use GetEnvironmentStringsW(..) instead of GetEnvironmentStringsA(..).
authorKarthik Rajagopalan <rajagopa@schrodinger.com>
Thu, 14 Jun 2012 16:16:15 +0000 (12:16 -0400)
committerSteve Hay <steve.m.hay@googlemail.com>
Fri, 15 Jun 2012 07:14:33 +0000 (08:14 +0100)
commit4f46e52b008bf955ea3049ad2dc4bfe468842f06
tree3225021ef7b654833ca37c4d8cf06b2174ad7a2e
parentc8d84f8c67ae20ce66d0a8e68579817d47224ab2
Use GetEnvironmentStringsW(..) instead of GetEnvironmentStringsA(..).

GetEnvironmentStringsA(..) return strings in the OEM code page. This
can actually mangle the environment strings if it contain special characters.
A better approach would be to get the utf-16 strings through GetEnvironmentStringsW(..)
and convert them to ANSI code page. This is now done by win32_getenvironmentstrings(..).
To free the block, you can use win32_freeenvironmentstrings(..).
win32/perlhost.h
win32/win32.c
win32/win32iop.h