pudb icon indicating copy to clipboard operation
pudb copied to clipboard

Command line [Ctrl+X] works wrongly (wrong encoding) in Py2

Open lega911 opened this issue 6 years ago • 4 comments

Output for Python 3.7.3, Python2.7.16, Python3 in pudb 2019.2:

>>> u'\xf6' == u'ö'
True

Output for Python 2.7.16 (and 2.7.15) in pudb 2019.2

>>> u'\xf6' == u'ö'
False

lega911 avatar Dec 09 '19 13:12 lega911

Thanks for the report! With Py2 less than a month from EOL, I'm happy to take a patch, but I probably won't go debug myself.

inducer avatar Dec 10 '19 00:12 inducer

When are you planning on dropping Python 2 support in PuDB?

asmeurer avatar Dec 10 '19 00:12 asmeurer

How about Jan 1, to celebrate the new decade?

inducer avatar Dec 10 '19 00:12 inducer

It's fine with me. I think we never did get all the encoding stuff right (as this issue shows). Possibly some of that stuff is still an issue in Python 3 as well, e.g., for terminals that aren't en_US.UTF-8. Pre 3.7 still does non-UTF-8 encoding depending on the LANG, and LC_ALL=C affects what characters urwid can print to the terminal. Plus I'm not convinced all the zero-width and double-width character logic is correct everywhere (that's mostly unrelated to Python 2/3).

I'm sure I'll still need to work on Python 2 stuff in the next year, but I'm fine with using an old version of PuDB when necessary.

asmeurer avatar Dec 10 '19 01:12 asmeurer