| @@ 1897-1904 (lines=8) @@ | ||
| 1894 | */ |
|
| 1895 | public static function to_utf8($string) |
|
| 1896 | { |
|
| 1897 | if (is_array($string)) { |
|
| 1898 | foreach ($string as $k => $v) { |
|
| 1899 | /** @noinspection AlterInForeachInspection */ |
|
| 1900 | $string[$k] = self::to_utf8($v); |
|
| 1901 | } |
|
| 1902 | ||
| 1903 | return $string; |
|
| 1904 | } |
|
| 1905 | ||
| 1906 | $string = (string)$string; |
|
| 1907 | ||
| @@ 4134-4142 (lines=9) @@ | ||
| 4131 | */ |
|
| 4132 | public static function fix_utf8($string) |
|
| 4133 | { |
|
| 4134 | if (is_array($string)) { |
|
| 4135 | ||
| 4136 | foreach ($string as $k => $v) { |
|
| 4137 | /** @noinspection AlterInForeachInspection */ |
|
| 4138 | $string[$k] = self::fix_utf8($v); |
|
| 4139 | } |
|
| 4140 | ||
| 4141 | return $string; |
|
| 4142 | } |
|
| 4143 | ||
| 4144 | $last = ''; |
|
| 4145 | while ($last <> $string) { |
|