Forum Discussion
RokuKC
10 years agoRoku Employee
"tim_beynart" wrote:
Part of my application has to retrieve a remote XML file and parse it. I ran into an issue with the file not being read correctly.
The file's encoding is "UTF-16 (little-endian)". The correct BOM is in the file (FF FE). But instead of an XML string, the contents of the file are "??<" and nothing else.
If I resave the document as "UTF-8", it parses correctly.
Is this expected? I thought XML parsers were required to handle UTF-16?
Thanks
How are you getting the string data to pass the XML parser?
I.e. are you using roUrlTransfer GetToString, or roUrlTransfer GetToFile + ReadAsciiFile, or ?
Adding UTF-16 support for selected purposes is on the request backlog, but is more likely to get approved if there are specific use cases that need it.