diff options
author | tromey <tromey@138bc75d-0d04-0410-961f-82ee72b054a4> | 2002-03-29 19:33:25 +0000 |
---|---|---|
committer | tromey <tromey@138bc75d-0d04-0410-961f-82ee72b054a4> | 2002-03-29 19:33:25 +0000 |
commit | b0543a68fb3e4589129e08ac276338c4790206b8 (patch) | |
tree | ea5e85e306c01cc39e489ba760124916793ca51a /gcc/java/lex.c | |
parent | 736414abfae0b48aff05d9452c4c20b7eb4d92b0 (diff) | |
download | gcc-b0543a68fb3e4589129e08ac276338c4790206b8.tar.gz |
2002-03-29 Martin Kahlert <martin.kahlert@infineon.com>
* lex.c (java_new_lexer): Alias "646" to DEFAULT_ENCODING.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@51566 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/java/lex.c')
-rw-r--r-- | gcc/java/lex.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/gcc/java/lex.c b/gcc/java/lex.c index 8c661189a39..69e16b4bf1c 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 |