In IOS Google places API with web service gave output in Unicode Character 'DEVANAGARI LETTER NA' (U+0928)

173 Views Asked by At

In Google Places API Web Service I get output in Unicode Character 'DEVANAGARI LETTER NA' (U+0928) how can I handle that

I have found two URL for Google places API

 NSString* baseUrl = [NSString stringWithFormat:@"https://maps.googleapis.com/maps/api/place/queryautocomplete/json?input=%@&key=%@&types=all", SearchtextField,API_KEY];

 NSString* baseUrl = [NSString stringWithFormat:@"https://maps.googleapis.com/maps/api/place/queryautocomplete/json?input=%@&location=27.7089603,85.3261328&radius=50000&key=%@&types=all",SearchtextField,API_KEY];

language value &language=en-GB doesn't work out to get only english results

NSString* baseUrl = [NSString stringWithFormat:@"https://maps.googleapis.com/maps/api/place/queryautocomplete/json?input=%@&language=en-GB&location=27.7089603,85.3261328&radius=50000&key=%@&types=all",SearchtextField,API_KEY];

I get results like below

searchResult :(
    "Lainchaur, Kathmandu, Central Region, Nepal",
    "Lainchaur Marg, Kathmandu, Central Region, Nepal",
    "Lainchaur Bus Stop, Leknath Marg, Kathmandu, Central Region, Nepal",
    "Lainchaur Banquet, \U0932\U0948\U0928\U091a\U094c\U0930, \U092e\U0927\U094d\U092f\U092e\U093e\U091e\U094d\U091a\U0932, \U0928\U0947\U092a\U093e\U0932"
)

when i print the string for Unicode character it is like this

Lainchaur Banquet, लैनचौर, मध्यमाञ्चल, नेपाल

I need to implement geocode from search text to get respective Latitude, Longitude. I have used following URL for it . every things works fine but when there is Unicode Character geocode cant be performed

 NSString *lookUpString = [NSString stringWithFormat:@"http://maps.googleapis.com/maps/api/geocode/json?address=%@&sensor=true", SearchtextField];

I have previous questions related to that too

Forward geocoding doesnt give correct results

0

There are 0 best solutions below