Wednesday, May 23, 2012

Arabic characters issue

I have some problems with displaying some Arabic text in my iPhone application. When I am displaying it on a UILabel, it shows like ?????? ????? ?????? The string comes from server as XML, I parse it and display on a UILabel. I dont know this is due to a problem in iPhone or from Server side.

  • I want to know how can I determine the string coming from server is having correct encoding and is a valid Arabic characters.

  • Is it suffice to print value each character and check it lies between Arabic Unicode characters. (Like ASCII value of character A is 65 and that of Z is 90. So a value 70 must be a ASCII character).

  • In server the string is encoded with UTF8 encoding. And server program written in c#. What is the write encoding method to transfer Arabic text from server to iPhone?

  • Do I need to use other fonts to display Arabic characters correctly.

  • Is there any XML file with Arabic content in Internet, from where I can parse and display arabic text correctly?

Thanks in advance..


When I NSLogged XML data I got same ???? ???? ??? characters.


See a XML styled data that I got in console.

<SCA_LONG_NAME>???? ????? ?????????? ????? ?????????</SCA_LONG_NAME>
<SCA_SHORT_NAME>???? ????? ?????????</SCA_SHORT_NAME>

No comments:

Post a Comment