This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: 'ა'.upper() should return 'ა'
Type: behavior Stage: resolved
Components: Unicode Versions: Python 3.7
process
Status: closed Resolution: not a bug
Dependencies: Superseder:
Assigned To: Nosy List: Lasha Gogua, SilentGhost, ezio.melotti, vstinner
Priority: normal Keywords:

Created on 2019-06-01 14:13 by Lasha Gogua, last changed 2022-04-11 14:59 by admin. This issue is now closed.

Messages (2)
msg344174 - (view) Author: Lasha Gogua (Lasha Gogua) Date: 2019-06-01 14:13
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'))
ა
>>>
msg344175 - (view) Author: SilentGhost (SilentGhost) * (Python triager) Date: 2019-06-01 14:41
What changed was that python 3.7 is using Unicode 11 standard, which has introduced changes for Georgian script. See "Casing Issues" under https://www.unicode.org/versions/Unicode11.0.0/#Migration

The Python is correctly implements the standard.
History
Date User Action Args
2022-04-11 14:59:16adminsetgithub: 81302
2019-06-01 14:41:14SilentGhostsetstatus: open -> closed

nosy: + SilentGhost
messages: + msg344175

resolution: not a bug
stage: resolved
2019-06-01 14:13:52Lasha Goguacreate