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


Groups > comp.lang.python > #100031

Re: Unicode failure

From Terry Reedy <tjreedy@udel.edu>
Newsgroups comp.lang.python
Subject Re: Unicode failure
Date 2015-12-05 01:12 -0500
Message-ID <mailman.221.1449295994.14615.python-list@python.org> (permalink)
References <20151204130738.76313c43@imp> <DUB123-W222A8A672DE154DB8D99C9830C0@phx.gbl> <20151204231547.2d7b24a1@imp>

Show all headers | 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