Better warning for smart quotes in C code
||Date Originated:||21-Jun-2012 11:24 PM|
21-Jun-2012 11:24 PM Steven Fisher:
Please add a better warning when a smart quote is encountered in Objective-C source. This can happen when copy-pasting code from blogs.
Smart quotes and straight quotes are fairly similar on screen, and can be hard to pick out. However, using smart quotes gives you a strange error message, seemingly unrelated to the smart quote.
NSDateFormatter *UTCFormatter = [[NSDateFormatter alloc] init];
UTCFormatter.timeZone = [NSTimeZone timeZoneWithName:@“UTC”];
Unexpected @ in program.
Found a string using smart quotes: @“UTC”.
Fix to @"UTC"?
Reports posted here will not necessarily be seen by Apple.
All problems should be submitted at bugreport.apple.com before they are posted here.
Please only post information for Radars that you have filed yourself, and please do
not include Apple confidential information in your posts. Thank you!