http://www.perlmonks.org?node_id=1094850

choroba has asked for the wisdom of the Perl Monks concerning the following question:

XML::LibXML handles the vertical tab (\x0b) differently if encoding of the document is specified explicitly. Without encoding, the character is not inserted when serializing the document, but if you specify the encoding (I used both utf-8 and iso-8859-1), the character is present in the serialization, which means it can't be parsed back (\x0b is not permitted in XML, at least in version 1.0, see Cafe con Leche).
#!/usr/bin/perl use warnings; use strict; use XML::LibXML; my @docs = ( 'XML::LibXML::Document'->createDocument('1.0'), 'XML::LibXML::Document'->createDocument('1.0', 'utf-8'), ); for my $doc (@docs) { $doc->setDocumentElement(my $root = $doc->createElement('root')); $root->appendText("\x0b"); } for my $doc (@docs) { print ".\n"; 'XML::LibXML'->load_xml(string => $doc->toString); }

Do I miss something? Should I file a bug report?

لսႽ† ᥲᥒ⚪⟊Ⴙᘓᖇ Ꮅᘓᖇ⎱ Ⴙᥲ𝇋ƙᘓᖇ