Commit 5843e870 by Martin Kahlert Committed by Tom Tromey

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
parent e206a74f
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> 2002-03-28 Tom Tromey <tromey@redhat.com>
* except.c (expand_end_java_handler): If the handler type is NULL, * except.c (expand_end_java_handler): If the handler type is NULL,
......
...@@ -290,8 +290,13 @@ java_new_lexer (finput, encoding) ...@@ -290,8 +290,13 @@ java_new_lexer (finput, encoding)
/* If iconv failed, use the internal decoder if the default /* If iconv failed, use the internal decoder if the default
encoding was requested. This code is used on platforms where encoding was requested. This code is used on platforms where
iconv exists but is insufficient for our needs. For iconv exists but is insufficient for our needs. For
instance, on Solaris 2.5 iconv cannot handle UTF-8 or UCS-2. */ instance, on Solaris 2.5 iconv cannot handle UTF-8 or UCS-2.
if (strcmp (encoding, DEFAULT_ENCODING))
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; enc_error = 1;
#ifdef HAVE_ICONV #ifdef HAVE_ICONV
else else
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment