Eclipse/PyDev - BOM Lexical Error
steve-REMOVE-THIS at cybersource.com.au
Thu Oct 14 08:40:52 CEST 2010
On Thu, 14 Oct 2010 16:41:13 +1300, Lawrence D'Oliveiro wrote:
> In message <mailman.1544.1286800257.29448.python-list at python.org>, Ethan
> Furman wrote:
>> Lawrence D'Oliveiro wrote:
>>> In message <mailman.1533.1286774527.29448.python-list at python.org>,
>>> Ethan Furman wrote:
>>>>Lawrence D'Oliveiro wrote:
>>>>>In message <mailman.1466.1286556950.29448.python-list at python.org>,
>>>>>Ethan Furman wrote:
>>>>MS treats those first three bytes as a flag -- if they equal the BOM,
>>>>MS treats it as UTF-8, if they equal anything else, MS does not treat
>>>>it as UTF-8.
>>> So what does it treat it as? You previously gave examples of flag
>>> values for dBase III. What are the flag values for Windows-1252,
>>> versus, say, ISO-8859-15?
>> I am not aware of any other flag values for text files besides the BOM
>> for UTF-8.
> Then how can you say “MS treats those first three bytes as a flag”,
Because Microsoft tools treat those first three bytes as a flag. An
*optional* flag, but still a flag. If the first three bytes of a text
file equal the UTF-8 BOM, most MS tools treat them as a BOM. If they
equal any other value, then they are not treated as a BOM, but merely
part of the file's contents.
It's not just Notepad either:
The Python interpreter does the same thing too:
More information about the Python-list