Developer

Configuring Eclipse File Encoding for Agentry Projects

Configure the Eclipse IDE to use UTF-16 as the text file encoding format for the Agentry application files, and then configure the Java project to use UTF-8 for Java project files.

Prerequisites

  • Install the Eclipse platform and the Agentry Editor plug-in.
  • Configure file associations for .bmp, .sql, .bat, and .sh file types, as needed.
  • Identify the file encoding format for any Java source files used within the same workspace as the Agentry application project.

Context

Most Agentry application files are encoded in UTF-16 format; however, some external project files may be encoded in a different format, such as UTF-8. You can set file encoding preferences for an individual Java project to reflect how the Java source files were encoded when created.

Procedure

  1. From the Eclipse main menu, select Start of the navigation path Window Next navigation step Preferences End of the navigation path.
  2. In Preferences page, select Start of the navigation path General Next navigation step Workspace End of the navigation path.
  3. Under Text file encoding, click Other, select UTF-16 from the drop-down list, then click OK.
    If you do not plan to open a Java project in the same workspace, or if the Java project files are encoded with UTF-16, no further action is needed. Otherwise, continue to the next step to indicate the file encoding format for the Java project files..
  4. Switch to the Java perspective in Eclipse and open the Java project for this same workspace. Select the menu item Project | Properties.

    This will display the Properties page for the java project:


  5. In the tree control to the left select the item Resource. Then look for the section Text file encoding. Select the radio button Other and then select the proper encoding option based on the encoding of the source files in the Java project. Note that if these files are encoded in either ASCII or UTF-8, then UTF-8 can be selected. For other file encoding formats select the proper item.
  6. Click the [OK] button to close the Properties page and save these changes.

Results

This procedure results in changing the Eclipse workspace’s default file encoding for all text files to the unicode format UTF-16. This is the encoding in which all text files created by the Editor are formatted. The exception to this are java source files.