[New-bugs-announce] [issue19819] reversing a Unicode ligature doesn't work

Larry Hastings report at bugs.python.org
Thu Nov 28 00:51:14 CET 2013


New submission from Larry Hastings:

Read this today:

http://mortoray.com/2013/11/27/the-string-type-is-broken/

In it the author talks about how the 'ffl' ligature breaks some string processing.  He claimed that Python 3 doesn't uppercase it correctly--well, it does.  However I discovered that it doesn't reverse it properly.

    x = b'ba\xef\xac\x84e'.decode('utf-8') # "baffle", where "ffl" is a ligature
    print(x) # prints "baffle", with the ligature
    print(x.upper())  # prints "BAFFLE", no ligature, which is fine
    print("".join(reversed(x))) # prints "efflab"

Shouldn't that last line print "elffab"?

If this gets marked as "wontfix" I wouldn't complain.  Just wondering what the Right Thing is to do here.

----------
messages: 204628
nosy: larry
priority: low
severity: normal
stage: needs patch
status: open
title: reversing a Unicode ligature doesn't work
type: behavior
versions: Python 3.4

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue19819>
_______________________________________


More information about the New-bugs-announce mailing list