Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine
 
PerlMonks  

Re^3: tr/// not working for replacment of curly quotes

by LanX (Saint)
on Jul 26, 2020 at 21:35 UTC ( [id://11119844]=note: print w/replies, xml ) Need Help??


in reply to Re^2: tr/// not working for replacment of curly quotes
in thread tr/// not working for replacment of curly quotes

I provided an explainantion for it now.

And next time you cite the docs, please try to link to it like [doc://tr]

> I didn't think that was needed anymore.

Perl still needs to be able to operate with byte strings and this backwards compatibly.

So you need to indicate that the literals in your code contain multi byte characters in utf-8 ( provided your editor is set to produce utf8)

Otherwise you'll need to use Encode to convert between the two string states.

This is also necessary when converting from another encoding than utf8.

Cheers Rolf
(addicted to the Perl Programming Language :)
Wikisyntax for the Monastery

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://11119844]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others learning in the Monastery: (3)
As of 2024-04-24 04:44 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found