setText Arabic

20 views
Skip to first unread message

rami...@gmail.com

unread,
Mar 27, 2016, 6:27:59 AM3/27/16
to CodenameOne Discussions
 I have data come's from web service 
my data in Arabic Language  , when i try to do set text  in java  it's shown like ??????
my code is 

    TextArea AddressLable = findAddressLable(f);
       
String AddressString = info.get("address") + "";

         
if (!AddressString.equals("null"))
             
AddressLable.setText(AddressString);

Shai Almog

unread,
Mar 27, 2016, 10:53:53 PM3/27/16
to CodenameOne Discussions, rami...@gmail.com
Make sure your font supports Arabic.
Make sure the encoding is correct, we try to default to UTF-8 which is universal wherever possible but some Java API's aren't designed properly for those cases.
I suggest using the debugger and inspecting the strings to pinpoint the source more clearly.

rami...@gmail.com

unread,
Mar 29, 2016, 3:55:32 AM3/29/16
to CodenameOne Discussions, rami...@gmail.com
thanx it was encoding  case
Reply all
Reply to author
Forward
0 new messages