+2003-09-18 Bruno Haible <bruno@clisp.org>
+
+ * xgettext.c (from_current_source_encoding): Use multiline_error,
+ for a prettier error message.
+
+ * x-perl.c (extract_quotelike_pass1): Store counter_delim instead of
+ EOF as delimiter, to avoid error during from_current_source_encoding.
+ Reported by Crispin Flowerday <cflowerday@zeus.com>.
+
2003-09-13 Bruno Haible <bruno@clisp.org>
* format-sh.c (INVALID_SHELL_SYNTAX,
if (c == counter_delim || c == EOF)
{
- /* Copying the EOF (actually 255) is not an error. It will
- be stripped off later. */
- buffer[bufpos++] = c;
+ buffer[bufpos++] = counter_delim; /* will be stripped off later */
buffer[bufpos++] = '\0';
#if DEBUG_PERL
fprintf (stderr, "PASS1: %s\n", buffer);
buffer[0] = '\0';
else
sprintf (buffer, ":%ld", (long) line_number);
- error (EXIT_FAILURE, 0, _("\
+ multiline_error (xstrdup (""),
+ xasprintf (_("\
Non-ASCII string at %s%s.\n\
-Please specify the source encoding through --from-code."),
- file_name, buffer);
+Please specify the source encoding through --from-code.\n"),
+ file_name, buffer));
+ exit (EXIT_FAILURE);
}
}
else if (xgettext_current_source_encoding != po_charset_utf8)