How to find and replace a particular unicode character with a non-unicode character in an NSString?
问题 I am being provided a string that may have a unicode apostrophe in it (\u2019) and I must replace it with a standard apostrophe (plain old "'"). I usually use stringByReplacingOccurrencesOfString to do this kind of thing but trying this does not work: sMyString = [sMyString stringByReplacingOccurrencesOfString:@"\\u2019" withString:@"'"]; Makes sense that it didn't work I guess since the actual values representing the apostrophe internally in the NSString will be numeric. Anyone know how to