gh-130197: pygettext: Test the --escape option (GH-131902)

This commit is contained in:
Tomas R. 2025-04-02 10:46:54 +02:00 committed by GitHub
parent e7980ba233
commit 87d9983994
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 138 additions and 3 deletions

View file

@ -188,7 +188,7 @@ def make_escapes(pass_nonascii):
global escapes, escape
if pass_nonascii:
# Allow non-ascii characters to pass through so that e.g. 'msgid
# "Höhe"' would result not result in 'msgid "H\366he"'. Otherwise we
# "Höhe"' would not result in 'msgid "H\366he"'. Otherwise we
# escape any character outside the 32..126 range.
mod = 128
escape = escape_ascii