PyCharm 2.7.2 Web Help

There are two modes of dealing with file encoding:

PyCharm suggests the following major ways to change encoding:

PyCharm also supports configuring encoding for properties files.

To configure encoding for a directory or file without embedded encoding information
  1. Open Project Settings dialog and select File Encodings.
  2. The File/Directory column shows the tree view of your project. The Default Encoding column shows encoding for directories or files. Click the Default encoding column for a directory or file you want to define encoding for, and then choose the desired encoding from the drop-down list:

    encoding.png

To change encoding of a file that contains explicit encoding
  1. Open the desired file in the editor.
  2. Change explicit encoding information. Use error highlighting to recognize wrong encoding and press Ctrl+SpaceCtrl+Space to have a list of available encodings displayed:

    encoding3.png

To change encoding of a single file that doesnt contain explicit encoding
  1. Open the desired file for editing.
  2. Do one of the following:
    • On the main menu, point to File | File encoding.
    • Click file encoding on the Status bar.
  3. Choose Reload in or Convert to, and then select the desired encoding from the pop-up window.

    encoding2.png

See Also

Concepts:

Procedures:

Reference:

Web Resources: