Sarajevo, Bosnia and Herzegovina

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

Thinking out of the box

Employee “A” in a company walked up to his manager and asked what my job is for the day? *     The manager took “A” to the bank of a river and asked him to cross the river and reach the other side of the bank. *     “A” completed this task successfully and reported back to […]

Read more