Hi, I want to report about bug with string.upper() method. In Georgian we don't have uppercase letters, so for example ord("ე".upper()) returns 7316, which is not a letter. I found this bug in my Django project, first letters of form labels where all wrong, when I started looking for the reason, I found that they are using upper method. In python3.6 upper method works correctly with Georgian letters, but in python3.8 it has bug.
Hi, On 5/31/20 3:50 PM, გიორგი კაკულაშვილი wrote:
Hi, I want to report about bug with string.upper() method. In Georgian we don't have uppercase letters, so for example ord("ე".upper()) returns 7316, which is not a letter.
I don't know Georgian, but at first glance it may not be related to Python but to Unicode. The issue you found was introduced in Python 3.7 with the introduction of Unicode 11. The home page for Unicode 11 [1] states: Casing behavior for the Georgian script has changed significantly. There is a new set of Mtavruli capital letters (U+1C90..U+1CBA, U+1CBD..U+1CBF) in Unicode 11.0, with case mappings to the existing Mkhedruli letters (U+10D0..U+10FA, U+10FD..U+10FF). In prior versions of the Unicode Standard, Mkhedruli Georgian was considered a monocameral (non-casing) script, and the Mkhedruli Georgian letters were gc=Lo. Starting with Version 11.0, those Mkhedruli Georgian letters are now gc=Ll, and have uppercase mappings to Mtavruli Georgian capital letters. This change will have major implications for Georgian implementations, including changes for input methods, fonts, casing, and string matching. Existing implementations have treated Mtavruli headlines and other uses for textual emphasis as a text style, so there will also be significant issues for document conversion and upgrade. Another complication for Georgian is that the primary orthography does not use titlecasing, and the Mkhedruli Georgian letters do not have titlecase mappings to Mtavruli letters. This is unique among bicameral systems in the Unicode Standard, so casing implementations should be prepared for this exception. [1]: http://www.unicode.org/versions/Unicode11.0.0/ Hope it helps. If you're still having an issue about casing in Python, don't hesitate to open an issue at https://bugs.python.org. This mailing list is about the documentation (docs.python.org) only. Bests, -- [Julien Palard](https://mdk.fr)
participants (2)
-
Julien Palard
-
გიორგი კაკულაშვილი