Android Studio does not display correct English characters

2

My project is not displaying any Portuguese characters correctly. When I display a string as "no", it displays "no."

The strange thing is that when I call the direct string of res/string.xml , it works correctly. Anyone have any idea why? I already asked in the StackOverflow gringo and no one could answer me.

What I've tried so far:

File - > Settings - > Editor - > File Encondings, I put everything UTF-8 and even some others, I gave rebuild / clean in the project and nothing, it's still the same.

If necessary, I can record a video and watch it on YouTube to show!

EDIT:

    
asked by anonymous 21.05.2015 / 18:39

1 answer

1

This looks like this is what happens when you read multiple bytes and convert each byte individually to a character, ignoring the fact that some characters need more than one byte to be encoded.

Since even the strings in your source code are being corrupted and the source code is in UTF-8, try passing -encoding UTF-8 as command-line parameters to the java compiler. For example:

javac -encoding UTF-8 SuaClasse.java
    
21.05.2015 / 19:33