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

UTF-8

. 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
aString
, it is displayed as expected. If I compile the exact same project (without doing any changes) in Android Studio, now I the listview,
aString
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.
2 comments

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?

Regards,
Alexander.

0

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.

kodiak

0

Please sign in to leave a comment.