in reply to Re^4: Listing out the characters included in a character class [wide character warning]
in thread Listing out the characters included in a character class

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~

  • Comment on Re^5: Listing out the characters included in a character class [wide character warning]
  • Select or Download Code