commit-classpath
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Bug #2105] String.getBytes("UTF8") broken for non-zero offset strings


From: nobody
Subject: [Bug #2105] String.getBytes("UTF8") broken for non-zero offset strings
Date: Wed, 01 Jan 2003 12:34:15 -0500

=================== BUG #2105: FULL BUG SNAPSHOT ===================
http://savannah.gnu.org/bugs/?func=detailbug&bug_id=2105&group_id=85

Submitted by: archie172                 Project: classpath                      
Submitted on: 2003-Jan-01 17:34
Severity:  5 - Major                    Resolution:  None                       
Assigned to:  None                      Status:  Open                           
Platform Version:  None                 

Summary:  String.getBytes("UTF8") broken for non-zero offset strings

Original Submission:  [this bug originally filed against SableVM 1.0.5]

There is a bug in the class
gnu/java/io/encode/Encoder.java.
If a String has a non-zero offset into its char[] array
then
things get screwey.

The attached file UTF8.java demonstrates the bug.
It generates this output:

$ sablevm UTF8
bytes.length=20
bytes: 61 62 63 64 31 32 33 34 0 0 0 0 0 0 0 0 0 0 0 0

Other possibilities include the first byte being zero (!). 



No Followups Have Been Posted


CC list is empty


No files currently attached


For detailed info, follow this link:
http://savannah.gnu.org/bugs/?func=detailbug&bug_id=2105&group_id=85



reply via email to

[Prev in Thread] Current Thread [Next in Thread]