bug-gettext
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[bug #65778] Strings are not considered UTF-8 encoded in Python 3


From: Bruno Haible
Subject: [bug #65778] Strings are not considered UTF-8 encoded in Python 3
Date: Thu, 23 May 2024 13:54:42 -0400 (EDT)

Update of bug #65778 (group gettext):

                  Status:                    None => Confirmed              
             Assigned to:                    None => haible                 

    _______________________________________________________

Follow-up Comment #1:

Your test.py is to be interpreted as UTF-8 source code, according to
https://docs.python.org/3.12/reference/lexical_analysis.html#encoding-declarations
"If no encoding declaration is found, the default encoding is UTF-8.".

The escape sequence \xA0 is, according to
https://docs.python.org/3.12/reference/lexical_analysis.html#escape-sequences
"In a bytes literal, ... escapes denote the byte with the given value. In a
string literal, these escapes denote a Unicode character with the given
value.", meant to denote U+00A0.

You're right, it's a bug in xgettext.


    _______________________________________________________

Reply to this item at:

  <https://savannah.gnu.org/bugs/?65778>

_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]