in reply to Windows %ENV and utf8
Hello gweekly,
[Cross-reference: LibXML and %ENV in 5.18 on Windows.]
Received in a /msg:
Should I do anything more in hopes of getting someone to look deeper into debugging this (eg: how to contact the code author, or submit a bug report?)?
If the line my $utf8 = Encode::decode('utf8', 'SAM'); is replaced with my $utf8 = 'SAM';, then the problem goes away. So, at first sight it would appear that the bug is in the Encode module. However, on closer inspection it becomes clear that the problem derives from the way Perl itself handles the built-in %ENV hash.1 So my best advice is to submit a bug report re Perl itself. Follow the directions in perlbug and include a reference to this PerlMonks thread: http://perlmonks.pair.com/index.pl?node_id=1180341.
Hope that helps,
1Of possible relevance is the “Defined values stored in environment are forced to byte strings” note in perl5180delta:
A value stored in an environment variable has always been stringified when inherited by child processes.
In this release, when assigning to %ENV, values are immediately stringified, and converted to be only a byte string.
However, this mentions %ENV values only, whereas the bug pertains to utf8-encoded keys.
| Athanasius <°(((>< contra mundum | Iustus alius egestas vitae, eros Piratica, |
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Windows %ENV and utf8 -- don't do it
by Discipulus (Canon) on Jan 31, 2017 at 11:50 UTC | |
|
Re^2: Windows %ENV and utf8
by gweekly (Novice) on Jan 31, 2017 at 20:14 UTC |