-
Notifications
You must be signed in to change notification settings - Fork 89
Description
Results for a series of tests for GBK encoding/decoding can be found at
https://www.w3.org/International/tests/repo/results/encoding-dbl-byte.en#gbk
The tests can be run from that page (select the link in the left-most column) or get the tests from the WPT repo. There is a PR at
web-platform-tests/wpt#3194
The test check whether:
- the browser produces the expected byte sequences for all characters in the gbk encoding after 0x9F when encoding bytes for a URL produced by a form, using the encoder steps in the specification.
- the browser produces percent-escaped character references for a URL produced by a form when encoding miscellaneous characters that are not in the gbk encoding (tests for several ranges).
- same two types of test when writing characters to an href value
- the browser decodes all characters as expected from a file generated by encoding all pointers in the gbk encoding per the encoder steps in the specification.
- when decoding gbk text, the browser uses replacement characters as described by the algorithm in the Encoding spec.
The following summarises the current situation according to my testing, for major desktop browsers. (I will be adding nightly results and perhaps other browsers in time.) The table lists the number of characters that were NOT successfully converted by the test.
Notes:
- all href tests fail for Edge because characters are not converted to percent-escapes
- Firefox consistently falls to produce expected results for href tests for character not in the gbk encoding
Can we please investigate the failures to ascertain whether:
- the browser needs to be changed
- the spec needs to be changed
- the test is at fault
The following tool may be helpful for investigating issues. It converts between byte sequences and characters for all encodings in the Encoding spec. http://r12a.github.io/apps/encodings/
