print UTF-8 file with BOM

John Bauman john at
Fri Dec 23 17:09:31 CET 2005

UTF-8 shouldn't need a BOM, as it is designed for character streams, and 
there is only one logical ordering of the bytes. Only UTF-16 and greater 
should output a BOM, AFAIK. 

More information about the Python-list mailing list