ios - NSUserDefaults. Retrieving incorrect values -


i saving few dictionaries in nsuserdefaults way:

if ([[nsuserdefaults standarduserdefaults] objectforkey:@"event_states"] == nil)     {         nsdictionary *dict0 = [nsdictionary dictionarywithobjectsandkeys:                               @"923381dc-3dcb-46ca-a6cf-c58a7af33b89",@"guid",                                @"В планах",@"name", //this string returned corrupted                               [nsnumber numberwithint:12632256],@"color",                               [nsnumber numberwithint:0],@"isclosed",                               [nsnumber numberwithint:0],@"isfinish",                    nil]; // , few more dictionaries same way         ....          [[nsuserdefaults standarduserdefaults] setobject:@[dict0,dict1,dict2,dict3] forkey:@"event_states"];         [[nsuserdefaults standarduserdefaults] synchronize];     }      nsarray *event_states = [[nsuserdefaults standarduserdefaults] objectforkey:@"event_states"]; 

when retrieving data logging , have strange behavior. in cases retrieving correct value this:

name = "\u0412 \u043f\u043b\u0430\u043d\u0430\u0445"  

but in cases this:

name = "\u0412\u044b\u043f\u043e\u043b\u043d\u0435\u043d(\u043e) 

and last part in parenthesis symbol , can't understand why appears , dependence on when appears , when it's not. can wrong this?

i tried convert unicode readable string , paste in google translate

\u0412 \u043f\u043b\u0430\u043d\u0430\u0445 => В планах => plans \u0412\u044b\u043f\u043e\u043b\u043d\u0435\u043d(\u043e) => Выполнен(о) => complete ? 

so think happened because code not api.


Popular posts from this blog

php - How should I create my API for mobile applications (Needs Authentication) -

5 Reasons to Blog Anonymously (and 5 Reasons Not To)

Google AdWords and AdSense - A Dynamic Small Business Marketing Duo