diff options
author | Martin Kahlert <martin.kahlert@infineon.com> | 2002-03-29 19:33:25 +0000 |
---|---|---|
committer | Tom Tromey <tromey@gcc.gnu.org> | 2002-03-29 19:33:25 +0000 |
commit | 5843e8704e27a84b1b2b4536bed073eee6361800 (patch) | |
tree | ea5e85e306c01cc39e489ba760124916793ca51a /gcc | |
parent | e206a74f5228a33c04b5fb9b7a61b61fa54b8055 (diff) | |
download | gcc-5843e8704e27a84b1b2b4536bed073eee6361800.zip gcc-5843e8704e27a84b1b2b4536bed073eee6361800.tar.gz gcc-5843e8704e27a84b1b2b4536bed073eee6361800.tar.bz2 |
lex.c (java_new_lexer): Alias "646" to DEFAULT_ENCODING.
2002-03-29 Martin Kahlert <martin.kahlert@infineon.com>
* lex.c (java_new_lexer): Alias "646" to DEFAULT_ENCODING.
From-SVN: r51566
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/java/ChangeLog | 4 | ||||
-rw-r--r-- | gcc/java/lex.c | 9 |
2 files changed, 11 insertions, 2 deletions
diff --git a/gcc/java/ChangeLog b/gcc/java/ChangeLog index 21be206..3006c85 100644 --- a/gcc/java/ChangeLog +++ b/gcc/java/ChangeLog @@ -1,3 +1,7 @@ +2002-03-29 Martin Kahlert <martin.kahlert@infineon.com> + + * lex.c (java_new_lexer): Alias "646" to DEFAULT_ENCODING. + 2002-03-28 Tom Tromey <tromey@redhat.com> * except.c (expand_end_java_handler): If the handler type is NULL, diff --git a/gcc/java/lex.c b/gcc/java/lex.c index 8c66118..69e16b4 100644 --- a/gcc/java/lex.c +++ b/gcc/java/lex.c @@ -290,8 +290,13 @@ java_new_lexer (finput, encoding) /* If iconv failed, use the internal decoder if the default encoding was requested. This code is used on platforms where iconv exists but is insufficient for our needs. For - instance, on Solaris 2.5 iconv cannot handle UTF-8 or UCS-2. */ - if (strcmp (encoding, DEFAULT_ENCODING)) + instance, on Solaris 2.5 iconv cannot handle UTF-8 or UCS-2. + + On Solaris the default encoding, as returned by nl_langinfo(), + is `646' (aka ASCII), but the Solaris iconv_open() doesn't + understand that. We work around that by pretending + `646' to be the same as UTF-8. */ + if (strcmp (encoding, DEFAULT_ENCODING) && strcmp (encoding, "646")) enc_error = 1; #ifdef HAVE_ICONV else |