我们也可以在以下代码中使用这些编码mb_convert_encoding()
:
// Cyrillic script such as Russian, Bulgarian, Serbian Cyrillic and other languages Windows-1251 ~= ISO-8859-5
// Latin alphabet Windows-1252 ~= ISO-8859-1 // sometimes called incorrectly "ANSI"
//modern Greek. It is not capable of supporting the older polytonic Greek. It is not fully compatible with ISO 8859-7 because the letters like Ά are located at different byte values Windows-1253 ~= ISO-8859-7
// Turkish Windows-1254 = ISO-8859-9
// Hebrew Windows-1255 = ISO-8859-8
// Arabic script like Persian and Urdu Windows-1256 ~= ISO-8859-6
// Estonian, Latvian and Lithuanian languages Windows-1257 != ISO-8859-4
// Vietnamese texts. It is very similar to Windows-1252 with the differences being that s-caron and z-caron Windows-1258 ~= Windows-1252
我将这些代码用于波斯文件名:
$filename=iconv('UTF-8','Windows-1256//IGNORE',$filename);