[issue33317] `repr()` of string in NFC and NFD forms does not differ

Benjamin Peterson report at bugs.python.org
Mon Apr 23 23:49:42 EDT 2018


Benjamin Peterson <benjamin at python.org> added the comment:

As stated, the bug report is invalid: the repr _does_ differ, it's just not presented that way by however you're viewing the two reprs. Distinct codepoint sequences that look identical under certain circumstances can happen many different ways with Unicode. repr's humble mission is to produce a Python literal equivalent to its argument not to produce unambiguous representations of codepoint sequences after font rendering.

Possibly, this could be converted to a unittest RFE, but I'm not sure if there's a good way to detect whether two unicode strings are going to display confusingly similarly.

----------
resolution:  -> not a bug
stage:  -> resolved
status: open -> closed

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue33317>
_______________________________________


More information about the Python-bugs-list mailing list