Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation

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

Log In?

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

How do I use this? | Other CB clients
Other Users?
Others meditating upon the Monastery: (5)
As of 2016-10-28 01:28 GMT
Find Nodes?
    Voting Booth?
    How many different varieties (color, size, etc) of socks do you have in your sock drawer?

    Results (374 votes). Check out past polls.