+2014-04-04 Daiki Ueno <ueno@gnu.org>
+
+ * xgettext.c (main): Warn user if invalid encoding name is
+ specified with the --from-code option.
+ Reported by jaroslav.fojtik@evolvsys.cz in
+ <https://lists.gnu.org/archive/html/bug-gettext/2014-03/msg00034.html>.
+
2014-04-04 Daiki Ueno <ueno@gnu.org>
msgfmt: Add support for Desktop Entry files
case CHAR_MAX + 3: /* --from-code */
xgettext_global_source_encoding = po_charset_canonicalize (optarg);
if (xgettext_global_source_encoding == NULL)
- xgettext_global_source_encoding = po_charset_ascii;
+ {
+ multiline_warning (xasprintf (_("warning: ")),
+ xasprintf (_("\
+'%s' is not a valid encoding name. Using ASCII as fallback.\n"),
+ optarg));
+ xgettext_global_source_encoding = po_charset_ascii;
+ }
break;
case CHAR_MAX + 4: /* --no-wrap */