]> git.ipfire.org Git - thirdparty/gettext.git/commit
xgettext: Python: Change escape sequences interpretation to follow Python 3.
authorBruno Haible <bruno@clisp.org>
Wed, 14 Aug 2024 16:18:37 +0000 (18:18 +0200)
committerBruno Haible <bruno@clisp.org>
Wed, 14 Aug 2024 16:18:37 +0000 (18:18 +0200)
commitd3ef74eee8be555cc83d19cb4c60fde8b36b6270
treece84b407c289517e5aa86a74e606efc0e3872e1e
parent0b781b0418c38c43f12d690c4481795b7376f1f6
xgettext: Python: Change escape sequences interpretation to follow Python 3.

Reported by Serhii Tereshchenko <serg.partizan@gmail.com> at
<https://savannah.gnu.org/bugs/?65778>.

* gettext-tools/src/x-python.c (phase7_getuc): Update comments for Python 3.
Don't interpret \u sequences in raw bytes and raw strings.
(phase5_get): Recognize bytes prefixes 'b' and 'B'. For f-strings, invoke
phase7_getuc with interpret_unicode = true, not false.
* gettext-tools/tests/xgettext-python-1: Update for Python 3.
* gettext-tools/tests/xgettext-python-5: Likewise.
* NEWS: Mention the change.
NEWS
gettext-tools/src/x-python.c
gettext-tools/tests/xgettext-python-1
gettext-tools/tests/xgettext-python-5