Adding BOM to UTF-8 files
The easiest way I found for this is #!/usr/bin/env bash #Add BOM to the new file printf ‘\xEF\xBB\xBF’ > with_bom.txt # Append the content of the source file to the new file cat source_file.txt >> with_bom.txt I know it uses an external program (cat)… but it will do the job easily in bash Tested on … Read more