When reading a text file that was created somewhere else outside my application, the encoding used is unknown. My application uses NSUnicodeStringEncoding (which is similar to NSUTF16StringEncoding), so there are problems with reading other than UTF16 encoded files.
Is there any way to guess the file encoding? My priority is to be able to read UTF8 files, and then all other files. Is iteration available encodings and checks if the read string length is greater than zero, is this really a good approach?
Thanks in advance.
Ignacio
nacho4d
source share