libxmljs2
libxmljs2 copied to clipboard
Encoding not working
Hey everyone, it seems like the encoding is not working correctly because there is some strange behavior. See follwing code:
import * as libxml from 'libxmljs2';
let doc = new libxml.Document('1.0', 'iso-8859-1');
console.log(doc.encoding()) // Output: iso-8859-1
console.log(doc.toString()) // Output: <?xml version="1.0" encoding="UTF-8"?>
The encoding should be respected also in the parsed string.