in reply to Re: utf8 && XML::Simple
in thread utf8 && XML::Simple

Thanks for replying. In my (much more complicated real life) file, I get "Cannot decode string with wide characters at /usr/../ line 184."

Zak - the office

Replies are listed 'Best First'.
Re^3: utf8 && XML::Simple
by borisz (Canon) on Feb 01, 2005 at 17:30 UTC
    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.