Closed clayheaton closed 11 years ago
Nevermind... I just realized that I needed to set _encoding
to NSUTF8StringEncoding
in the -init
method.
Maybe I should change the default to UTF-8.
Probably a good idea.
Done.
BTW: The reason that Latin 1 was the default is that this codebase has quite a few years of history. I strongly recommend using UniversalDetector along with this code!
I'm trying to parse a CSV file that contains some UTF-8 characters. Here are a few example strings;
http://commons.wikimedia.org/wiki/File:Şahlûr-33.jpg
Dûrzan cîrano / CC BY-SA 3.0
Christian Mehlführer / CC-BY 2.5
In the case of the last string, it is parsed into the array as:
Christian Mehlf\U00c3\U00bchrer / CC-BY 2.5
The UTF-8 hex of ü is
C3 BC
, present in the string. How do you convert from the imported string to an NSString? I've having trouble with this - it looks like the unicode escaping is incorrect?