X-Git-Url: http://wagnertech.de/gitweb/gitweb.cgi/kivitendo-erp.git/blobdiff_plain/470a8fa1710b22e2b381eef4cacb01bebaeff725..211de9e3a7748d80cada65e5dde13a41b9e3f749:/SL/Iconv.pm diff --git a/SL/Iconv.pm b/SL/Iconv.pm index d6ea0cbdf..19b8ca169 100644 --- a/SL/Iconv.pm +++ b/SL/Iconv.pm @@ -37,7 +37,10 @@ sub convert { $to_charset ||= Common::DEFAULT_CHARSET; my $converter = _get_converter($from_charset, $to_charset); - return $converter->convert($text); + $text = $converter->convert($text); + $text = decode("utf-8-strict", $text) if ($to_charset =~ m/^utf-?8$/i) && !Encode::is_utf8($text); + + return $text; } sub _convert {