[Python] Strange behavior of Python's upper() method

Discussão em 'Python' iniciado por Stack, Fevereiro 25, 2025.

  1. Stack

    Stack Membro Participativo

    I was using a Python script that involved the str.upper() and str.lower() functions when I stumbled upon a strange result. When I passed the letter ᾉ (capital alpha with dasia and prosgegrammeni, U+1F89) to the upper() function, the result was ἉΙ instead of the expected ᾉ.

    Code to reproduce:

    print('ᾉ'.upper())


    Prints

    ἉΙ


    Is this an expected behavior or a bug of some sort?

    Edit: I replaced with the correct characters.

    Continue reading...

Compartilhe esta Página