Is there a recommended way of detecting/reading non-UTF8 text files?
One of my apps lets users import CSV files. Recently a German user reported that the import wasn't working, and we think we've narrowed it to the file encoding.
Encoding: He's saving his CSV file in "normal" encoding for Windows in Germany, which is probably 1252: Windows Western European. But it's not importing on his Android device.
(He emailed that file to me, and it imports fine on my phone, but I'm wondering if that's because I downloaded it to my PC, put it on Google Drive, imported it from there using ContentChooser, and perhaps somewhere in there it was converted to UTF8?)
I suppose I could just tell users that the file must be UTF8 with a comma, regardless of their own locale settings, but that might be hard for non-technical users to deal with.
Is there a way that I can:
- detect/handle likely encodings that are not UTF8?
- detect/handle a delimiter that is not a comma? (e.g. semi-colons are common in Europe, apparently)
Thanks for any tips!