Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #33462
| Path | csiph.com!usenet.pasdenom.info!weretis.net!feeder4.news.weretis.net!ecngs!feeder2.ecngs.de!newsfeed.freenet.ag!news2.euro.net!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail |
|---|---|
| Return-Path | <ian.g.kelly@gmail.com> |
| X-Original-To | python-list@python.org |
| Delivered-To | python-list@mail.python.org |
| X-Spam-Status | OK 0.006 |
| X-Spam-Evidence | '*H*': 0.99; '*S*': 0.00; '16,': 0.03; 'explicitly': 0.04; 'method.': 0.05; 'none)': 0.07; 'codecs': 0.09; 'codec': 0.16; 'equivalents': 0.16; 'wrote:': 0.17; '>>>': 0.18; 'import': 0.21; 'modifying': 0.22; 'parse': 0.22; 'header:In-Reply-To:1': 0.25; 'message-id:@mail.gmail.com': 0.27; 'convert': 0.29; "skip:' 10": 0.30; 'e.g.': 0.30; 'fri,': 0.30; 'received:209.85.215.46': 0.30; 'skip:b 40': 0.32; 'to:addr:python-list': 0.33; 'received:google.com': 0.34; 'nov': 0.35; 'pm,': 0.35; 'subject:?': 0.35; 'received:209.85': 0.35; 'received:209': 0.37; 'subject:: ': 0.38; 'skip:l 20': 0.38; 'to:addr:python.org': 0.39; 'header:Received:5': 0.40; 'taking': 0.65; 'step,': 0.84; 'to:name:python': 0.84 |
| DKIM-Signature | v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :content-type:content-transfer-encoding; bh=cWJSDyJOGxpz4VWNTSsFQGKwH2tUQ/LU0Htq8XSC7qY=; b=VSdHHv6LW+3UVusoYYdgHhYMr0XNhDZeoIrk5w/sukCQvK0oIzf2G7c/Yaf2LQgDbZ +Xthclg7aeBRLkQWFnZcNG8QVyc0UKGEOPQdtcdFMkbxnbqBUU5ZhBJxsi8aXCcKRBFp yh5xrhJfwWyiXRJVIqfLmJsRdEEzdgXr9z2QDPNJZWiW6m3M6+QR8kfWXuA9H2ljwi9/ WiG5hP9kO5RuRZ6fbSFFTI2ylBsWU6aHSfCahkJL4WIHXnWoirj+MFj2Yvj4DpE6hLtG CPsrlJlEYahsNuN8YK74gFLr92b6o18bJwbQziQakGIdncR3Po4vwgT3Q5wNaBNFQrot POaw== |
| MIME-Version | 1.0 |
| In-Reply-To | <pan.2012.11.17.00.33.13.539000@nowhere.com> |
| References | <f063ebaf-89ee-4558-a762-0241efa39dcc@googlegroups.com> <pan.2012.11.17.00.33.13.539000@nowhere.com> |
| From | Ian Kelly <ian.g.kelly@gmail.com> |
| Date | Fri, 16 Nov 2012 18:08:36 -0700 |
| Subject | Re: latin1 and cp1252 inconsistent? |
| To | Python <python-list@python.org> |
| Content-Type | text/plain; charset=UTF-8 |
| Content-Transfer-Encoding | quoted-printable |
| X-BeenThere | python-list@python.org |
| X-Mailman-Version | 2.1.15 |
| Precedence | list |
| List-Id | General discussion list for the Python programming language <python-list.python.org> |
| List-Unsubscribe | <http://mail.python.org/mailman/options/python-list>, <mailto:python-list-request@python.org?subject=unsubscribe> |
| List-Archive | <http://mail.python.org/pipermail/python-list/> |
| List-Post | <mailto:python-list@python.org> |
| List-Help | <mailto:python-list-request@python.org?subject=help> |
| List-Subscribe | <http://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe> |
| Newsgroups | comp.lang.python |
| Message-ID | <mailman.3768.1353114549.27098.python-list@python.org> (permalink) |
| Lines | 15 |
| NNTP-Posting-Host | 2001:888:2000:d::a6 |
| X-Trace | 1353114549 news.xs4all.nl 6857 [2001:888:2000:d::a6]:37411 |
| X-Complaints-To | abuse@xs4all.nl |
| Xref | csiph.com comp.lang.python:33462 |
Show key headers only | View raw
On Fri, Nov 16, 2012 at 5:33 PM, Nobody <nobody@nowhere.com> wrote:
> If you need to support either, you can parse it as ISO-8859-1 then
> explicitly convert C1 codes to their Windows-1252 equivalents as a
> post-processing step, e.g. using the .translate() method.
Or just create a custom codec by taking the one in
Lib/encodings/cp1252.py and modifying it slightly.
>>> import codecs
>>> import cp1252a
>>> codecs.register(lambda n: cp1252a.getregentry() if n == "cp1252a" else None)
>>> b'\x81\x8d\x8f\x90\x9d'.decode('cp1252a')
'♕♖♗♘♙'
Back to comp.lang.python | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
latin1 and cp1252 inconsistent? buck@yelp.com - 2012-11-16 13:44 -0800
Re: latin1 and cp1252 inconsistent? Ian Kelly <ian.g.kelly@gmail.com> - 2012-11-16 15:33 -0700
Re: latin1 and cp1252 inconsistent? buck@yelp.com - 2012-11-16 15:27 -0800
Re: latin1 and cp1252 inconsistent? Dave Angel <d@davea.name> - 2012-11-16 19:05 -0500
Re: latin1 and cp1252 inconsistent? Ian Kelly <ian.g.kelly@gmail.com> - 2012-11-16 17:20 -0700
Re: latin1 and cp1252 inconsistent? Dennis Lee Bieber <wlfraed@ix.netcom.com> - 2012-11-18 01:48 -0500
Re: latin1 and cp1252 inconsistent? buck@yelp.com - 2012-11-16 15:27 -0800
Re: latin1 and cp1252 inconsistent? Nobody <nobody@nowhere.com> - 2012-11-17 00:33 +0000
Re: latin1 and cp1252 inconsistent? Ian Kelly <ian.g.kelly@gmail.com> - 2012-11-16 18:08 -0700
Re: latin1 and cp1252 inconsistent? buck@yelp.com - 2012-11-17 08:56 -0800
Re: latin1 and cp1252 inconsistent? Ian Kelly <ian.g.kelly@gmail.com> - 2012-11-17 11:08 -0700
Re: latin1 and cp1252 inconsistent? Ian Kelly <ian.g.kelly@gmail.com> - 2012-11-17 11:13 -0700
Re: latin1 and cp1252 inconsistent? Nobody <nobody@nowhere.com> - 2012-11-17 19:15 +0000
csiph-web