lite icon indicating copy to clipboard operation
lite copied to clipboard

Non-utf8 file support

Open LaineZ opened this issue 4 years ago • 3 comments

Seems like lite currently supports only UTF-8 encoded files, files encoded in another codepages not displayed correctly and their editing is impossible.

Steps to reproduce that problem:

  1. Create file encoded other than UTF-8 in any editor, or just print to file in windows console (IIRC output is saved in CP-037 codepage) I used Notepad++ to create file in windows-1251 codepage RQaL2xj 1 Here you can see that lite cannot display correctly that file and cannot properly edit them. This may be the reason why non-latin paths do not work in windows in #13

LaineZ avatar Apr 13 '20 13:04 LaineZ

Firstly I appreciate the effort put into this pull request, always helpful when screenshots are provided! Unfortunately supporting anything but utf-8 is outside the scope of the core project, though it should be possible to add it using the plugin system by overriding the Doc.save and load functions to perform the conversion.

This is unrelated to #13 as far as I understand.

rxi avatar Apr 13 '20 18:04 rxi

supporting only utf-8 is OK (maybe worth mentioning in the readme). but opening a non utf-8 file should lead to an error message - currently the editor ignores this fact (and treats the file as utf-8).

pznknmtb avatar May 10 '20 09:05 pznknmtb

Aw, really? My use case for a lightweight text editor is non-code text files, and the text files I deal with are usually old Shift-JIS files. I was hoping Lite could replace Notepad++ for me there.

obskyr avatar Jun 07 '20 06:06 obskyr