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

Re^12: any use of 'use locale'? (source encoding)

by wanradt (Scribe)
on Nov 30, 2009 at 19:56 UTC ( #810262=note: print w/ replies, xml ) Need Help??


in reply to Re^11: any use of 'use locale'? (source encoding)
in thread any use of 'use locale'?

I have more thinking to do with your answer, but main (for me) questions i can review.

Pretending it would currently be possible to implement "use utf8_everywhere", it would break every single piece of code that assumes characters are bytes.

Do you mean, that would break any code, which i incorporate to my project if i declare "use utf8_everywhere"? Then, why it does not break now when i use same things (like "use utf8", "use open", binmode...) separately?

Or do you mean, it will break "characters are bytes"-code, if they use "use uf8_everywhere"? Then i agree, but why they need such declaration?

Assume you read four bytes 0x42 0xC3 0x84 0x48, e.g. from STDIN, a file you opened, an inherited file handle, a command line argument or an environment variable. How many characters do these bytes represent? Explain why

If i am declared fully utf8 environment, i treat them being 3 utf8 characters. If i need some other behaviour, i ask it explicitly to handle the source which from those bytes are coming. Where is the problem?

Nġnda, WK


Comment on Re^12: any use of 'use locale'? (source encoding)

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others exploiting the Monastery: (9)
As of 2015-07-29 05:17 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (260 votes), past polls