PHP convert_cyr_string() Function

The convert_cyr_string() function converts a string from one Cyrillic character-set to another.

The supported Cyrillic character-sets are:

k – koi8-r

w – windows-1251

i – iso8859-5

a – x-cp866

d – x-cp866

m – x-mac-cyrillic

Example

<?php
$str = "Hello world! æøå";
echo $str . "<br>";
echo convert_cyr_string($str,'w','a');
?>

Output

Hello world! æøå
Hello world! ¦è¥ 

Leave a Reply

Your email address will not be published. Required fields are marked *