Setting Character Encoding for Java Files

See Also 

By default, the IDE displays and saves all of your files in your system's default character encoding. This character encoding determines how the IDE interprets characters beyond the ASCII character set. You can specify character encoding at the IDE default level or for individual files.

You can also set the encoding that is used by different compiler types at compile time. When you compile a file, the IDE looks for encoding settings in the following order:

  1. In the settings for the compiler type associated with the file.
  2. In the individual file's Encoding property.
  3. In the Default Encoding property for Java Sources settings.
  4. The system's default encoding.

To set the character encoding for a compiler type:

  1. Choose Tools and choose Options from the Main Window.
  2. Expand Building and expand Compiler Types and select a compiler type.
  3. Enter the encoding name in the Encoding property. If you do not want to specify the encoding for the compiler type, leave the property blank.

To set the character encoding for a file:

  1. Right-click the file's Filesystems window node and choose Properties.
  2. Enter the encoding name in the Encoding property. If you do not want to specify the encoding at this level, leave the property blank.

To set the default character encoding for the IDE or a project:

  1. Choose Tools and choose Options from the Main Window.
  2. Expand the Editing node and select Java Sources.
  3. Enter the encoding name in the Default Encoding property. To use your system's default encoding, leave the property blank.

For more information on supported encodings, see:

http://java.sun.com/j2se/1.4.2/docs/guide/intl/encoding.doc.html
See Also
Synchronizing Source Code
Using the Import Management Tool
Configuring Java Settings
Compiler Types in the IDE

Legal Notices