Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #39317
| From | Terry Reedy <tjreedy@udel.edu> |
|---|---|
| Subject | Re: encoding error |
| Date | 2013-02-20 01:13 -0500 |
| References | <974651c6-c5b2-4fba-b733-67ec65ec733f@googlegroups.com> |
| Newsgroups | comp.lang.python |
| Message-ID | <mailman.2086.1361340815.2939.python-list@python.org> (permalink) |
On 2/19/2013 8:07 PM, halagamal2009@gmail.com wrote: > UnicodeEncodeError: 'decimal' codec can't encode character u'\ufeff' > in position 0: invalid decimal Unicode string I believe that is a byte-order mark, which should only be the first 2 bytes in the file and which should be removed if you use the proper decoder when reading the file, before parsing it. You did not say what version of Python you used, but I would use 3.3 or if not that, 3.2 if possible. http://pypi.python.org/pypi/Whoosh/ claims that whoosh works with python 3. Also, read about the basics of unicode if you have not done so yet. -- Terry Jan Reedy
Back to comp.lang.python | Previous | Next — Previous in thread | Find similar | Unroll thread
encoding error halagamal2009@gmail.com - 2013-02-19 17:07 -0800 Re: encoding error Terry Reedy <tjreedy@udel.edu> - 2013-02-20 01:13 -0500
csiph-web