Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"
 
PerlMonks  

Re^3: Why is utf8 flag set after Encode::decode of pure ASCII?

by Joost (Canon)
on Apr 01, 2010 at 00:36 UTC ( #832173=note: print w/replies, xml ) Need Help??


in reply to Re^2: Why is utf8 flag set after Encode::decode of pure ASCII?
in thread Why is utf8 flag set after Encode::decode of pure ASCII?

Agreed, but it's the only sane advice you will get.

The reasons you have to look at the utf8 flag sometimes is because some of the code (mostly CPAN modules) do not use the provided sane advice.

If you want to read/write text in a portable manner, or convert between text and binary (integer) representation of characters, you have to specify what encoding you're expecting. If you don't, your code will only reliably work on 7bit ASCII text. And that'll only work on most platforms. That's the executive summary, and that's really all there is to it.

  • Comment on Re^3: Why is utf8 flag set after Encode::decode of pure ASCII?

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://832173]
help
Chatterbox?
[tye]: We use auditd for security monitoring. So we can rely on auditing being enabled. I'm not sure who would want to not be able to audit. Maybe some VM inside another system with audit?
[SuicideJunkie]: spies would want a system to not be able to audit.
[erix]: spies should use a type-writer, no power needed, no auditable
[erix]: if all else fails, eat the paper

How do I use this? | Other CB clients
Other Users?
Others chanting in the Monastery: (4)
As of 2017-06-23 20:17 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    How many monitors do you use while coding?















    Results (555 votes). Check out past polls.