简体   繁体   中英

Xcode debugger displays string correctly but console does not

When I hover over my nsstring in the debugger, apostrophes and special characters show correctly, but when I print the nsstring to the console letters and numbers print fine as before but special characters are scrambled.

I'm creating my string from an array of chars

[code]char utf[10]; string = [NSString stringByAppendingFormat:@"%c",utf[i]";[/code]

If I try to create the string via stringWithUTF8String:&utf[i]; I get an unrecognized selector sent to instance [NSCFConstantString initWitjBytes....

特殊字符将作为UTF字符串打印。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM