Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid
 
PerlMonks  

Re: unicode DWIM?

by penguinfuz (Pilgrim)
on Feb 24, 2005 at 13:35 UTC ( [id://434060]=note: print w/replies, xml ) Need Help??


in reply to unicode DWIM?

I too have had an issue with input/output of German characters in my terminal and scripts - my solution has been to use Unicode::UTF8simple which works for my needs. (slurping in German text files, processing the text a bit and then writing the output to HTML or straight through to sendmail)

I'm not sure that I understand your issue completely, but with the following code I can enter a word with German chars - äöüß - and the output is exactly what I expect. I hope this helps.

use strict; if (@ARGV) { use Unicode::UTF8simple; my $uref = new Unicode::UTF8simple; my $utf8string=$uref->fromUTF8("iso-8859-1",@ARGV); my $string=$uref->toUTF8("iso-8859-1",$utf8string); print "I give you: $string\n"; }

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others taking refuge in the Monastery: (4)
As of 2024-04-24 11:54 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found