This is the mail archive of the
java@gcc.gnu.org
mailing list for the Java project.
Re: Possible bug with java.lang.String?
- To: Idan Sofer <i_sofer at yahoo dot com>
- Subject: Re: Possible bug with java.lang.String?
- From: Bryce McKinlay <bryce at waitaki dot otago dot ac dot nz>
- Date: Sun, 26 Aug 2001 16:22:24 +1200
- CC: java at gcc dot gnu dot org
- References: <Pine.LNX.4.33.0108251925080.30408-200000@laflaf>
Idan Sofer wrote:
>In J2SE 1.3 it worked just fine, however with gcj-3.0 exception was
>thrown, regarding corrupted header.
>
>I have built a test class(attached), and it seems that:
>A) compression/decompression without conversion to String work great with
>gcj.
>B) When the compressed byte array is converted to String, some of the
>information get currupted, so it cannot be used for the decompression.
>
Idan,
I tried your test case using a fairly recent cvs GCJ tree, and could not
reproduce the problem. It is possible that this was a bug in GCJ 3.0
that has been since fixed, or perhaps its a character encoding issue
specific to your locale?
[bryce@kawarau test]$ gcj ziptest.java -o ziptest --main=ziptest
[bryce@kawarau test]$ ./ziptest
Compress/Decompress using byte arrays only:
Result: Hello World
Compress/Decompress using String as storage:
Source: Hello World
Byte array: xóHÍÉÉÏ/ÊI`w
c|
Compressed: xóHÍÉÉÏ/ÊI`w
c|
Result: Hello World
[bryce@kawarau test]$ java ziptest
Compress/Decompress using byte arrays only:
Result: Hello World
Compress/Decompress using String as storage:
Source: Hello World
Byte array: xóHÍÉÉÏ/ÊI`w
c|
Compressed: xóHÍÉÉÏ/ÊI`w
c|
Result: Hello World
regards
Bryce