diff options
| author | alec <alec@208e9e7b-5314-0410-a742-e7e81cd9613c> | 2010-01-09 18:28:01 +0000 |
|---|---|---|
| committer | alec <alec@208e9e7b-5314-0410-a742-e7e81cd9613c> | 2010-01-09 18:28:01 +0000 |
| commit | 9f1cec0ef50634ed4f5ad1b4ba973bdfedd98e27 (patch) | |
| tree | b75b92c67c9599b05da893d08a76808a807ae94a /roundcubemail/program/include | |
| parent | 176241a04a6e9f665699e80779fbb88781a97aba (diff) | |
- fix rc_utf8_clean() issues (#1486407)
git-svn-id: https://svn.roundcube.net/trunk@3195 208e9e7b-5314-0410-a742-e7e81cd9613c
Diffstat (limited to 'roundcubemail/program/include')
| -rw-r--r-- | roundcubemail/program/include/rcube_shared.inc | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/roundcubemail/program/include/rcube_shared.inc b/roundcubemail/program/include/rcube_shared.inc index 278f5a106..b3d9a179a 100644 --- a/roundcubemail/program/include/rcube_shared.inc +++ b/roundcubemail/program/include/rcube_shared.inc @@ -515,10 +515,10 @@ function rc_utf8_clean($input) return $input; // iconv/mbstring are much faster (especially with long strings) - if (function_exists('mb_convert_encoding') && ($res = mb_convert_encoding($input, 'UTF8', 'UTF8')) !== false) + if (function_exists('mb_convert_encoding') && ($res = mb_convert_encoding($input, 'UTF-8', 'UTF-8')) !== false) return $res; - if (function_exists('iconv') && ($res = iconv('UTF8', 'UTF8//IGNORE', $input)) !== false) + if (function_exists('iconv') && ($res = iconv('UTF-8', 'UTF-8//IGNORE', $input)) !== false) return $res; $regexp = '/^('. @@ -536,7 +536,7 @@ function rc_utf8_clean($input) $seq = ''; $out = ''; - for ($i = 0, $len = strlen($input)-1; $i < $len; $i++) { + for ($i = 0, $len = strlen($input); $i < $len; $i++) { $chr = $input[$i]; $ord = ord($chr); // 1-byte character |
