How to parse arabic as a keyword in json parser iphone

Does anyone know how to parse an Arabic keyword as a key, is this possible on iphone? Is there any solution?

[arr_brand addObject:[city2 valueForKeyPath:@"additional_attributes.راي بان"]]; 
+6
source share
2 answers

See if this works. You can replace special characters (*, /, [,], etc.) with Arabic:

 -(NSString *)stringUsingEncoding:(NSStringEncoding)encoding withString:(NSString *)params{ return (__bridge_transfer NSString *)CFURLCreateStringByAddingPercentEscapes(NULL, (__bridge CFStringRef)params, NULL, (CFStringRef)@"!*'\"();:@&+$,?%#[]% ", CFStringConvertNSStringEncodingToEncoding(encoding)); } 
0
source

Try to parse the letters as Unicode letters and HTML character parser.

+1
source

Source: https://habr.com/ru/post/946742/