From 92712a564c6619929dbd9f0404e98497351bb821 Mon Sep 17 00:00:00 2001 From: Bruno Haible Date: Thu, 13 Aug 2009 14:06:07 +0200 Subject: [PATCH] Warn when the encodings differ. --- gettext-tools/src/ChangeLog | 5 +++++ gettext-tools/src/msgexec.c | 4 ++++ 2 files changed, 9 insertions(+) diff --git a/gettext-tools/src/ChangeLog b/gettext-tools/src/ChangeLog index b84f43d25..389f5ffcb 100644 --- a/gettext-tools/src/ChangeLog +++ b/gettext-tools/src/ChangeLog @@ -1,3 +1,8 @@ +2009-08-13 Bruno Haible + + * msgexec.c: Include msgl-charset.h. + (main): Invoke compare_po_locale_charsets. + 2009-08-10 Bruno Haible Avoid a gcc warning. diff --git a/gettext-tools/src/msgexec.c b/gettext-tools/src/msgexec.c index 3f9c7e7c3..834190b40 100644 --- a/gettext-tools/src/msgexec.c +++ b/gettext-tools/src/msgexec.c @@ -44,6 +44,7 @@ #include "read-po.h" #include "read-properties.h" #include "read-stringtable.h" +#include "msgl-charset.h" #include "xalloc.h" #include "full-write.h" #include "findprog.h" @@ -209,6 +210,9 @@ There is NO WARRANTY, to the extent permitted by law.\n\ /* Read input file. */ result = read_catalog_file (input_file, input_syntax); + /* Warn if the current locale is not suitable for this PO file. */ + compare_po_locale_charsets (result); + if (strcmp (sub_name, "0") != 0) { /* Block SIGPIPE for this process and for the subprocesses. -- 2.47.2