Did you try that? If so, what was the outcome? If not, why not?

Yes, I copied that into my code, replacing what I was doing (TMTOWTDI) and it made no difference. I had been using these lines already:

binmode STDERR, ":utf8"; binmode STDIN, ":utf8"; binmode STDOUT, ":utf8";

Honestly, there are so many ways in Perl of dealing with UTF8 that the mind spins--and they are not all created equal. I had not seen the particular method you recommended, but again, it turned out no different than what I had had in place already. If it does the same as the three lines, I may prefer it going forward. The three-line version does appear to have the advantage of being more specific, giving one the option of selecting among the three options. And I've, at various times, used other methods as well, including the Encode module, etc.

What does your line 125 look like?

print $io $msg;
...and my line 156 looks identical to yours.

Regarding the last portion of your post, I know you are well-meaning so I will overlook how it comes across. My username is not without significance. From the very beginning of my Perl programming career, I have dealt with non-ASCII encodings (I was programming for Asian languages from the get-go). The "wide character" message is one I have seen thousands of times--and I well know its typical causes.

Thank you for your help! (This is genuine, not being sarcastic--I just felt it necessary to clarify owing to the prior paragraph which might color the perception of my tone.)

Blessings,

~Polyglot~


In reply to Re^5: Listing out the characters included in a character class [wide character warning] by Polyglot
in thread Listing out the characters included in a character class by Polyglot

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.