From f2bd6143d190a3a82bb7e85fc4520ab51b120af8 Mon Sep 17 00:00:00 2001 From: pdontthink Date: Wed, 25 Feb 2009 01:05:50 +0000 Subject: [PATCH] Ensure charset en/decode functions are found when case does not match. Thanks to Y@bon. (2634587) git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@13412 7612ce4b-ef26-0410-bec9-ea0150e637f0 --- include/languages.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/include/languages.php b/include/languages.php index 100a191b..149cce1c 100644 --- a/include/languages.php +++ b/include/languages.php @@ -340,10 +340,12 @@ function charset_convert($in_charset,$string,$out_charset,$htmlencode=true) { * @return string $charset Adjusted name of charset */ function fixcharset($charset) { - /* remove minus and characters that might be used in paths from charset + + /* Remove minus and characters that might be used in paths from charset * name in order to be able to use it in function names and include calls. + * Also make sure it's in lower case (ala "UTF" --> "utf") */ - $charset=preg_replace("/[-:.\/\\\]/",'_',$charset); + $charset=preg_replace("/[-:.\/\\\]/",'_', strtolower($charset)); // OE ks_c_5601_1987 > cp949 $charset=str_replace('ks_c_5601_1987','cp949',$charset); -- 2.25.1