note 31324 modified in function.convert-cyr-string by vrana
| From: | vrana@php.net | Date: | Tue, 17 Aug 2004 14:55:20 +0000 |
| Subject: | note 31324 modified in function.convert-cyr-string by vrana | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-79851@lists.php.net to get a copy of this message | ||
I hope it to you we shall help
<?php
function win_to_utf8($str){
$str = convert_cyr_string($str, 'w','i'); // w - windows-1251 to i -
iso8859-5
$str = utf8_encode ($str); // iso8859-5 to utf8
return $str;
}
function utf8_to_win($str){
$str = utf8_decode ($str); // utf8 to iso8859-5
$str = convert_cyr_string($str, 'i','w'); // w - windows-1251 to i -
iso8859-5
return $str;
}
?>
If there are questions - shall help. Good luck friends!!!
--was--
I hope it to you we shall help
function win_to_utf8($str){
$str = convert_cyr_string($str, 'w','i'); // w - windows-1251 to i -
iso8859-5
$str = utf8_encode ($str); // iso8859-5 to utf8
return $str;
}
function utf8_to_win($str){
$str = utf8_decode ($str); // utf8 to iso8859-5
$str = convert_cyr_string($str, 'i','w'); // w - windows-1251 to i -
iso8859-5
return $str;
}
If there are questions - shall help. Good luck friends!!!
http://php.net/manual/en/function.convert-cyr-string.php