laziness, impatience, and hubris | |
PerlMonks |
Re: tr/// not working for replacment of curly quotes (use utf8)by LanX (Saint) |
on Jul 26, 2020 at 21:22 UTC ( [id://11119840]=note: print w/replies, xml ) | Need Help?? |
> What am I missing? use utf8 ? You should dump your string to see what's inside, best inspected with Devel::Peek
UpdateTested on my mobile
ExplanationWithout utf8 Perl is considering every string to be a byte string not a character string (the flag will be missing) Your multibyte unicode character might look ok in your editor but Perl will try to transliterate individual bytes.
Cheers Rolf
In Section
Seekers of Perl Wisdom
|
|