About File Encodings

See Also

When creating a file for a project, the files are created using the specified project encoding. Some file types declare the encoding in the file, e.g. HTML, JSP, and XML files. Therefore, when the IDE creates these files, it automatically includes character encoding declarations in the file template.

When determining the character encoding for a file, the IDE applies the FileEncodingQuery (FEQ) layer model. It first determines whether the encoding is declared in the file. If no encoding declaration can be found, the IDE presumes the file encoding is specified by the project's encoding property. If the project encoding is not specified (e.g. imported or older projects), the IDE applies the encoding set by the environment in which it runs.

Setting Character Encoding for Files

To change the encoding for a file (e.g. HTMl, XML, or JSP files) you need to change the encoding and charset specified in the corresponding tag in the file. When an encoding is specified in a file, this setting overrides the encoding set in the project.

To manually change the character encoding for a file:

  1. Open the file in the Source editor.
  2. Modify the encoding and charset tags for the file, if available.

See Also
About Project Encodings

Legal Notices