when uploading a file to obtain the file name encoding, the prompt is CP936
format
mb_detect_encoding($file_name, array("ASCII","GB2312","GBK","UTF-8"));
Baidu says that CP936 is actually GBK. But using
iconv("CP936", "UTF-8//IGNORE", $file_name);
when transcoding, the code is garbled, and the result is uploaded room.png
. The original file name is queue. PNG
does not transcode, and it is also the name saved locally. PNG
when directly saved locally.
I would like to ask how to transcode a file whose name is in the format of CP936
.