Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #44501
| Path | csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!newsfeed.fsmpi.rwth-aachen.de!news-1.dfn.de!news.dfn.de!news.informatik.hu-berlin.de!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail |
|---|---|
| From | cl@isbd.net |
| Newsgroups | comp.lang.python |
| Subject | Re: How do I encode and decode this data to write to a file? |
| Date | Mon, 29 Apr 2013 13:50:01 +0100 |
| Lines | 25 |
| Message-ID | <ps625a-c45.ln1@chris.zbmc.eu> (permalink) |
| References | <27s15a-943.ln1@chris.zbmc.eu> <mailman.1146.1367230281.3114.python-list@python.org> |
| Mime-Version | 1.0 |
| Content-Type | text/plain; charset=UTF-8 |
| Content-Transfer-Encoding | 8bit |
| X-Trace | individual.net QisIHt9yLN4gLRgi693XaA5IORVfUrs2NIf/thcpiy3wu8vFs= |
| X-Orig-Path | not-for-mail |
| Cancel-Lock | sha1:c6sfsDsASjmDD5z/0ktOqk37sbY= sha1:cQ5pkAHRK1eQWrpZYIIeLWnP9pM= |
| User-Agent | tin/2.1.1-20120623 ("Mulindry") (UNIX) (Linux/3.5.0-27-generic (x86_64)) |
| Xref | csiph.com comp.lang.python:44501 |
Show key headers only | View raw
Andrew Berg <bahamutzero8825@gmail.com> wrote:
> On 2013.04.29 04:47, cl@isbd.net wrote:
> > If I understand correctly the encode() is saying that it can't
> > understand the data in the html because there's a character 0xc3 in it.
> > I *think* this means that the é is encoded in UTF-8 already in the
> > incoming data stream (should be as my system is wholly UTF-8 as far as I
> > know and I created the directory name).
> You can verify that your filesystem is set to use UTF-8 with sys.getfilesystemencoding().
> If it returns 'ascii', then your locale settings
> are incorrect.
>
chris$ python
Python 2.7.3 (default, Sep 26 2012, 21:51:14)
[GCC 4.7.2] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import sys
>>> sys.getfilesystemencoding()
'UTF-8'
>>>
So I am set up right for UTF-8.
--
Chris Green
Back to comp.lang.python | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
How do I encode and decode this data to write to a file? cl@isbd.net - 2013-04-29 10:47 +0100
Re: How do I encode and decode this data to write to a file? Andrew Berg <bahamutzero8825@gmail.com> - 2013-04-29 05:11 -0500
Re: How do I encode and decode this data to write to a file? cl@isbd.net - 2013-04-29 13:50 +0100
Re: How do I encode and decode this data to write to a file? Peter Otten <__peter__@web.de> - 2013-04-29 12:33 +0200
Re: How do I encode and decode this data to write to a file? Dave Angel <davea@davea.name> - 2013-04-29 07:46 -0400
Re: How do I encode and decode this data to write to a file? cl@isbd.net - 2013-04-29 13:59 +0100
Re: How do I encode and decode this data to write to a file? Robert Kern <robert.kern@gmail.com> - 2013-04-29 14:11 +0100
Re: How do I encode and decode this data to write to a file? cl@isbd.net - 2013-04-29 15:38 +0100
Re: How do I encode and decode this data to write to a file? Skip Montanaro <skip@pobox.com> - 2013-04-29 09:56 -0500
Re: How do I encode and decode this data to write to a file? Terry Jan Reedy <tjreedy@udel.edu> - 2013-04-29 18:02 -0400
Re: How do I encode and decode this data to write to a file? Tony the Tiger <tony@tiger.invalid> - 2013-05-01 16:20 -0500
Re: How do I encode and decode this data to write to a file? Ned Batchelder <ned@nedbatchelder.com> - 2013-05-01 18:01 -0400
Re: How do I encode and decode this data to write to a file? Ned Batchelder <ned@nedbatchelder.com> - 2013-05-01 19:36 -0400
csiph-web