문제

I am getting this string from server in response, which is actually in arabic "نريد أن نرى هذا في اللغة العربية"

You can see this text in arabic on browser like this : نريد أن نرى هذا في اللغة العربية browser automatically shows text in arabic. for former i have put code tag so it is showing codes...

Now I want to show it on UILabel in arabic fonts, how would I do that?

Please help..

Thanks

도움이 되었습니까?

해결책

If you convert each 4 text digit decimal number in the server response string to a C int, then you can convert each character to an NSString using something like:

int c = ... /* your 4 text digit unicode ordinal converted to an integer */
charString = [ NSString stringWithFormat:@"%C", c ];

You might also be able to ask a UIWebView to run a line of Javascript and return an NSString.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top