mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-12-12 09:20:36 +00:00
LibTextCodec: Avoid duplicate definition of standard encodings
This commit is contained in:
parent
03b11af00f
commit
aa3d915260
Notes:
sideshowbarker
2024-07-18 22:40:58 +09:00
Author: https://github.com/BenWiederhake Commit: https://github.com/SerenityOS/serenity/commit/aa3d9152601 Pull-request: https://github.com/SerenityOS/serenity/pull/5192 Reviewed-by: https://github.com/awesomekling Reviewed-by: https://github.com/bcoles Reviewed-by: https://github.com/emanuele6 Reviewed-by: https://github.com/linusg
1 changed files with 1 additions and 2 deletions
|
@ -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)
|
||||
|
|
Loading…
Reference in a new issue