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,


In reply to Re: Windows %ENV and utf8 by Athanasius
in thread Windows %ENV and utf8 by gweekly

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.