PHP将字符串从ASCII转换为UTF-8 / WINDOWS-1255

时间:2019-04-07 17:25:30

标签: php utf-8 ascii windows-1255

此ASCII字母(MS-DOS希伯来语/ CP862):

  

需要输出以下内容(UTF-8 / Windows-1255):

  

א

到目前为止,这些方法没有任何结果:

$string = "€";
echo iconv('CSPC862LATINHEBREW', 'Windows-1255',  $string);
echo iconv('CSPC862LATINHEBREW', 'UTF-8',  $string);
echo iconv('CSPC862LATINHEBREW', 'CP862',  $string);

echo mb_convert_encoding($string, 'UTF-8', 'CSPC862LATINHEBREW');
echo mb_convert_encoding($string, 'Windows-1255', 'CSPC862LATINHEBREW');
echo mb_convert_encoding($string, 'CP862', 'CSPC862LATINHEBREW');

0 个答案:

没有答案