Php detects the file encoding method ,. Php checks the file encoding method. for file encoding detection, Baidu checks the encoding method, but it does not work. many people suggest mb_detect_encoding detection, but I do not know why php checks the file encoding method,
For the file encoding detection, Baidu regards it all, but it does not work,
Many people suggest mb_detect_encoding detection, but I don't know why I didn't succeed, and I didn't output anything,
I saw someone wrote an enhanced version, and I decided to ignore it with BOM. this is totally unreliable,
Finally, according to the example below the mb_detect_encoding function in the PHP manual, I wrote a detection function,
It also includes functions that automatically detect the encoding and read the file according to the instruction code,
The source code is presented.
I tried to write the online method without using it. maybe the environment is different.
So if it's useless, don't spray me, I just want to share ideas ,,
Text
Baidu regards the file encoding detection, but it does not work. many people suggest mb_detect_encoding detection, but somehow...