Bug 265261 - Unsupport encodings (e.g., 'x-mac-turkish', 'x-mac-greek' etc.) WPT failures
Summary: Unsupport encodings (e.g., 'x-mac-turkish', 'x-mac-greek' etc.) WPT failures
Status: REOPENED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Text (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL: http://wpt.live/encoding/unsupported-...
Keywords: BrowserCompat, InRadar, WPTImpact
Depends on: 267969 270658
Blocks: 179303
  Show dependency treegraph
 
Reported: 2023-11-22 12:10 PST by Ahmad Saleem
Modified: 2024-03-07 14:24 PST (History)
6 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Ahmad Saleem 2023-11-22 12:10:31 PST
Hi Team,

While going through WPT failures, I came across following failing test in Safari / WebKit.

WPT Test Case: https://wpt.fyi/results/encoding/unsupported-labels.window.html?label=master&label=experimental&aligned&q=safari%3Afail

Just wanted to raise so we can track it.

Adding 'BrowserCompat' since only Safari / WebKit is failing them.

___

Following are not supported by Encoding Standard:

> euc-tw
> windows-936-2000
> x-mac-ce
> x-mac-centraleurroman
> x-mac-greek
> x-mac-turkish

^ few are mentioned here with comment that they are not in standard: https://searchfox.org/wubkat/source/Source/WebCore/PAL/pal/text/TextCodecICU.cpp#97

____

Thanks!
Comment 1 Radar WebKit Bug Importer 2023-11-29 12:11:20 PST
<rdar://problem/118944539>
Comment 2 Ahmad Saleem 2023-12-21 06:25:34 PST
> Source/WebCore/PAL/pal/text/TextCodecCJK.cpp

In -- TextCodecCJK::registerEncodingNames --

Remove > "windows-936-2000"_s

> Source/WebCore/PAL/pal/text/TextCodecICU.cpp

In -- DECLARE_ALIASE --

Remove from '/ Encodings below are not in the standard.' onward:

DECLARE_ALIASES(x_mac_greek, "windows-10006"_s, "macgr"_s, "x-MacGreek"_s);
DECLARE_ALIASES(x_mac_centraleurroman, "windows-10029"_s, "x-mac-ce"_s, "macce"_s, "maccentraleurope"_s, "x-MacCentralEurope"_s);
DECLARE_ALIASES(x_mac_turkish, "windows-10081"_s, "mactr"_s, "x-MacTurkish"_s);

and

In -- EncodingName --

Remove:

// Encodings below are not in the standard.
    DECLARE_ENCODING_NAME("x-mac-greek"_s, x_mac_greek),
    DECLARE_ENCODING_NAME("x-mac-centraleurroman"_s, x_mac_centraleurroman),
    DECLARE_ENCODING_NAME("x-mac-turkish"_s, x_mac_turkish),
    DECLARE_ENCODING_NAME_NO_ALIASES("EUC-TW"_s),

___

It progresses all failing WPT tests.
Comment 3 Ahmad Saleem 2023-12-29 22:45:08 PST
@Karl - is there any internal requirement by Apple to retain or I can try to do PR and match other browsers?
Comment 4 Ahmad Saleem 2023-12-30 06:31:17 PST
Just running through EWS to see how many more tests to modify and if there are anything else platform specific - https://github.com/WebKit/WebKit/pull/22273 (In Draft).
Comment 5 Ahmad Saleem 2024-03-05 19:17:07 PST
Just to update - looks now ready to go (even if we don't land right now - it will be good for future reference) - https://github.com/WebKit/WebKit/pull/22273
Comment 6 EWS 2024-03-07 10:41:22 PST
Committed 275797@main (a78cd83130cb): <https://commits.webkit.org/275797@main>

Reviewed commits have been landed. Closing PR #22273 and removing active labels.
Comment 7 WebKit Commit Bot 2024-03-07 13:36:42 PST
Re-opened since this is blocked by bug 270658