Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
I am using XML::Simple to parse an XML string. The string is loaded from a signed UTF-8 file. When I call the XMLin($string) method to parse the document, I get this error:
Wide character in print at C:\Texts\Programs/SIFX.pm line 42.
Then Data::Dumper doesn't dump anything. It seems that it all just stops with that error. When I print the string, it looks just fine. The only non-ansi character I can find in it is this dash: —, which appears several times.
One of the containing lines is:
<LEX st="Kasulatan" id="tl" chrBrk="—" tSt="s11"/>
It really bugs me because this snippet works fine:
but it doesn't work when it is loaded from a file.my $blah = $xml->XMLin('<LEX st="Kasulatan" id="tl" chrBrk="—" tSt="s1 +1"/>'); print Dumper($blah);
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: XML::Simple throws decode error in encode.pm
by ikegami (Patriarch) on Aug 04, 2010 at 03:49 UTC | |
|
Re: XML::Simple throws decode error in encode.pm
by almut (Canon) on Aug 03, 2010 at 23:15 UTC | |
by Anonymous Monk on Aug 04, 2010 at 18:12 UTC | |
by almut (Canon) on Aug 04, 2010 at 20:59 UTC | |
by Anonymous Monk on Aug 04, 2010 at 21:14 UTC | |
by Anonymous Monk on Aug 05, 2010 at 17:11 UTC | |
|
Re: XML::Simple throws decode error in encode.pm
by Khen1950fx (Canon) on Aug 04, 2010 at 01:56 UTC |