Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer

Re: Pragma to handle unicode characters

by borisz (Canon)
on Dec 22, 2008 at 00:14 UTC ( #731944=note: print w/replies, xml ) Need Help??

in reply to Pragma to handle unicode characters

I guess
use encoding 'utf8';
does what you want. The pragma change also the PerIO layer for STDIN and STDOUT.

Replies are listed 'Best First'.
Re^2: Pragma to handle unicode characters
by ikegami (Pope) on Dec 22, 2008 at 01:34 UTC
    The encoding pragma has issues, so I avoid it. Use of the utf8 and open pragmas is more suitable.
Re^2: Pragma to handle unicode characters
by wanradt (Scribe) on Dec 22, 2008 at 01:01 UTC

    I tried it, but there are other worries, warnings "Wide character in print at" and @ARGV is still not treated as UTF-8 chars, uc() does not recognize them as chars

    And perldoc utf8 says

    In case you are wondering: yes, "use encoding ’utf8’;" works much the same as "use utf8;".

    In perl58delta i read also:

    New Unicode Semantics (no more use utf8, almost)

    Previously in Perl 5.6 to use Unicode one would say "use utf8" and then the operations (like string concatenation) were Unicode-aware in that lexical scope.
    So i could not even use "use utf8", theoretically ;)

    Nġnda, WK

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://731944]
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others about the Monastery: (2)
As of 2018-03-18 08:51 GMT
Find Nodes?
    Voting Booth?
    When I think of a mole I think of:

    Results (229 votes). Check out past polls.