Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #45251

Re: [Chicago] Getting ASCII encoding where unicode wanted under Py3k

Path csiph.com!usenet.pasdenom.info!aioe.org!news.stack.nl!newsfeed.xs4all.nl!newsfeed1.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail
Return-Path <cfkarsten@gmail.com>
X-Original-To python-list@python.org
Delivered-To python-list@mail.python.org
X-Spam-Status OK 0.000
X-Spam-Evidence '*H*': 1.00; '*S*': 0.00; 'subject:: [': 0.04; 'lines,': 0.07; 'subject:Getting': 0.07; 'to:name:the chicago python users group': 0.07; 'strings.': 0.09; 'works.': 0.09; 'cc:addr:python-list': 0.11; 'sfxlen:2': 0.11; '10:59': 0.16; 'dig': 0.16; 'effect.': 0.16; 'from:addr:carl': 0.16; 'from:addr:personnelware.com': 0.16; 'from:name:carl karsten': 0.16; 'sender:addr:cfkarsten': 0.16; 'subject:under': 0.16; 'subject:unicode': 0.16; 'subject:where': 0.16; "{'a':": 0.16; 'sender:addr:gmail.com': 0.17; 'wrote:': 0.18; 'subject:] ': 0.20; '>>>': 0.22; 'cc:addr:python.org': 0.22; 'replace': 0.24; 'mon,': 0.24; 'cc:2**0': 0.24; 'cc:no real name:2**0': 0.24; 'header:In- Reply-To:1': 0.27; 'am,': 0.29; 'message-id:@mail.gmail.com': 0.30; 'code': 0.31; '1-3': 0.31; '13,': 0.31; 'guess': 0.33; 'to:addr:chicago': 0.35; 'but': 0.35; 'received:google.com': 0.35; 'there': 0.35; 'possible': 0.36; 'should': 0.36; 'too': 0.37; 'needed': 0.38; 'little': 0.38; 'to:addr:python.org': 0.39; 'remove': 0.60; 'subject:Chicago': 0.84; '2013': 0.98
DKIM-Signature v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=x-received:mime-version:sender:in-reply-to:references:from:date :x-google-sender-auth:message-id:subject:to:cc:content-type :content-transfer-encoding; bh=hKmdotwqlHNBFl7ghFtrUajQu5nWFEnKEjM5CNvaaD8=; b=WhG+WweDpLzXnDObc5xWLttMMJs1XOZu3olMaQm8MHN2ChNyc0h90sqEd/FHV6Zmqs ENrRjjQWxjYw1QJLaVNfsjhrfaCjFErv5rSInv+gToXIHRxYo0SDNye3t/cO9DY8GW31 XBocZXZxoeny3McQjQeVkNPI0j1ewwADTMT8lsf1HF/61zRI95Mk6zah96djdnEEgUWO xkROdtYpiiA+39yeAoE+6ZzVXi3MY8SNlzKalE5otPIPXMoDj5r9dg+bSrhRvNztEvsC U9ZnfDKvYIe2ndIHtMU44uv6RgRUlVKoGFGAD6HbO9AdTssJjXcP0knAPNeUz7ZWZzt8 H0jQ==
X-Received by 10.180.210.207 with SMTP id mw15mr20588386wic.10.1368464507683; Mon, 13 May 2013 10:01:47 -0700 (PDT)
MIME-Version 1.0
Sender cfkarsten@gmail.com
In-Reply-To <CAE6_B5TDWrv4riQ27xQ+ENQHV=0ziryagsaXMRgNfwQGxmfDAA@mail.gmail.com>
References <CAE6_B5TDWrv4riQ27xQ+ENQHV=0ziryagsaXMRgNfwQGxmfDAA@mail.gmail.com>
From Carl Karsten <carl@personnelware.com>
Date Mon, 13 May 2013 12:01:17 -0500
X-Google-Sender-Auth i4YxMKo3oawAuQogt1ek_4GnPls
Subject Re: [Chicago] Getting ASCII encoding where unicode wanted under Py3k
To The Chicago Python Users Group <chicago@python.org>
Content-Type text/plain; charset=UTF-8
Content-Transfer-Encoding quoted-printable
Cc python-list@python.org
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.1633.1368464515.3114.python-list@python.org> (permalink)
Lines 20
NNTP-Posting-Host 2001:888:2000:d::a6
X-Trace 1368464515 news.xs4all.nl 16000 [2001:888:2000:d::a6]:56730
X-Complaints-To abuse@xs4all.nl
Xref csiph.com comp.lang.python:45251

Show key headers only | View raw


On Mon, May 13, 2013 at 10:59 AM, Jonathan Hayward
<jonathan.hayward@pobox.com> wrote:

That is way too much code for me to try and dig into.

Remove everything not needed to demo it.  Replace big strings with
little strings.

My guess is it should be 1-3 lines, like

>>> print('123%(a)s' % {'a': u'\u0161' } )
123ลก

But that works.  may need a few other lines, or something.
It is also possible that there is a setting in your OS that has an effect.

What OS?

--
Carl K

Back to comp.lang.python | Previous | Next | Find similar | Unroll thread


Thread

Re: [Chicago] Getting ASCII encoding where unicode wanted under Py3k Carl Karsten <carl@personnelware.com> - 2013-05-13 12:01 -0500

csiph-web