Beefy Boxes and Bandwidth Generously Provided by pair Networks Joe
There's more than one way to do things
 
PerlMonks  

Re^3: Convert Windows-1252 Characters to Java Unicode Notation

by Juerd (Abbot)
on Nov 25, 2007 at 23:05 UTC ( #652886=note: print w/ replies, xml ) Need Help??


in reply to Re^2: Convert Windows-1252 Characters to Java Unicode Notation
in thread Convert Windows-1252 Characters to Java Unicode Notation

You may be better off with a hard coded translation table, for performance.

my %w1252_to_java = map { chr($_) => sprintf("\\u%04x", decode "Windows-1252", chr) } 0x80 .. 0xff; ... $md->{$column} =~ s/([\x80-\xff])/$w1252_to_java{$1}/g;


Comment on Re^3: Convert Windows-1252 Characters to Java Unicode Notation
Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others lurking in the Monastery: (9)
As of 2014-04-18 07:17 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    April first is:







    Results (463 votes), past polls