Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical
 
PerlMonks  

Re: utf8 && XML::Simple

by borisz (Canon)
on Feb 01, 2005 at 17:14 UTC ( #426968=note: print w/ replies, xml ) Need Help??


in reply to utf8 && XML::Simple

What about use open ':utf8';?
Wohoo! for me.

Boris


Comment on Re: utf8 && XML::Simple
Re^2: utf8 && XML::Simple
by zakzebrowski (Curate) on Feb 01, 2005 at 17:17 UTC
    Thanks for replying. In my (much more complicated real life) file, I get "Cannot decode string with wide characters at /usr/../Encode.pm line 184."


    ----
    Zak - the office
      most likely your input data is arady in utf8 and you want to convert it a second time to utf8. for example:
      use Encode; my $str = "hi"; # hi is a notmal string. $str .= chr(0x1234); # str is now a utf8 string Encode::decode_utf8($str, 1); # here you get the error.
      Propably you exchange encode and decode. Or the decode function call is not needed in your case.
      Boris

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others exploiting the Monastery: (6)
As of 2015-07-04 18:14 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 (60 votes), past polls