How to read and write an NSString with UTF8N? I use this to load a UTF-8 file and it seems to work with UTF-8N.
NSString *string = [NSString stringWithContentsOfFile:destPath encoding:NSUTF8StringEncoding error:&error];
The problem is when I save the file with
[string writeToFile:tempFile atomically:YES encoding:NSUTF8StringEncoding error:&error];
the file is not readable in a normal text editor on the computer. I can still read the file as a UTF-8 file though.
What am I missing?