Fix unicode special characters not displayed properly in interfaces

Hi guys, quick tip:

I've noticed that special characters present in Language.properties file appears as a question mark (?) in configuration interfaces generated by Object Class Definit (@Meta.OCD) when using Java 8, like shown below:

My Language.properties file has only one line:

address=Endereço

And my configuration interface has this attribute definition:
    @Meta.AD(
        name = "address",
        required = false,
        deflt = ""
    )
    public String address();

But, when I deploy my application and access third party configuration it show as follow:

After some unsucessful research, I've found that if I change Language.properties file encoding from ISO-8859-1 to UTF-8 in properties option of context menu when right-click the file on Liferay IDE it works!

@edit: Christoph Rabel warned me in the comments that ALL language properties files for liferay should be in utf-8, BUT java default until java 9 is ISO-8859-1.

After applying, my file changed as shown below:

address=Endere�o

So I've changed it back to "endereço" and deployed:

And now it's displayed as it should.

Blogs

All Language.properties files in Liferay have to be in UTF-8 format. Not only for the configuration interface but everywhere.

Java standard was  ISO-8859-1 and that was only changed in Java 9, but Liferay always used UTF-8.