Commit 0c890cd0 authored by mku's avatar mku

ZP-470 #comment BB 10 high characters broken in replied/forwarded emails

git-svn-id: https://z-push.org/svn/z-push/trunk@1756 b7dd7b3b-3a3c-0410-9da9-bee62a6cc5b5
parent e63adb77
......@@ -798,12 +798,34 @@ class Utils {
public static function ConvertCodepageStringToUtf8($codepage, $string) {
if (function_exists("iconv")) {
$charset = self::GetCodepageCharset($codepage);
return iconv($charset, "utf-8", $string);
}
return $string;
}
/**
* Converts a string to another charset.
*
* @param int $in
* @param int $out
* @param string $string
*
* @access public
* @return string
*/
public static function ConvertCodepage($in, $out, $string) {
// do nothing if both charsets are the same
if ($in == $out)
return $string;
if (function_exists("iconv")) {
$inCharset = self::GetCodepageCharset($in);
$outCharset = self::GetCodepageCharset($out);
return iconv($inCharset, $outCharset, $string);
}
return $string;
}
/**
* Returns the best match of preferred body preference types.
*
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment