iphone - How to fill plist with key-value data by Russian words? -


this question has answer here:

i have nsdictionary this

nsdictionary *result = [[nsdictionary alloc]                         initwithobjectsandkeys:                         @"usa.png", @"США",                         @"ec.png", @"ЕС",                         @"russia.png", @"Россия",                         @"brazil.png", @"Бразилия",                                             ....... , more ......                         nil]; 

and want values dictionary sending string key eventcountry xml parser.

nsstring *countryimagestring = [self.countryset objectforkey:event.eventcountry];         if (countryimagestring.length == 0) {             calcell.countryimageview.image = [uiimage imagenamed:@"unknown.png"];         } else {             calcell.countryimageview.image = [uiimage imagenamed:countryimagestring];         } 

in nslog nsdictionary looks like

"\u0410\u0432\u0441\u0442\u0440\u0430\u043b\u0438\u044f" = "australia.png"; "\u0410\u0432\u0441\u0442\u0440\u0438\u044f" = "austria.png"; "\u0410\u043d\u0433\u043b\u0438\u044f" = "england.png"; "\u0410\u0440\u0433\u0435\u043d\u0442\u0438\u043d\u0430" = "argentina.png"; "\u0411\u0435\u043b\u044c\u0433\u0438\u044f" = "belgium.png"; "\u0411\u0440\u0430\u0437\u0438\u043b\u0438\u044f" = "brazil.png"; 

but eventcountry in utf-8. how can fill correctly plist file without \u0410\u0432\ characters or convert encoding on fly?

it's description method (which nslog() uses printing objects) of dictionary or array being dumb , unhelpfully escaping text. strings correct when written file.


Comments

Popular posts from this blog

css - Which browser returns the correct result for getBoundingClientRect of an SVG element? -

gcc - Calling fftR4() in c from assembly -

Function that returns a formatted array in VBA -