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


Groups > comp.lang.python > #100031

Re: Unicode failure

Path csiph.com!fu-berlin.de!uni-berlin.de!not-for-mail
From Terry Reedy <tjreedy@udel.edu>
Newsgroups comp.lang.python
Subject Re: Unicode failure
Date Sat, 5 Dec 2015 01:12:30 -0500
Lines 21
Message-ID <mailman.221.1449295994.14615.python-list@python.org> (permalink)
References <20151204130738.76313c43@imp> <DUB123-W222A8A672DE154DB8D99C9830C0@phx.gbl> <20151204231547.2d7b24a1@imp>
Mime-Version 1.0
Content-Type text/plain; charset=utf-8; format=flowed
Content-Transfer-Encoding 7bit
X-Trace news.uni-berlin.de jVR10U4/JTzcXpn3Vv2g+Au4lnosSH0YL6hS5U9w7JQQ==
Return-Path <python-python-list@m.gmane.org>
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; 'prefix': 0.07; 'received:80.91': 0.09; 'received:80.91.229': 0.09; 'received:gmane.org': 0.09; 'received:list': 0.09; 'restored': 0.09; 'jan': 0.11; "'r'": 0.16; '11:15': 0.16; 'did,': 0.16; 'prefix,': 0.16; 'received:80.91.229.3': 0.16; 'received:io': 0.16; 'received:plane.gmane.org': 0.16; 'received:psf.io': 0.16; 'reedy': 0.16; 'subject:Unicode': 0.16; 'wrote:': 0.16; 'string': 0.17; 'string,': 0.18; '2015': 0.20; '2.x': 0.22; 'disable': 0.22; 'seems': 0.23; 'dec': 0.23; 'header:In-Reply-To:1': 0.24; 'header :User-Agent:1': 0.26; 'header:X-Complaints-To:1': 0.26; '+0000': 0.27; 'fri,': 0.27; 'not.': 0.27; 'raw': 0.27; 'skip:u 20': 0.28; 'work.': 0.30; 'combination': 0.33; 'unicode': 0.35; 'but': 0.36; 'instead': 0.36; 'received:71': 0.36; 'to:addr:python-list': 0.36; 'pm,': 0.36; 'subject:: ': 0.37; 'received:org': 0.37; 'does': 0.39; 'to:addr:python.org': 0.40; 'mark': 0.40; '>>>>>': 0.66; 'received:fios.verizon.net': 0.91
X-Injected-Via-Gmane http://gmane.org/
X-Gmane-NNTP-Posting-Host pool-71-185-227-36.phlapa.fios.verizon.net
User-Agent Mozilla/5.0 (Windows NT 10.0; WOW64; rv:38.0) Gecko/20100101 Thunderbird/38.4.0
In-Reply-To <20151204231547.2d7b24a1@imp>
X-BeenThere python-list@python.org
X-Mailman-Version 2.1.20+
Precedence list
List-Id General discussion list for the Python programming language <python-list.python.org>
List-Unsubscribe <https://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 <https://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe>
Xref csiph.com comp.lang.python:100031

Show key headers only | View raw


On 12/4/2015 11:15 PM, D'Arcy J.M. Cain wrote:
> On Fri, 4 Dec 2015 22:49:49 +0000
> Albert-Jan Roskam <sjeik_appie@hotmail.com> wrote:
>> I think you need to use a raw unicode string, ur

Nope.  The 'r' prefix does not disable unicode escapes.

>>>>> unicodedata.name(ur'\u2122')
>> 'TRADE MARK SIGN'

If if did, the string above would have 6 chars instead of 1 and the 
above would not work.

> That seems to work in 2.x but not 3.x.

'u' was restored in 3.3 as a do-nothing prefix, but the combination 'ur' 
was not.

-- 
Terry Jan Reedy

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


Thread

Re: Unicode failure Terry Reedy <tjreedy@udel.edu> - 2015-12-05 01:12 -0500

csiph-web