I am quite new to both Java and Android.
I am trying to initialize String with russian chars
lesson.addUnit(new NounUnit("Schiff", "Корабль", NounUnit.Gender.NEUTRAL));
lesson.addUnit(new NounUnit("Tafel", "Доска, панель", NounUnit.Gender.FEMININUM));
lesson.addUnit(new NounUnit("Lineal", "Линейка чертежная", NounUnit.Gender.NEUTRAL));
However when I open my debugger I saw some strange chars
[–,ö,–,æ,—,Ä,–,∞,–,±,–,ª,—,å] instead of Корабль
File is in UTF-8 format so this is not an issue I also tried to set russian locale
Locale locale = new Locale("ru");
Locale.setDefault(locale);
This does not help.
PS: I am using Android Studio as IDE - probably this is the issue
Often much is misleading, hence the following steps:
javac -encoding UTF-8."\u041a\u043e\u0440\u0430\u043b\u044c". This is an editor independent representation of "Корабль", and lets you see whether the .java was encoded right when running.If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With