diff options
author | Tom Tromey <tromey@cygnus.com> | 2000-09-11 00:35:51 +0000 |
---|---|---|
committer | Tom Tromey <tromey@gcc.gnu.org> | 2000-09-11 00:35:51 +0000 |
commit | fe5e3b9714a2ef529f5d514dab61747137c89527 (patch) | |
tree | d6ef4d43356f135ad560160ab4778b15006bb771 /libjava/gnu | |
parent | 56cb97339bc91ec1b4df74a8bb4a31d4c363aee2 (diff) | |
download | gcc-fe5e3b9714a2ef529f5d514dab61747137c89527.zip gcc-fe5e3b9714a2ef529f5d514dab61747137c89527.tar.gz gcc-fe5e3b9714a2ef529f5d514dab61747137c89527.tar.bz2 |
BytesToUnicode.java (getDefaultDecoder): Let default decoder use iconv.
* gnu/gcj/convert/BytesToUnicode.java (getDefaultDecoder): Let
default decoder use iconv.
* gnu/gcj/convert/UnicodeToBytes.java (getDefaultEncoder):
Let default encoder use iconv.
* configure: Rebuilt.
* configure.in: Check for nl_langinfo and <langinfo.h>.
* java/lang/natSystem.cc (file_encoding): New function.
(DEFAULT_FILE_ENCODING): Define to file_encoding() if possible.
From-SVN: r36306
Diffstat (limited to 'libjava/gnu')
-rw-r--r-- | libjava/gnu/gcj/convert/BytesToUnicode.java | 9 | ||||
-rw-r--r-- | libjava/gnu/gcj/convert/UnicodeToBytes.java | 9 |
2 files changed, 16 insertions, 2 deletions
diff --git a/libjava/gnu/gcj/convert/BytesToUnicode.java b/libjava/gnu/gcj/convert/BytesToUnicode.java index d80ed65..de116dd 100644 --- a/libjava/gnu/gcj/convert/BytesToUnicode.java +++ b/libjava/gnu/gcj/convert/BytesToUnicode.java @@ -52,7 +52,14 @@ public abstract class BytesToUnicode extends IOConverter } catch (Throwable ex) { - return new Input_8859_1(); + try + { + return new Input_iconv (System.getProperty ("file.encoding")); + } + catch (Throwable ex2) + { + return new Input_8859_1(); + } } } diff --git a/libjava/gnu/gcj/convert/UnicodeToBytes.java b/libjava/gnu/gcj/convert/UnicodeToBytes.java index 1ba6ddf..dce7797 100644 --- a/libjava/gnu/gcj/convert/UnicodeToBytes.java +++ b/libjava/gnu/gcj/convert/UnicodeToBytes.java @@ -50,7 +50,14 @@ public abstract class UnicodeToBytes extends IOConverter } catch (Throwable ex) { - return new Output_8859_1(); + try + { + return new Output_iconv (System.getProperty ("file.encoding")); + } + catch (Throwable ex2) + { + return new Output_8859_1(); + } } } |