Eclipse/PyDev - BOM Lexical Error

Diez B. Roggisch deets at web.de
Mon Oct 4 08:26:10 EDT 2010


TheOne <daewon.yoon at gmail.com> writes:

> Hi.
>
> I installed eclipse/pydev today.
> I created a pydev project and added python source files with utf-8
> BOM.
> Eclipse/Pydev reports lexical error :
>   Lexical error at line 1, column 1. Encountered: "\ufeff" (65279),
> after : ""
>
> I want the source files to have BOM character. How could I shut off
> this error msg?

No idea. Why do you want it? Is somebody else processing these scripts?
If it's about declaring them to be utf-8, you should consider placing

# -*- coding: utf-8 -*-

on the first or second line. That works for python, and should work for eclipse.

Diez



More information about the Python-list mailing list