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:

enter image description here

the code:

if(tcat.equals("standardt_")){      serviceline="operations / خدمات عامة";  } tv.settext(serviceline); 

what have tried:

  1. decoding characters in android , no not same question , answers didn't help.

  2. how support arabic text in android? i'm using new version supports arabic , tried answer adding farsi class or using arabicutilities classes didn't work ether

  3. i tried encode string utf-8

    try { serviceline= urlencoder.encode(serviceline, "utf-8");} catch(unsupportedencodingexception e){ e.printstacktrace(); }

and didn't work!

  1. 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

Popular posts from this blog

Android : Making Listview full screen -

javascript - Parse JSON from the body of the POST -

javascript - Chrome Extension: Interacting with iframe embedded within popup -