Last active
April 1, 2022 07:42
-
-
Save aircokol/cc721e35dfbd69c5ee6bd9b180570fd6 to your computer and use it in GitHub Desktop.
add BOM to fix UTF-8 in Excel
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 | |
| $fh = fopen($filename, 'w'); | |
| //add BOM to fix UTF-8 in Excel | |
| fputs($fh, $bom =( chr(0xEF) . chr(0xBB) . chr(0xBF) )); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment