How do I read the .enc files in /usr/lib/tcl8.6/encoding/

I’m developing a cross-platform library & launcher pair to address cross-platform ABI development and would like to skoot around the inherit limitations of the WideCharToMulitByteChar/MultiByteCharToWideChar API by just implementing support for a standard that allows more options in the future.

To this end I dug around my linux system looking for hints on why string names are used in iconv instead of codepages like windows does and found the various .enc files with matching names. While I can see they are text files from the mimetype and can even open them in text editors the clear binary blobs are meaningless to me at the moment and I’ve been unsuccessful in searching for the related documentation. I would greatly appreciate a link to the documentation I should be looking at. I’ll pin the tab and check back tomorrow morning to see if anyone responded.

These files?

I doubt you have to do anything here unless you write your program in TK

Thanks, not writing in tk but I do need a file format that defines how to translate between unicode and the encoding the file is for. That is why I was looking for how to read those files so I could implement a reader for it in my library which would result in supporting every encoding so long as the encoding has a matching file on the local system.

While I can hazard a guess from the ascii.enc file what the block of hex at the bottom is for and what the S on the second line is for, I’m still unable to work out what lines 3 and 4 hold. So far I’ve yet to spot the related documentation in the links given but I do appreciate being able to narrow my search from the whole internet to tk docs :slight_smile:

Edit: If you know of a better file format to use then please do tell