Unicode failure
Terry Reedy
tjreedy at udel.edu
Sat Dec 5 01:12:30 EST 2015
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 at 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
More information about the Python-list
mailing list