New submission from Lasha Gogua <[email protected]>:
Python's .upper() string method still translates Georgian characters this to
"'Ა'" which is not right
Python 3.7.3 (default, May 11 2019, 00:45:16)
[GCC 8.3.1 20190223 (Red Hat 8.3.1-2)] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> 'ა'
'ა'
>>> 'ა'.upper()
'Ა'
>>> print('ა'.upper())
Ა
>>>
and it works in Python 3.6.x and below
Python 3.6.3 (default, Jan 4 2018, 16:40:53)
[GCC 4.8.5 20150623 (Red Hat 4.8.5-16)] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> 'ა'
'ა'
>>> 'ა'.upper()
'ა'
>>> print('ა'.upper())
ა
>>>
now i have found the solution but is it correct? What's changed in the new
version (Python 3.7.x)?
Python 3.7.3 (default, May 11 2019, 00:45:16)
[GCC 8.3.1 20190223 (Red Hat 8.3.1-2)] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> print('ა'.upper())
Ა
>>> print('ა'.encode().upper().decode())
ა
>>> print('ა'.encode('utf-8').upper().decode('utf-8'))
ა
>>>
----------
components: Unicode
messages: 344174
nosy: Lasha Gogua, ezio.melotti, vstinner
priority: normal
severity: normal
status: open
title: 'ა'.upper() should return 'ა'
type: behavior
versions: Python 3.7
_______________________________________
Python tracker <[email protected]>
<https://bugs.python.org/issue37121>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com