java - Text view displays Arabic characters as question marks "?????" -
i'm working on android app displays textviews
mixed arabic , english words;
the app displays arabic text wrote inside java classes question marks ????? here screenshot:
the code:
if(tcat.equals("standardt_")){ serviceline="operations / خدمات عامة"; } tv.settext(serviceline);
what have tried:
decoding characters in android , no not same question , answers didn't help.
how support arabic text in android? i'm using new version supports arabic , tried answer adding
farsi
class or usingarabicutilities
classes didn't work etheri tried encode string utf-8
try { serviceline= urlencoder.encode(serviceline, "utf-8");} catch(unsupportedencodingexception e){ e.printstacktrace(); }
and didn't work!
- also tried using multiple fonts not single typeface solved problem.
so i'm kind of stuck here, ideas?
edit: after closed android studio , reopened app of text wrote inside java classes turned question marks! though tried write again, once closed project , reopened it, displays arabic text question marks inside java classes before run application , awkward!
you need set file encoding of file contains arabic text utf-8.
this how change file encoding inside android-studio.
Comments
Post a Comment