Re: [code] ΄πΈ΄: [code] [textadept] Could you please give me advice to configure encoding menu correctly?

From: Mitchell <>
Date: Tue, 25 Jul 2017 22:03:47 -0400 (EDT)

Hi Yuki,

On Tue, 25 Jul 2017, Outlook Yuki wrote:

> Hi Mitchell
>> What you can try to do is manually set `buffer.encoding = 'CP932'` via the command entry, and then try and select the "CP932" encoding from the menu in order to "reset" the display encoding.
> Thank you for your comment.
> I tried above steps, but same error is shown unfortunately.

Sorry, then I do not know how to best handle this. When Textadept opens a file, it tries to convert its text from an encoding to UTF-8, and then stores the UTF-8 internally. In your case, Textadept opens your CP932 file, assumes it is encoded in CP936, converts that to UTF-8 (which produces no error), and then (inaccurately) marks the file as CP936. Later, if you try to change the file to its correct CP932 encoding, Textadept converts from UTF-8 to CP936, CP936 to CP932, and then CP932 back to UTF-8 for internal storage. However, the CP936 to CP932 conversion fails, presumably because the original, incorrect CP936 to UTF-8 conversion caused an issue.

All of this can be seen in Textadept's *core/file_io.lua* file in the `io.open_file()` and `set_encoding()` functions. Perhaps you will have some idea on how we can fix this.


You are subscribed to
To change subscription settings, send an e-mail to
To unsubscribe, send an e-mail to
Received on Tue 25 Jul 2017 - 22:03:47 EDT

This archive was generated by hypermail 2.2.0 : Wed 26 Jul 2017 - 06:34:51 EDT