Eclipse.properties file disables UTF-8 character escaping

I use * .properties files in my java / android applications for my translation files. My problem is that the .properties files are in eclipse escape utf-8 characters that are not ISO-8859-1 encoded, so I see escaped characters. So I decided to create my own library that reads a file in utf-8 format. BUT Eclipse still escapes characters. Is there a way to make eclipse * .properties descriptor files as plain text files?

+4
source share
2 answers

Right-click on the properties file. On the "Resource" tab in the lower right corner, check "Text File Encoding" and change it to UTF-8.

+8
source

Do not call their .properties files, give them a different file extension, and they will only be processed by a text editor, not a property file editor.

Even without an editing problem, you should not call their .properties, since they do not comply with the Java properties file standard, which may confuse other developers in this project, other tools, etc.

The best solution, however, is one more: drop your self-made implementation and get the best editor for property files , which displays the characters you want to read them, regardless of how they are encoded in the file.

0
source

Source: https://habr.com/ru/post/1441202/


All Articles