Re: [code] [textadept] Encoding and display

From: Qwerky <>
Date: Wed, 24 Jul 2019 15:45:44 -0600

Hi Mitchell,

Thanks.  Don't know how I missed the status bar display of encodings!

Anyway, I added the line " io.encodings[#io.encodings + 1] = 'CP1252' "
to my init.lua, following the example in the api, and reset, but when
opening my file, it wasn't auto-detected?


On 2019-07-24 15:16, Mitchell wrote:
> Hi,
> On Wed, 24 Jul 2019, Qwerky wrote:
>> Gabriel,
>> Thank you so much!  I copied your function to menu.lua, made it a local
>> function, and added an entry to the Encoding submenu to call it.  When
>> calling it on my test file, it worked fine, and the file was displayed
>> properly.  This is a great help!  :-)  Too bad TA doesn't auto-detect
>> that
>> encoding, as it is very common on my system.
> Now that you know what it is, you can make Textadept auto-detect it:
> This is part of the FAQ by the way. I forgot about that.
>> Also, I found out that using the command line (as you did) would work
>> only if
>> I left the function as global, and not as local; so with a local
>> function,
>> I'm not sure how I could call it from the command line.
>> One question, though:  you said you "opened it with Textadept (at
>> which point
>> it was displayed in the encoding ISO-8859-1)".  I'm wondering how one
>> can
>> tell what encoding a file is currently displayed as?
> Textadept displays the encoding it is using at the bottom right of the
> statusbar (or perhaps the middle if you still have your statusbar
> swapped).
> Cheers,
> Mitchell

You are subscribed to
To change subscription settings, send an e-mail to
To unsubscribe, send an e-mail to
Received on Wed 24 Jul 2019 - 17:45:44 EDT

This archive was generated by hypermail 2.2.0 : Thu 25 Jul 2019 - 06:33:50 EDT