Permalink
Browse files

switched to use mbstring whenever possible instead of iconv

  • Loading branch information...
1 parent b870328 commit 2011bd7db78e0b7e7ad0134d52e7fbbc0f9d09c0 @fabpot fabpot committed May 5, 2012
Showing with 3 additions and 3 deletions.
  1. +3 −3 PhpEngine.php
View
6 PhpEngine.php
@@ -507,10 +507,10 @@ function ($value) use ($that)
*/
public function convertEncoding($string, $to, $from)
{
- if (function_exists('iconv')) {
- return iconv($from, $to, $string);
- } elseif (function_exists('mb_convert_encoding')) {
+ if (function_exists('mb_convert_encoding')) {
return mb_convert_encoding($string, $to, $from);
+ } elseif (function_exists('iconv')) {
+ return iconv($from, $to, $string);
}
throw new \RuntimeException('No suitable convert encoding function (use UTF-8 as your encoding or install the iconv or mbstring extension).');

0 comments on commit 2011bd7

Please sign in to comment.