[issue39174] unicodedata.normalize failing with NFD and NFKD for some characters in Python3
New submission from Lee Collins : A script that works in 2.7.17 is now failing for some Unicode characters in 3.7.5 on MacOS 10.14.6. For example unicodedata.normalize('NFD', 'à') used to return the correct decomposition u'a\u0300', but in 3.7 it returns the single composed character U+00E0. This doesn't happen for all composed forms, just some. Other examples: á, ã -- components: Unicode messages: 359120 nosy: Lee Collins, ezio.melotti, vstinner priority: normal severity: normal status: open title: unicodedata.normalize failing with NFD and NFKD for some characters in Python3 versions: Python 3.7 ___ Python tracker <https://bugs.python.org/issue39174> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue39174] unicodedata.normalize failing with NFD and NFKD for some characters in Python3
Lee Collins added the comment: On further investigation, it appears that the problem is the interaction between Python3 and the MacOS terminal. unicodedata.normalize() produces the correct sequence u'a\u0300' but when printed it comes out as U+00E0 -- ___ Python tracker <https://bugs.python.org/issue39174> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue39174] unicodedata.normalize failing with NFD and NFKD for some characters in Python3
Lee Collins added the comment: I did some more investigation by running cat on a file with the decomposed characters and saw that the output was composed. So, this does look like a problem with the Mac OS terminal. It can be resolved as 3rd party -- resolution: -> third party stage: -> resolved status: open -> closed type: -> behavior ___ Python tracker <https://bugs.python.org/issue39174> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com