T
Todor Vachkov
Hello all,
I'm trying to convert an exported xml file into a perl data structre with the XML::LibXML modul.
Thus I got this error message:
I thought the solution would be:
but this produce a long long list (maybe for each parsed character in the xml file) of error messages :
The segmentaion fail always at the same \xE4 character, but it's a secondary problem.
I just want to let the modul to parse the xml file, which is really large (over 20MB)
and has being exported from another software. Thus I haven't any influence what comes into it.
I hope you can help me! Thanks in advance!
Greetings Todor
I'm trying to convert an exported xml file into a perl data structre with the XML::LibXML modul.
Thus I got this error message:
Entity: line 315442: parser error : Input is not proper UTF-8, indicate
encoding !
Bytes: 0xE2 0x26 0x6C 0x74
I thought the solution would be:
open(my $fh, "< :encoding(utf8)" ,'/foodir/export.xml');
my $parser = XML::LibXML->new();
my $dom = $parser->parse_fh($fh);
my $root = $dom->getDocumentElement;
but this produce a long long list (maybe for each parsed character in the xml file) of error messages :
utf8 "\xE2" does not map to Unicode at /perlmodules/lib/i586-linux-thread-multi/XML/LibXML.pm line 429. ..
..
..
utf8 "\xE4" does not map to Unicode >at /perlmodules/lib/i586-linux-thread-multi/XML/LibXML.pm line 429.
Segmentation fault
The segmentaion fail always at the same \xE4 character, but it's a secondary problem.
I just want to let the modul to parse the xml file, which is really large (over 20MB)
and has being exported from another software. Thus I haven't any influence what comes into it.
I hope you can help me! Thanks in advance!
Greetings Todor