On Feb 1, 1:51 pm, "Martin v. Löwis" <[EMAIL PROTECTED]> wrote: > > They sent me the actual file, which was created on Windows, as an > > email attachment. They had also sent the actual dataset from which > > the XML was generated so that I could generate it myself using the > > same version of our app as the user has. I did that but did not get > > an exception. > > So are you sure you open the file in binary mode on Windows? > > Regards, > Martin
In the real case, the xml never goes through a file but is handed directly to the parser. The api return a Python Unicode string (utf-16). For the file the user sent, if I open it in binary mode, it still has a BOM; otherwise the BOM is removed. But either version works on my system. The basic fact, though, remains, the same code works for me with the same input but not for two particular users (out of hundreds). Regards, Jon -- http://mail.python.org/mailman/listinfo/python-list