remove BOM from string read from utf-8 file

Achim Domma domma at procoders.net
Fri Feb 27 16:38:11 CET 2004


"Piet van Oostrum" <piet at cs.uu.nl> wrote in message
news:wzoerkinig.fsf at Ordesa.local...

> Check text[0] and len(text) to verify.

That's what I did. The file contains 24 chinese characters and len(text) is
25. And 0xef is the hex code for the BOM if I'm not completely wrong.

Achim





More information about the Python-list mailing list