Edit online

Encoding Preferences

Oxygen XML Editor lets you configure how character encodings are recognized when opening files and which encodings are used when saving files. To configure encoding options, open the Preferences dialog box (Options > Preferences) and go to Encoding.

The following encoding options are available:
Fallback character encoding
Specifies the default character encoding of non-XML documents if their character encoding cannot be determined from other sources (for example, it is not specified in the document or determined by the file type).
Note: For certain document types, the following encoding detection rules are used:
  • For XML, DTD, and CSS documents, Oxygen XML Editor tries to collect the character encoding from the document. If no such encoding is found, then UTF-8 is used.
  • For JavaScript, JSON, SQL, XQuery, and RNC, the UTF-8 encoding is used.
UTF-8 BOM handling
This setting specifies how to handle the Byte Order Mark (BOM) when Oxygen XML Editor saves a UTF-8 XML document:
  • Keep (default) - Do not alter the BOM declaration of the currently open file.
  • Write - Save the BOM bytes.
  • Don't Write - Do not save the BOM bytes. Loaded BOM bytes are ignored.
Note: The UTF-16 BOM is always preserved. UTF-32 documents have a big-endian byte order.
Encoding errors handling
This setting specifies how to handle characters that cannot be represented in the character encoding that is used when the document is opened. The available options are:
  • REPORT (default) - Displays an error identifying the character that cannot be represented in the specified encoding. Unrecognized characters are rendered as an empty box.
  • REPLACE - The character is replaced with a standard replacement character. For example, if the encoding is UTF-8, the replacement character has the Unicode code FFFD, and if the encoding is ASCII, the replacement character code is 63.
  • IGNORE - The error is ignored and the character is not included in the document displayed in the editor.
    Attention: If you edit and save the document, the characters that cannot be represented in the specified encoding are dropped.
Encoding for Base64, Base32, Hex conversions
Specifies the encoding to be used when invoking the Encode Selection or Decode Selection actions for Base64, Base32, or Hex conversions. The default setting is UTF8.
Encode non-ASCII characters in URL paths
If selected (default), Oxygen XML Editor will escape non-ASCII characters (encode them with their hexadecimal equivalent) within URL paths. If you are using a non-Latin alphabet (such as Arab, Japanese, Chinese), it may be beneficial to deselect this option so that non-ASCII characters in URL paths will not be escaped and will remain more readable.