This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Patch: better error message for gcj when iconv fails


Alex, is this ok?

This clarifies the problem presented in PR 1840.  I've seen that
problem reported a couple of times, and I think this patch will help
reduce the number of bug reports we get about it.

2001-02-06  Tom Tromey  <tromey@redhat.com>

	* lex.c (java_new_lexer): Longer error message.

Tom

Index: java/lex.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/java/lex.c,v
retrieving revision 1.59
diff -u -r1.59 lex.c
--- lex.c	2001/02/04 22:44:03	1.59
+++ lex.c	2001/02/06 23:23:35
@@ -293,7 +293,7 @@
     }
 
   if (enc_error)
-    fatal_error ("unknown encoding: `%s'", encoding);
+    fatal_error ("unknown encoding: `%s'\nThis might mean that your locale's encoding is not supported\nby your system's iconv(3) implementation.  If you aren't trying\nto use a particular encoding for your input file, try the\n`--encoding=UTF-8' option.", encoding);
 
   return lex;
 }

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]