From 04d97e3918111332872e66814e76940a66ac4e4e Mon Sep 17 00:00:00 2001 From: Bruno Haible Date: Sun, 13 Oct 2024 18:57:51 +0200 Subject: [PATCH] msgmerge, msginit: Reject POT files with non-ASCII character, except in UTF-8, part 2. * gettext-tools/src/msgl-charset.c (check_pot_charset): Tweak the new code. --- gettext-tools/src/msgl-charset.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/gettext-tools/src/msgl-charset.c b/gettext-tools/src/msgl-charset.c index dcc8cea80..63aa19a0a 100644 --- a/gettext-tools/src/msgl-charset.c +++ b/gettext-tools/src/msgl-charset.c @@ -90,11 +90,10 @@ check_pot_charset (const msgdomain_list_ty *mdlp, const char *filename) _("%s: The present charset \"%s\" is not a portable encoding name."), filename, charset); if (!is_ascii_message_list (mlp) - && !(canon_charset == po_charset_ascii - || canon_charset == po_charset_utf8)) + && canon_charset != po_charset_utf8) error (EXIT_FAILURE, 0, - _("%s: The file contains non-ASCII characters but the present charset \"%s\" is not %s or %s."), - filename, charset, "ASCII", "UTF-8"); + _("%s: The file contains non-ASCII characters but the present charset \"%s\" is not %s."), + filename, charset, "UTF-8"); freea (charset); } -- 2.47.2