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

Re^2: print Unicode characters

by kalyanrajsista (Scribe)
on Jun 14, 2010 at 09:13 UTC ( #844550=note: print w/ replies, xml ) Need Help??


in reply to Re: print Unicode characters
in thread print Unicode characters

Thanks for the inputs and suggest me if I'm going in right way...

#!/usr/bin/perl use strict; use charnames ':full'; print "\N{LATIN CAPITAL LETTER N}", "\N{DEGREE SIGN}\n";


Comment on Re^2: print Unicode characters
Download Code
Re^3: print Unicode characters
by Khen1950fx (Canon) on Jun 14, 2010 at 10:30 UTC
    I'm not quite sure what you mean by "degree sign". I kept getting a "wide character in print" warning. However, I think that this is what you're after:
    #!/usr/bin/perl use strict; use encoding 'utf8'; use charnames ':full'; print "\N{LATIN CAPITAL LETTER N WITH DOT ABOVE}\n";
      I kept getting a "wide character in print" warning.

      Add this to your script to get rid of the warning:

      binmode STDOUT, ":utf8";

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others imbibing at the Monastery: (5)
As of 2015-07-05 03:02 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 (60 votes), past polls