]> git.ipfire.org Git - thirdparty/gettext.git/commitdiff
msgmerge, msginit: Reject POT files with non-ASCII character, except in UTF-8, part 2.
authorBruno Haible <bruno@clisp.org>
Sun, 13 Oct 2024 16:57:51 +0000 (18:57 +0200)
committerBruno Haible <bruno@clisp.org>
Sun, 13 Oct 2024 16:57:51 +0000 (18:57 +0200)
* gettext-tools/src/msgl-charset.c (check_pot_charset): Tweak the new code.

gettext-tools/src/msgl-charset.c

index dcc8cea80534b69bd0dc865fe62ddeaffbaff787..63aa19a0a102341cd702c3268dbdfeef51bfb05f 100644 (file)
@@ -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);
                   }