Created
November 25, 2013 03:01
-
-
Save mistbow/7635607 to your computer and use it in GitHub Desktop.
convert_file_encoding
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| // convert file from GBK to UTF8 | |
| $file = "filename"; | |
| $content = file_get_contents($file); | |
| $cotennt = mb_convert_encoding($content, 'UTF8', 'GBK'); | |
| file_put_contents($file . ".utf8", $content); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment