[w3c/DOM-Parsing] Specify the relationship between the Text Declaration and document.characterSet (#34)

- [Text Declaration](https://www.w3.org/TR/2008/REC-xml-20081126/#sec-TextDecl)
- [document.characterSet](https://dom.spec.whatwg.org/#dom-document-characterset)

```js
const inXMLStr = `<?xml version="1.0" encoding="ISO-8859-1"?> <x/>`
  
const doc = (new DOMParser()).parseFromString(inXMLStr, 'text/xml')
  
console.log(doc.characterSet)
```

Both Firefox and Chrome say 'UTF-8' ignoring completely the `encoding="ISO-8859-1"`. Totally fine behavior as far as I'm concerned, I haven't tested in other browsers

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/w3c/DOM-Parsing/issues/34

Received on Friday, 5 January 2018 16:17:03 UTC