Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

List of supported encodings #116

Open
GreyCat opened this issue Feb 18, 2017 · 2 comments
Open

List of supported encodings #116

GreyCat opened this issue Feb 18, 2017 · 2 comments

Comments

@GreyCat
Copy link
Member

GreyCat commented Feb 18, 2017

Transferring question from kaitai-io/kaitai_struct_formats#5:

https://github.com/kaitai-io/kaitai_struct/wiki/Expressions has this example:

seq:
  - id: filename_len
    type: u4
  - id: filename
    type: str
    size: filename_len
    encoding: UTF-8

Other than UTF-8, which encodings are supported? Would be useful to have this list documented somewhere :)

My original reply:

Unfortunately, there's no list of encodings per se in Kaitai Struct. Most of the time, encoding ID as passed as is to the target language, so it ultimately depends on the the target language.

For example:

It would be a good idea to make a KS "standard" of encoding names and do a hard mapping table for every supported language, but it's a fair amount of work and, as of now, it still works in 99% of cases, I guess.

@GreyCat
Copy link
Member Author

GreyCat commented Feb 18, 2017

Just for the record: I've tried to start collecting information on current situation with encodings, and, well, it's a mess and it's huge.

Here it is: https://docs.google.com/spreadsheets/d/1l87kGi9_U4Xrgaw2CGaTc9-_f5UEf1nf-68Dk_e1_iA/edit?usp=drive_web

If someone would want to continue this work, please tell me.

@arekbulski
Copy link
Member

There is an issue about UTF16 UTF32 specifically, related. #187

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants