Commit 33a542a2 authored by skummer's avatar skummer

ZP-470 #comment print warn message if iconv is not available

git-svn-id: https://z-push.org/svn/z-push/trunk@1757 b7dd7b3b-3a3c-0410-9da9-bee62a6cc5b5
parent 0c890cd0
...@@ -510,6 +510,9 @@ class Utils { ...@@ -510,6 +510,9 @@ class Utils {
if (function_exists("iconv")){ if (function_exists("iconv")){
return @iconv("UTF-7", "UTF-8", $string); return @iconv("UTF-7", "UTF-8", $string);
} }
else
ZLog::Write(LOGLEVEL_WARN, "Utils::Utf7_to_utf8() 'iconv' is not available. Charset conversion skipped.");
return $string; return $string;
} }
...@@ -525,6 +528,9 @@ class Utils { ...@@ -525,6 +528,9 @@ class Utils {
if (function_exists("iconv")){ if (function_exists("iconv")){
return @iconv("UTF-8", "UTF-7", $string); return @iconv("UTF-8", "UTF-7", $string);
} }
else
ZLog::Write(LOGLEVEL_WARN, "Utils::Utf8_to_utf7() 'iconv' is not available. Charset conversion skipped.");
return $string; return $string;
} }
...@@ -800,6 +806,9 @@ class Utils { ...@@ -800,6 +806,9 @@ class Utils {
$charset = self::GetCodepageCharset($codepage); $charset = self::GetCodepageCharset($codepage);
return iconv($charset, "utf-8", $string); return iconv($charset, "utf-8", $string);
} }
else
ZLog::Write(LOGLEVEL_WARN, "Utils::ConvertCodepageStringToUtf8() 'iconv' is not available. Charset conversion skipped.");
return $string; return $string;
} }
...@@ -823,6 +832,9 @@ class Utils { ...@@ -823,6 +832,9 @@ class Utils {
$outCharset = self::GetCodepageCharset($out); $outCharset = self::GetCodepageCharset($out);
return iconv($inCharset, $outCharset, $string); return iconv($inCharset, $outCharset, $string);
} }
else
ZLog::Write(LOGLEVEL_WARN, "Utils::ConvertCodepage() 'iconv' is not available. Charset conversion skipped.");
return $string; return $string;
} }
......
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