[Python] Unicode characters Ú and É are displayed incorrectly as Ú and É

Discussão em 'Python' iniciado por Stack, Abril 21, 2025.

  1. Stack

    Stack Membro Participativo

    I have a UTF-8 file with Spanish text, and some words with accent marks are displayed incorrectly in some of the software.

    I believe my file is correct. For example, the name 'JESÚS' is encoded as 4A 45 53 C3 9A 53.

    >>> b'\x4A\x45\x53\xC3\x9A\x53'.decode('utf-8')
    'JESÚS'


    c39a is the correct UTF-8 encoding for \u00da, according to http://www.fileformat.info/info/unicode/char/00da/index.htm.

    So, why some software renders it incorrectly?

    Continue reading...

Compartilhe esta Página