Eclipse/PyDev - BOM Lexical Error
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? My eclipse is Helios, pydev version is 1.6.2.2010090812 Thanks. -- Daewon YOON -- http://mail.python.org/mailman/listinfo/python-list
Re: Eclipse/PyDev - BOM Lexical Error
On Oct 4, 9:26 pm, de...@web.de (Diez B. Roggisch) wrote: > TheOne 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 I also included that "# -*- coding:" line. I just don't want me or other project members to accidentally save them in different encoding. So I (and my team) thought it would be safe to have the BOM character. Anybody any idea? TIA. -- Daewon YOON -- http://mail.python.org/mailman/listinfo/python-list
Re: Eclipse/PyDev - BOM Lexical Error
On Oct 5, 5:10 pm, de...@web.de (Diez B. Roggisch) wrote: > Lawrence D'Oliveiro writes: > > In message > > , TheOne > > wrote: > > >> I want the source files to have BOM character. > > > What exactly is the point of a BOM in a UTF-8-encoded file? > > It's a MS-specific thing that makes a file identifieable as > UTF-8-encoded under windows. The name BOM is obviously BS, but it's the > way it is. > > Diez I didn't know that it's a MS-thing. (Is it really?) Anyway, it would be great if I could make my eclipse/pydev to understand the BOM character and suppress the lexical error msg. -- Daewon YOON -- http://mail.python.org/mailman/listinfo/python-list