ios - Xcode 7 - /n vs. /u2028 in Strings within plist -
having weird issue can't seem figure out. have plist contains strings line breaks. i'm using xcode plist editor. perform line break, pressed option+return within strings want them, , shows fine in editor.
the weird behavior: when have app parse these strings, of strings show \n put break, , other strings show \u2028 instead. understand reading these both escapes, can't figure out why xcode gives me 1 or other. there way can force give me \n instead of \u2028? i'd rather not have manually process strings after-the-fact change it
example:
"hello\nworld!" - want , this...
"hello\u2028world!" - don't want , this...
pulling hair out. thanks!
edit: here's how i'm getting strings.
in .plist editor:
in .plist, have dictionary. in dictionary strings. "created , defined" in editor.
in code:
//get config variables nsstring *path = [[nsbundle mainbundle] pathforresource:@"variables" oftype:@"plist"]; vars = [[nsdictionary alloc] initwithcontentsoffile:path]; nsstring *blah = [vars objectforkey:@"somestring"]; nslog(@"%@", blah);
Comments
Post a Comment