Posted on :: Tags: , , , , ,

In yesterday’s post, I presented a Python script to convert Pelican preamble files to YAML for Hugo.

For some UTF-8 files, there is a BOM marker at the beginning of the file. The script (as a true quick and dirty solution) doesn’t check for the presence of such a marker and cannot detect the Title element if it exists.

I added an fm = fm.strip('\ufeff') line to clear the BOM marker from a line if it exists.


There is an editor called bvi to edit binary files in Hex format, similar to the vi editor.