Page 1 of 1

Oxygen does not open XML files with wrong encoding

Posted: Wed Nov 27, 2024 5:28 pm
by Frank Ralf
Hello,

I have received a number of XML files from a customer which claim to be UTF-16 in the XML declaration <?xml version="1.0" encoding="UTF-16"?> but are in fact in UTF-8. When doing a "Find/Replace in Files...", Oxygen warns me about the encoding mismatch but does not find my search string in the files even if it is there. Oxygen also cannot open the files correctly. Is there some setting to change this behavior? The files open without problem in Notepad++.

Best regards,
Frank

Re: Oxygen does not open XML files with wrong encoding

Posted: Thu Nov 28, 2024 9:08 am
by Radu
Hi Frank,
Oxygen warns me about the encoding mismatch but does not find my search string in the files
I think those are errors (not warnings) and Oxygen just skips over processing the file as it cannot properly read all characters inside it with the UTF-16 encoding.
Oxygen also cannot open the files correctly.
Oxygen opens the XML file and probably cannot process some of the characters with the UTF-16 encoding which is specifies in the header. In general we prefer to avoid continue processing instead of opening the file with an incorrect encoding, allowing the end user to make changes and save the file and maybe this leading to loss of content.

I will add an internal issue based on this use case and think more about how we could be more helpful with this in the future.

Regards,
Radu

Re: Oxygen does not open XML files with wrong encoding

Posted: Fri Nov 29, 2024 12:47 pm
by Frank Ralf
Hi Radu,
Thanks for the feedback and creating an internal issue.

Best regards,
Frank