Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options
 
PerlMonks  

Re^2: How to sanely handle unicode in perl?

by Sec (Monk)
on Mar 23, 2015 at 10:16 UTC ( #1120953=note: print w/replies, xml ) Need Help??


in reply to Re: How to sanely handle unicode in perl?
in thread How to sanely handle unicode in perl?

If you check the source I posted, the open specifies ":encoding(utf8)". And with that \xC3\xB6 does exist and is valid. So I don't really understand what you are talking about.
  • Comment on Re^2: How to sanely handle unicode in perl?

Replies are listed 'Best First'.
Re^3: How to sanely handle unicode in perl?
by Anonymous Monk on Mar 24, 2015 at 00:06 UTC
    I'm talking about locale (from use open qw(:std :locale)). encoding doesn't override locale (maybe it should? but it doesn't. They basically stack). Note that using :raw simply removes the locale layer (like removing use open ... entirely, because by default Perl ignores locales... for the most part).
      Also note that "echo \xC3\xB6" won't always work... conceptually, Perl's strings are sequences of integers; there is no guarantee about their internal representation - in particular, no guarantee that C3 and B6 are actually bytes. Try "echo \xC3\xB6\x{FFFD}" and see what happens...

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others musing on the Monastery: (3)
As of 2022-01-25 06:17 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    In 2022, my preferred method to securely store passwords is:












    Results (65 votes). Check out past polls.

    Notices?