I need to convert a KOI8-R encoded string into plain UTF8
You can use mb_convert_encoding
:
$output = mb_convert_encoding($input, 'UTF-8', 'KOI8-R');
$output = iconv('KOI8-R', 'UTF-8', $input);
also worked :)
There is also the option for it to remove corrupt or unrecognized characters
iconv("KOI8-R", "UTF-8//IGNORE", $text)
But you need iconv to be installed.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With