Different results compiling with Eclipse and Android Studio

I have o project made in Eclipse and now I'm migrating to Android Studio.

I have a class that the character encoding defined is


. In this class I have a string like this
String aString = " µg";
. Now the strange thing. If I compile with Eclipse, in my app, in the listview where I have to show
, it is displayed as expected. If I compile the exact same project (without doing any changes) in Android Studio, now I the listview,
is displayed like
" µg"

I now that the simple solution is to compile to Eclipse but I would like to understand why Android Studio is behaving this way and if there is anything I can so that the project compiled with Android Studio, display the string as expected.
Comment actions Permalink

I don't work on Android, just a common question on encodings.

If you open Settings / File Encodings, what are values of "IDE Encoding" and "Project Encoding"? If not yet UTF-8, could you try set that and rebuild?


Comment actions Permalink

Hi Alexender.

Thanks for your answer. I've previusly tried to do that but the result was the same.

I've found the solution after I harcoded as " \u00B5g"

Not the best solution but it works.



Please sign in to leave a comment.