libxmljs2 icon indicating copy to clipboard operation
libxmljs2 copied to clipboard

Encoding not working

Open PeteMac88 opened this issue 2 years ago • 0 comments

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.

PeteMac88 avatar Feb 01 '24 12:02 PeteMac88