Sb2 : I/O : null : UTF-16 fails on import

When attempting to import a UTF-16 file, I got nought but weirdness. Two odd characters, and quite a lot of seemingly empty space that I could only see if all text was selected.

As mentioned in the changes list, import uses UTF8 - so if a plain text file doesn’t import, you’ll have to change it to UTF8 first. This is HUGELY problematic and a massive pain, frankly. In b2, import used ASCII - which meant importing UTF8 was a pain.

The trouble is that there is no simple way in Cocoa to determine what sort of plain text file is being imported; the Cocoa-text system doesn’t automatically figure this out and import accordingly.

So the question is, which should be the default text encoding for import? No matter what, some won’t work and will have to be converted. I looked into how TextEdit goes about this, but it’s spaghetti-code-a-go-go and very difficult to figure out. And as Scrivener is a rich text program, plain text import has never been a massive personal priority.

Suggestions welcome. :slight_smile:

Yeah, I think sticking with UTF-8 is the best thing to do, once you put it that way!