I'm struggling to write a string into a JPG's Exif: user comments section, that contains the degress symbol (°).
But it constantly writes out a '?' character in its place.
ex.
NSString *xmlData = [[NSString alloc] initWithUTF8String:"°,\xC2\xB0,\u00b0"];
[EXIFDictionary setObject:xmlData forKey:(NSString*)kCGImagePropertyExifUserComment];
Results in:
?,?,?
This doesn't work either:
NSString *xmlData = [[NSString alloc] initWithFormat:@"43, °, \xC2\xB0, \u00b0, 21'45\""];
NSLog displays the '°' of course. But when I use an EXIF viewer to actually read the data saved within the JPG, it still comes out as '?'.
Some more info. Once the properties are written, ex.
[metadataAsMutable setObject:EXIFDictionary forKey:(NSString *)kCGImagePropertyExifDictionary];
The result from NSLog looks like this:
UserComment = "43, \U00b0, \U00b0, \U00b0, 21'45\"";
Has anyone had success with this?