SyntaxError: encoding problem: with BOM
zaz600 at gmail.com
Wed Dec 24 16:09:30 CET 2008
On 25 дек, 00:37, "Diez B. Roggisch" <de... at nospam.web.de> wrote:
> NoName schrieb:
> > i have 1.py in cp866 encoding:
> > # -*- coding: cp866 -*-
> > print ("ff")
> > It's not work in Python 3.0
> > Error:
> > File "<decoding error>", line 1
> > SyntaxError: encoding problem: with BOM
> > what's wrong?
> I can only guess, but just because you write the coding-header that
> doesn't mean that the editor you use does actually *use* that encoding.
> What I presume it does is to use utf-8, and write that stupid BOM
> microsoft uses for denoting utf-8-content as first byte. Try using a
> different editor, or alter it's settings to really use your desired
I used Far Manager editor. and it *really* used cp866
I can print hex dump of source file.
I don't want to use UTF-8 for py-file!
More information about the Python-list