问题
The following code doesn't work:
NSString *importText = [textView.string stringByReplacingOccurrencesOfString:@"\xA0\xA0"
withString:@" "];
Compiler claims: "Input conversion stopped due to an input byte that don't belong to the input code set UTF8"
回答1:
Try the Unicode escape sequence \u00a0.
来源:https://stackoverflow.com/questions/12643955/how-to-replace-xa0-characters-in-an-nsstring