Panos
Panos

Reputation: 7427

Eclipse .properties file disable escaping of UTF-8 characters

I'm using *.properties files in my java/android applications for my translations files. My problem is that .properties files in eclipse escape utf-8 characters that are out of the ISO-8859-1 charset so I see the escaped characters. So I decided to make my own library that reads the file in utf-8 format. BUT eclipse still escapes characters. Is there any way to make eclipse handle *.properties files as normal text files??

Upvotes: 4

Views: 8487

Answers (2)

Panos
Panos

Reputation: 7427

Right Click on the file, properties. Under "resource" tab , check for "Text File Encoding" at the bottom right and change that to UTF-8.

Upvotes: 8

Bananeweizen
Bananeweizen

Reputation: 22080

Don't call them .properties files, give them another file extension and they will be handled by the text editor only, instead of the properties file editor.

Even without the editing issue you should not call them .properties, as they are not compliant to the Java properties file standard, which might confuse other developers on that project, other tools and so on.

The best solution however is yet another one: Throw away your selfmade implementation and get yourself a better editor for properties files, which shows you the characters as you want to read them, independent of how they are encoded in the file.

Upvotes: 1

Related Questions