Skip to content

Conversation

@eugeneia
Copy link

@eugeneia eugeneia commented Apr 4, 2018

GB 2312, GB 18030 and GBK 1.0 are compatible encodings, see
https://en.wikipedia.org/wiki/GB_18030

GB 2312, GB 18030 and GBK 1.0 are compatible encodings, see
https://en.wikipedia.org/wiki/GB_18030
@luismbo
Copy link
Member

luismbo commented Apr 4, 2018

Does compatible imply that GB 18030 is a superset of those character sets? UTF-8 and the various ISO-8859-* encodings are also compatible with ASCII but ASCII is not (and should not be) an alias for any of those.

@eugeneia
Copy link
Author

eugeneia commented Apr 6, 2018

Difficult to tell. I found some useful information here: https://en.wikipedia.org/wiki/GB_2312#Two_implementations_of_GB2312

W3C's technical recommendation specifies a GBK encoding to be inferred for streams labelled gb2312, which in turn uses a GB18030 decoder.

As far as I understand the formats should be able to be implemented by a single encoding (the implementation of :gbk?) that maps to Unicode code points. The differences between GB* seem to be about what they “map to”, and not what they “map from”. Apparently, versions of GB* mapped to Unicode private use codepoints before the appropriate Unicode codepoints were defined by the consortion.

Since :gbk is broken as of this time (see #31), I don’t think there is a correct solution here at the moment.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants