[webkit-changes] [WebKit/WebKit] 996fc9: The EUC-TW encoding doesn't have a canonical name

Myles C. Maxfield noreply at github.com
Mon Nov 7 22:25:23 PST 2022


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 996fc9db28be5ace21aed6dfccc9290d3f87d142
      https://github.com/WebKit/WebKit/commit/996fc9db28be5ace21aed6dfccc9290d3f87d142
  Author: Myles C. Maxfield <mmaxfield at apple.com>
  Date:   2022-11-07 (Mon, 07 Nov 2022)

  Changed paths:
    A LayoutTests/imported/w3c/web-platform-tests/encoding/resources/unsupported-labels.window.js
    A LayoutTests/imported/w3c/web-platform-tests/encoding/unsupported-labels-expected.txt
    A LayoutTests/imported/w3c/web-platform-tests/encoding/unsupported-labels.html
    A LayoutTests/platform/gtk/imported/w3c/web-platform-tests/encoding/unsupported-labels-expected.txt
    M Source/WebCore/PAL/pal/text/TextCodecICU.cpp

  Log Message:
  -----------
  The EUC-TW encoding doesn't have a canonical name
https://bugs.webkit.org/show_bug.cgi?id=246242
rdar://100893154

Reviewed by Alex Christensen.

ucnv_getCanonicalName("EUC-TW", "IANA") is returning nullptr, which is causing
us to memcmp(nullptr, ...). This patch reorganizes the file to call ucnv_getName()
in the situations where ucnv_getCanonicalName() is returning nullptr, thereby
elliminating the need for all the special cases.

Test: imported/w3c/web-platform-tests/encoding/unsupported-labels.html

* Source/WebCore/PAL/pal/text/TextCodecICU.cpp:
(PAL::TextCodecICU::registerCodecs):
(PAL::TextCodecICU::TextCodecICU):

Canonical link: https://commits.webkit.org/256438@main




More information about the webkit-changes mailing list