Under review

Fix encoding of opened files

Bachsau 4 years ago updated 4 years ago 2

Even though I set the default encoding to UTF-8 in textastic's settings, most of my scripts still open with a western encoding, breaking any UTF-8 encoded characters in them If I don't notice it fast enough to reload with UTF-8. This happens even if those scripts have a `# -*- coding: utf-8 -*-"` line or UTF-8 characters in the few view lines.

A correct encoding detection would only switch to western encoding if it encounters errors while trying to parse the file as UTF-8, not the other way around, since every byte is valid in western encodings, while a lot of combinations are invalid in UTF-8.

Under review


can you please send me such a file so I can try to find out why it doesn't use UTF-8 when opening these files (which it should)?