diff options
author | Ben Wiederhake <BenWiederhake.GitHub@gmx.de> | 2021-01-30 20:39:00 +0100 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2021-02-01 09:54:32 +0100 |
commit | aa3d915260135d62f8995c718738bf3385ec9a1f (patch) | |
tree | 35c2a16a46df9345a8174e506b6514317b2224d6 /Userland | |
parent | 03b11af00fdcf41e7476969f3345c32e6c1d8754 (diff) | |
download | serenity-aa3d915260135d62f8995c718738bf3385ec9a1f.zip |
LibTextCodec: Avoid duplicate definition of standard encodings
Diffstat (limited to 'Userland')
-rw-r--r-- | Userland/Libraries/LibTextCodec/Decoder.cpp | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/Userland/Libraries/LibTextCodec/Decoder.cpp b/Userland/Libraries/LibTextCodec/Decoder.cpp index 8cbc68df01..7eb089c962 100644 --- a/Userland/Libraries/LibTextCodec/Decoder.cpp +++ b/Userland/Libraries/LibTextCodec/Decoder.cpp @@ -162,8 +162,7 @@ String get_standardized_encoding(const String& encoding) bool is_standardized_encoding(const String& encoding) { - auto lowercase_encoding = encoding.to_lowercase(); - return lowercase_encoding.is_one_of("utf-8", "ibm666", "iso-8859-2", "iso-8859-3", "iso-8859-4", "iso-8859-5", "iso-8859-6", "iso-8859-7", "iso-8859-8", "iso-8859-8-I", "iso-8859-10", "iso-8859-13", "iso-8859-14", "iso-8859-15", "iso-8859-16", "koi8-r", "koi8-u", "macintosh", "windows-874", "windows-1250", "windows-1251", "windows-1252", "windows-1253", "windows-1254", "windows-1255", "windows-1256", "windows-1257", "windows-1258", "x-mac-cyrillic", "gbk", "gb18030", "big5", "euc-jp", "iso-2022-JP", "shift_jis", "euc-kr", "replacement", "utf-16be", "utf-16le", "x-user-defined"); + return encoding.equals_ignoring_case(get_standardized_encoding(encoding)); } String UTF8Decoder::to_utf8(const StringView& input) |