Encoding

The Encoding preferences panel is opened from menu OptionsPreferences+Encoding

Figure 5.4. The Encoding preferences panel

The Encoding preferences panel

Encoding for non XML files

This option defines the default encoding to be used when opening non XML documents. This is necessary because non XML files have a large variety of formats and there is no standard mechanism for declaring the encoding that should be used for opening and saving the file. In case of XML files the encoding is usually declared at the beginning of the file in a special declaration or it assumes the default value UTF-8.

Encoding errors handling

This option defines how to handle characters that cannot be represented in the specified encoding of the document when the document is opened. The available options are:

  • REPORT - Show an error dialog with the character that cannot be represented in the specified encoding and allow the user to decide how to continue (ignore that character, replace it with a standard replacement character). This is the default option.

  • IGNORE - The character is ignored and it will not be included in the document displayed in the editor panel.

  • REPLACE - Replace the character 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 character code is 63.