походу нет
i..e must be smth like that:
$find = array("/Ä/","/ä/","/Ö/","/ö/","/Ü/","/ü/","/ß/");
$replace = array(chr(128),chr(138),chr(133),chr(154),chr(134),chr(159),chr(167));
$exportstring = preg_replace($find,$replace,$exportstring);
-~{}~ 08.02.07 19:11:
setlocale(LC_ALL,"de_DE");
$num = '4';
$string = "This string has four words. ö ü ";
$string = ereg_replace('four', $num, $string);
echo $string;
не работает
-~{}~ 08.02.07 19:14:
ТАК ВОТ тоже не работает...
echo $string;
$string = iconv("ISO-8859-1", "UTF-8", "This is a test. ö ü ");
echo $string;
-~{}~ 09.02.07 12:26:
Автор оригинала: horal
походу нет
i..e must be smth like that:
$find = array("/Ä/","/ä/","/Ö/","/ö/","/Ü/","/ü/","/ß/");
$replace = array(chr(128),chr(138),chr(133),chr(154),chr(134),chr(159),chr(167));
$exportstring = preg_replace($find,$replace,$exportstring);
-~{}~ 08.02.07 19:11:
setlocale(LC_ALL,"de_DE");
$num = '4';
$string = "This string has four words. ö ü ";
$string = ereg_replace('four', $num, $string);
echo $string;
не работает
-~{}~ 08.02.07 19:14:
ТАК ВОТ тоже не работает...
echo $string;
$string = iconv("ISO-8859-1", "UTF-8", "This is a test. ö ü ");
echo $string;
А РЕШЕНИе оказалось как всегда простым:
function convert_text($str)
{
$out = '';
for ($i = 0; $i<strlen($str);$i++)
{
$ch = ord($str{$i});
switch($ch)
{
case 252: $out .= "ü" ;break; // chr(129);break; //u Umlaut
case 220: $out .= "Ü"; break; //chr(154);break;//U Umlaut
case 228: $out .= "ä" ; break;// chr(132);break;//a Umlaut
case 196: $out .= "Ä" ; break;//chr(142);break;//A Umlaut
case 214: $out .= "Ö" ; break;//chr(153);break;//O Umlaut
case 246: $out .= "ö" ; break;//chr(148);break;//o Umlaug
case 223: $out .= "ß" ;break;//chr(225);break;//SZ
default : $out .= chr($ch) ;
}
}
return $out;
}
вот так вот. Пользуйтесь на здоровье!