diff --git a/include/class.charset.php b/include/class.charset.php index e3697dd5877e622a2b0a4dbeccacd1d0db43f29b..aa26cb2ccb36cb4232c144408d2405430dde3fe6 100644 --- a/include/class.charset.php +++ b/include/class.charset.php @@ -24,16 +24,16 @@ class Charset { $match = array(); switch (true) { // Windows charsets - force correct format - case preg_match('`^Windows-?(\d+)$`', $charset, $match): + case preg_match('`^Windows-?(\d+)$`i', $charset, $match): return 'Windows-'.$match[1]; // ks_c_5601-1987: Korean alias for cp949 - case preg_match('`^ks_c_5601-1987`', $charset): + case preg_match('`^ks_c_5601-1987`i', $charset): return 'cp949'; - case preg_match('`^iso-?(\S+)$`', $charset, $match): + case preg_match('`^iso-?(\S+)$`i', $charset, $match): return "ISO-".$match[1]; // Incorrect, bogus, ambiguous or empty charsets // ISO-8859-1 is assumed - case preg_match('`^(default|x-user-defined|iso|us-ascii)`', $charset): + case preg_match('`^(default|x-user-defined|iso|us-ascii)$`i', $charset): case preg_match('`^\s*$`', $charset): return 'ISO-8859-1'; }