开发者

Special Character in UserName for iPhone app

Have so开发者_如何学Cme special character in username like tüser, when i try to add it into NSMutableDictionary it is adding in a different format. Let me know how to resolve this issue.


What do you mean with different format? If you are using NSLog to print the content of dictionary, you might see it escape some special characters, but you'll still be able to access the value using that key.

NSMutableDictionary * dictionary = [NSMutableDictionary dictionary];
[dictionary setObject: @"hello" forKey: @"tüser"];
NSLog(@"Dictionary: %@", dictionary);
NSLog(@"Value: %@", [dictionary objectForKey: @"tüser"]);

Output:

Dictionary: { "t\U00fcser" = hello; }

Value: hello

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜