-
-
Notifications
You must be signed in to change notification settings - Fork 31.3k
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
Refresh big5hkscs mapping to HKSCS-2016 #93271
Comments
What about following these processes?
|
Is the question for me or for a topic expert? In the solution @corona10 suggested, I would still recommend to update from 2004 to 2008 because it only adds characters, so the compatibility is trivial. I would even suggest to make it happen in 3.11 beta. Regarding HKSCS-2016, things are more complex. It formally doesn't specify a Big-5 mapping, and they don't publish files for Big-5 mappings like they did for versions up to 2008. So what I had in mind was more like "Big-5 based on HKSCS-2008 but fixed up to use modern characters", but that's exactly what introduces compatibility questions. Moreover, this is a moving target. The published data for HKSCS is a JSON file which is continuously updated. There is no 2016 file1, it gets refreshed any time there is an amendment. By the time Python 3.13 is out, it could be that either new amendments will have come up, or a new version of the standard is released. And with each change to HKSCS, Python would need to make even more decisions about compatibility with Big-5. It probably doesn't fit the usual deprecation cycle. I don't know if the users of Personally I would care more about a decoder that is compatible with the notion of Big-5 in the web platform (I say "decoder" because the encoding is not fully specified), so I'm ok with dropping the idea of following HKSCS 2016-and-later. Reformulating the proposal:
(The three points are a bit different in scope, so I would repurpose this issue for 1, and maybe open new ones for 2 and 3) Footnotes
|
I think either update |
While working on #84508 I noticed that the mapping for
big5hkscs
codec has not been updated in a while. The current version in CPython reflects the Big-5 mappings for HKSCS-2004.Since then, there have been some updates:
I can update the script and generate the mapping using the latest data available on the CCLI website, since I was already looking into this.
If we care about refreshing
big5hkscs
at all, there are a couple questions about compatibility. In case mapping a Big-5 code X used to map to Unicode code point A (in HKSCS-2004), and is changed to map to B (in later versions):should we: decode X to A, or to B?
should we: encode B to X, A to X, or both?
E.g. right now the Big-5 sequence 9D73 round-trips:
If we followed the new HKSCS-2016 mapping with no compatibility provisions, this round-trip would instead go through the newly mapped character
\u9fd0
. This might be fine for some users, but it might break compatibility for others. So the questions are about what kind of compatibility we want to guarantee.Related question which should not block this issue. For the web platform, WHATWG defines a Big5 encoding which includes HKSCS extensions, and already overlaps 99% with
big5hkscs
, but is incompatible in some cases. Since one of the users of the CPython CJK codecs is html5lib, this means that html5lib does not comply with the web platform specifications. Should CPython be concerned with this, since it already provides the codec and the mapping tables, and it could provide a web-compatible codec with just a few fixups? Or does this belong in third-party libraries?The text was updated successfully, but these errors were encountered: