[Sablevm-bugs] [ sablevm-Bugs-660598 ] String.getBytes("UTF8") is broken
Brought to you by:
egagnon
From: SourceForge.net <no...@so...> - 2003-03-09 05:07:17
|
Bugs item #660598, was opened at 2002-12-31 22:20 You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=105523&aid=660598&group_id=5523 Category: Execution Problem Group: SablePath Status: Open Resolution: None Priority: 5 Submitted By: Archie Cobbs (archiecobbs) >Assigned to: Etienne M. Gagnon (egagnon) >Summary: String.getBytes("UTF8") is broken Initial Comment: 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 (!). ---------------------------------------------------------------------- Comment By: Archie Cobbs (archiecobbs) Date: 2003-01-01 21:03 Message: Logged In: YES user_id=99943 Previous patch is incomplete, new patch added. I've also submitted this bug to the classpath.org bug db. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=105523&aid=660598&group_id=5523 |