Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
PerlMonks  

Re: "Looking" at the characters of a Unicode string.

by zentara (Archbishop)
on Nov 30, 2004 at 19:10 UTC ( #411249=note: print w/ replies, xml ) Need Help??


in reply to "Looking" at the characters of a Unicode string.

Nice. I modified my copy to display the letter, and reversed the print string so that the long text of the unicode name didn't muck up the tab columns.

#!/usr/bin/perl use warnings; use strict; use Unicode::CharName qw/uname/; use Unicode::UCD qw/charinfo/; my $value = shift || "Å være eller å ikke være"; my $c; print "HexValue:\tCharCode\tUnicode Charname:\n"; for (split //, $value) { my $l = $_; $c = ord($_); print charinfo($c)->{code} . ":\t\t$c\t\t"."$l -> ". uname($c) ."\n"; }

I'm not really a human, but I play one on earth. flash japh


Comment on Re: "Looking" at the characters of a Unicode string.
Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others chilling in the Monastery: (4)
As of 2014-07-29 03:23 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My favorite superfluous repetitious redundant duplicative phrase is:









    Results (211 votes), past polls