Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling
 
PerlMonks  

Re: Pragma to handle unicode characters

by Anonymous Monk
on Dec 22, 2008 at 04:34 UTC ( [id://731963]=note: print w/replies, xml ) Need Help??


in reply to Pragma to handle unicode characters

Have you tried the -C option or, equivalently, the PERL_UNICODE environment variable?

It seems to help, but I don't have enough experience with unicode strings to really test it properly.

$ perl -CSDAL -e 'print "the utf8 flag is ", utf8::is_utf8(shift) ? "o +n" : "off", " for command-line arguments\n"' hi...the utf8 flag is on + for command-line arguments
$ perl -e 'print "the utf8 flag is ", utf8::is_utf8(shift) ? "o +n" : "off", " for command-line arguments\n"' hi... the utf8 flag is off for command-line arguments

Replies are listed 'Best First'.
Re^2: Pragma to handle unicode characters
by wanradt (Scribe) on Dec 22, 2008 at 09:01 UTC
    Have you tried the -C option or, equivalently, the PERL_UNICODE environment variable?
    No, i was not, now i tried and it helped me. After setting PERL_UNICODE=39 i still (just) need set in my script
    use utf8; use open ':std', ':encoding(UTF-8)';
    Thank you, it anwers my first question!

    It still does not affect @ENV variables, as applied fellow Almut.
    Nġnda, WK
      You might want to try PERL_UNICODE=63. I think that will let you drop the 'use open' line.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others pondering the Monastery: (7)
As of 2024-04-19 11:41 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found