UTF-8 encoding yields weird characters in Android
I have an Android app where I need to output some characters shich are not
ASCII. My Java file where I set those characters is encoded as UTF-8:
public void onItemCheckedStateChanged(ActionMode mode, int position,
long id, boolean checked) {
mode.setSubtitle(llista.getCheckedItemCount() + " elements
sel·leccionats.");
}
@Override
public boolean onCreateActionMode(ActionMode mode, Menu menu) {
mode.setTitle("Sel·lecciona!");
MenuInflater inflater = mode.getMenuInflater();
if (inflater != null) {
inflater.inflate(R.menu.menudetallllista, menu);
}
return true;
}
But the output I get is this:
Is there any way to fix this besides changing the file Encoding to
Windows-1252?
No comments:
Post a Comment