JetBrains Rider
 
Get JetBrains Rider
Get your hands on the new features ahead of the release by joining the Early Access Program for Rider 2025.1! Learn more

Encoding

Last modified: 08 October 2024

To display and edit files correctly, JetBrains Rider needs to know which encoding to use. Source code files are usually encoded in UTF-8. This is the recommended encoding unless you have other requirements.

To determine the encoding of a file, JetBrains Rider uses the following steps:

  • If the byte order mark (BOM) is present, JetBrains Rider will use the corresponding Unicode encoding regardless of all other settings. For more information, refer to Byte order mark.

  • If the file declares the encoding explicitly, JetBrains Rider will use the specified encoding. For example, this can apply to XML, HTML, and JSP files. The explicit declaration also overrides all other settings, but you can change it in the editor.

  • If there is no BOM and no explicit encoding declaration in the file, JetBrains Rider will use the encoding configured for the file or directory in the file encoding settings. If encoding is not configured for the file or directory, JetBrains Rider will use the encoding of the parent directory. If the parent directory encoding is also not configured, JetBrains Rider will fall back to the Project Encoding, and if there is no project, to Global Encoding.