Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
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 drinking their drinks and smoking their pipes about the Monastery: (7)
As of 2015-08-01 00:17 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 (285 votes), past polls