From 8a92ba4f2fb6ead3964e65fde488369dc64e0bc2 Mon Sep 17 00:00:00 2001 From: Chris Xiong Date: Sat, 28 Sep 2024 01:54:33 -0400 Subject: fix building with system icu --- .../chromium-131-text_codec_icu-system-icu.patch | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 www-client/chromium/files/chromium-131-text_codec_icu-system-icu.patch (limited to 'www-client/chromium/files') diff --git a/www-client/chromium/files/chromium-131-text_codec_icu-system-icu.patch b/www-client/chromium/files/chromium-131-text_codec_icu-system-icu.patch new file mode 100644 index 0000000..50ada83 --- /dev/null +++ b/www-client/chromium/files/chromium-131-text_codec_icu-system-icu.patch @@ -0,0 +1,22 @@ +diff --git a/third_party/blink/renderer/platform/wtf/text/text_codec_icu.cc b/third_party/blink/renderer/platform/wtf/text/text_codec_icu.cc +index dfa1cb1369..ecffa654a2 100644 +--- a/third_party/blink/renderer/platform/wtf/text/text_codec_icu.cc ++++ b/third_party/blink/renderer/platform/wtf/text/text_codec_icu.cc +@@ -323,7 +323,7 @@ void TextCodecICU::CreateICUConverter() const { + DCHECK(!converter_icu_); + + #if defined(USING_SYSTEM_ICU) +- const char* name = encoding_.GetName(); ++ const char* name = encoding_.GetName().Utf8().c_str(); + needs_gbk_fallbacks_ = + name[0] == 'G' && name[1] == 'B' && name[2] == 'K' && !name[3]; + #endif +@@ -448,7 +448,7 @@ String TextCodecICU::Decode(base::span data, + // + // Simplified Chinese pages use the code A3A0 to mean "full-width space", but + // ICU decodes it as U+E5E5. +- if (!strcmp(encoding_.GetName(), "GBK")) { ++ if (!strcmp(encoding_.GetName().Utf8().c_str(), "GBK")) { + if (EqualIgnoringASCIICase(encoding_.GetName(), "gb18030")) + resultString.Replace(0xE5E5, kIdeographicSpaceCharacter); + // Make GBK compliant to the encoding spec and align with GB18030 -- cgit v1.2.3