Mehic.info

Category Archives: Technology

Posts related to my job or interests

UTF8 without BOM

Printing a list of files with byte order mark (BOM) character in folder : grep -rl $’\xEF\xBB\xBF’ folderName   Removing BOM from file  : tail –bytes=+4  fileName.php > fileName.php   Or just insert in your .php code next line : //Set the encoding to UTF-8, so when reading files it ignores the BOM       mb_internal_encoding(‘UTF-8’); Happy coding:)

Read more