Bug 218380 - Align GBK and gb18030 encoder and decoder with specification and other browsers
Summary: Align GBK and gb18030 encoder and decoder with specification and other browsers
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: DOM (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Alex Christensen
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2020-10-30 04:21 PDT by Anne van Kesteren
Modified: 2020-11-05 18:02 PST (History)
10 users (show)

See Also:


Attachments
Patch (260.94 KB, patch)
2020-11-02 23:50 PST, Alex Christensen
ews-feeder: commit-queue-
Details | Formatted Diff | Diff
Patch (260.93 KB, patch)
2020-11-02 23:53 PST, Alex Christensen
no flags Details | Formatted Diff | Diff
Patch (264.00 KB, patch)
2020-11-03 08:49 PST, Alex Christensen
no flags Details | Formatted Diff | Diff
Patch (269.54 KB, patch)
2020-11-04 14:48 PST, Alex Christensen
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Anne van Kesteren 2020-10-30 04:21:44 PDT
This does not result in an error currently it seems. See step 3 of https://encoding.spec.whatwg.org/#gb18030-encoder.

https://github.com/web-platform-tests/wpt/pull/26317 will soon have an additional test for this.
Comment 1 Radar WebKit Bug Importer 2020-10-31 10:05:43 PDT
<rdar://problem/70917044>
Comment 2 Smoley 2020-10-31 10:07:10 PDT
Thanks for filing, if you have any other info to make this more actionable like a test case and steps to reproduce the issue (or lack of error in this case) please add it here.
Comment 3 Chris Dumez 2020-10-31 10:14:41 PDT
(In reply to Smoley from comment #2)
> Thanks for filing, if you have any other info to make this more actionable
> like a test case and steps to reproduce the issue (or lack of error in this
> case) please add it here.

Well, Anne provided the tests in the bug description:
https://github.com/web-platform-tests/wpt/pull/26317
Comment 4 Alex Christensen 2020-11-02 23:50:17 PST
Created attachment 413008 [details]
Patch
Comment 5 EWS Watchlist 2020-11-02 23:51:19 PST
This patch modifies the imported WPT tests. Please ensure that any changes on the tests (not coming from a WPT import) are exported to WPT. Please see https://trac.webkit.org/wiki/WPTExportProcess
Comment 6 Alex Christensen 2020-11-02 23:53:18 PST
Created attachment 413009 [details]
Patch
Comment 7 Yusuke Suzuki 2020-11-03 01:59:50 PST
Nice! Do you think we should file a bug to ICU about this encoding?
Comment 8 Alex Christensen 2020-11-03 08:49:26 PST
Created attachment 413064 [details]
Patch
Comment 9 Alex Christensen 2020-11-03 09:27:22 PST
(In reply to Yusuke Suzuki from comment #7)
> Nice! Do you think we should file a bug to ICU about this encoding?

This is one of many encodings where ICU differs from all browsers.  I'm planning to give them a report.
Comment 10 Alex Christensen 2020-11-03 10:12:10 PST
The tests I wrote have been submitted in a PR to wpt https://github.com/web-platform-tests/wpt/pull/26385
Comment 11 David Kilzer (:ddkilzer) 2020-11-04 10:59:36 PST
Comment on attachment 413064 [details]
Patch

r=me.  Please file bug reports for issues found in ICU, too.
Comment 12 Alex Christensen 2020-11-04 14:48:40 PST
Created attachment 413210 [details]
Patch
Comment 13 David Kilzer (:ddkilzer) 2020-11-04 15:08:49 PST
(In reply to Alex Christensen from comment #12)
> Created attachment 413210 [details]
> Patch

What changed?
Comment 14 Alex Christensen 2020-11-04 15:09:39 PST
I added another test showing the GBK decoding differences with Chromium.
Comment 15 EWS 2020-11-05 18:02:45 PST
Committed r269499: <https://trac.webkit.org/changeset/269499>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 413210 [details].