skip to main |
skip to sidebar
how to remove bom from unicode file
remove the Unicode Byte-Order Mark (BOM) from all your files... to find them on a linux box do the following:
find /path/to/editor -type f | while read line; do hd "$line" | grep -q 'ef bb bf' && echo "$line"; done > listOfBOMedFiles.txt
to remove them then:
cat listOfBOMedFiles.txt | while read line; do dd if=$line of=$line.noBOM ibs=3 skip=1; mv $line.noBOM $line; done
Комментариев нет:
Отправить комментарий