Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #4473
| From | Ulrich Eckhardt <ulrich.eckhardt@dominolaser.com> |
|---|---|
| Newsgroups | comp.lang.python |
| Subject | Re: codec for UTF-8 with BOM |
| Followup-To | comp.lang.python |
| Date | 2011-05-02 12:30 +0200 |
| Message-ID | <vhd298-568.ln1@satorlaser.homedns.org> (permalink) |
| References | <cn6298-us4.ln1@satorlaser.homedns.org> <mailman.1068.1304329675.9059.python-list@python.org> |
Followups directed to: comp.lang.python
Chris Rebert wrote: >> 3. The docs mention encodings.utf_8_sig, available since 2.5, but I can't >> locate that thing there either. What's going on here? > > Works for me™: > Python 2.6.6 (r266:84292, Jan 12 2011, 13:35:00) > [GCC 4.2.1 (Apple Inc. build 5664)] on darwin > Type "help", "copyright", "credits" or "license" for more information. >>>> from encodings import utf_8_sig >>>> This works for me, too. What I tried and what failed was import encodings encodings.utf_8_sig which raises an AttributeError or dir(encodings), which doesn't show the according element. If I do it your way, the encoding then shows up in the content of the module. Apart from the encoding issue, I don't understand this behaviour. Is the module behaving badly or are my expectations simply flawed? Thanks! Uli -- Domino Laser GmbH Geschäftsführer: Thorsten Föcking, Amtsgericht Hamburg HR B62 932
Back to comp.lang.python | Previous | Next — Previous in thread | Next in thread | Find similar
codec for UTF-8 with BOM Ulrich Eckhardt <ulrich.eckhardt@dominolaser.com> - 2011-05-02 10:34 +0200
Re: codec for UTF-8 with BOM Chris Rebert <clp2@rebertia.com> - 2011-05-02 02:47 -0700
Re: codec for UTF-8 with BOM Ulrich Eckhardt <ulrich.eckhardt@dominolaser.com> - 2011-05-02 12:30 +0200
Re: codec for UTF-8 with BOM Peter Otten <__peter__@web.de> - 2011-05-02 13:42 +0200
csiph-web