summaryrefslogtreecommitdiff
path: root/roundcubemail/program/include/main.inc
diff options
context:
space:
mode:
authorthomasb <thomasb@208e9e7b-5314-0410-a742-e7e81cd9613c>2006-09-19 18:14:38 +0000
committerthomasb <thomasb@208e9e7b-5314-0410-a742-e7e81cd9613c>2006-09-19 18:14:38 +0000
commit968a2e52e2ab2e9f0305c3c0fb00ea6a127e87f3 (patch)
treefd2ecc313b2e2f06871e317dd24d995fdbf7c4f0 /roundcubemail/program/include/main.inc
parenta28d4a54f4db471769d2ca205955c7639695fe88 (diff)
Correct UTF-7 to UTF-8 conversion if mbstring is not available
git-svn-id: https://svn.roundcube.net/trunk@348 208e9e7b-5314-0410-a742-e7e81cd9613c
Diffstat (limited to 'roundcubemail/program/include/main.inc')
-rw-r--r--roundcubemail/program/include/main.inc4
1 files changed, 2 insertions, 2 deletions
diff --git a/roundcubemail/program/include/main.inc b/roundcubemail/program/include/main.inc
index bbda83aa7..c6e9857b0 100644
--- a/roundcubemail/program/include/main.inc
+++ b/roundcubemail/program/include/main.inc
@@ -893,7 +893,7 @@ function rcube_charset_convert($str, $from, $to=NULL)
// convert string to UTF-8
if ($from=='UTF-7')
- $str = rcube_charset_convert(UTF7DecodeString($str), 'ISO-8859-1');
+ $str = utf7_to_utf8($str);
else if (($from=='ISO-8859-1') && function_exists('utf8_encode'))
$str = utf8_encode($str);
else if ($from!='UTF-8')
@@ -904,7 +904,7 @@ function rcube_charset_convert($str, $from, $to=NULL)
// encode string for output
if ($to=='UTF-7')
- return UTF7EncodeString(rcube_charset_convert($str, 'UTF-8', 'ISO-8859-1'));
+ return utf8_to_utf7($str);
else if ($to=='ISO-8859-1' && function_exists('utf8_decode'))
return utf8_decode($str);
else if ($to!='UTF-8')