2

CentOS サーバーに PHP がインストールされています。ここから (PHP FTP を使用して) IIS を実行している Windows FTP サーバーにファイルを転送したいと考えています。ファイル名に非ラテン文字が含まれていると、ファイル名が「تست.3gp」のような名前に変更されます(CentOSでの名前は تست.3gp です)何度も検索しましたが、解決策はありません。どうすればこれを修正できますか?

Windows は CP-1252 (Windows-1252) を文字セットとして使用し、CentOS は文字セットとして UTF-8 を使用すると思います。iconv()しかし、これをand で変換してもmb_convert_encoding()うまくいきませんでした。

4

2 に答える 2

0

多くの研究の後、私は自分の答えを見つけました。ウィンドウは、言語ごとに異なる文字セットを使用します。これらの文字セットへのコーディングには、次のクラスを使用できます

于 2013-03-03T11:18:36.597 に答える
0

また、これらのコーディングを で使用できます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);
于 2013-03-03T12:13:18.667 に答える