From: "Eric Blake" <[EMAIL PROTECTED]> > I think the latest version of both files in Classpath should work. > Could it possibly be a VM error in adding two chars, and casting the > result back to a char? The data is encoded as signed offsets from the > current character, but stored as unsigned chars in the String constants; > so if your VM does the math wrong, you may be getting a weird index. > Another possibility - is your VM correctly handling reading in the UTF > string from the constant pool and converting it to char[]? > > Can you do some more detective work? What do you get for > Character.readChar('a') and Character.readChar('A')? If I'm reading > CharData correctly, readChar('a') should be 0x1b02, so that you then > index UPPER[54] == '\uffe0' (in other words, 'a' + -30 => 'A'). > readChar('A') should be 0xd01, so that you index LOWER[26] == ' ' (or > 'A' + 32 => 'a'). >
I'm sorry. I did cry for the wolf too early. The error must be in my JVM. To confirm this I just moved the whole CharData and Char into an own class and let the tests run on another JVM using this class instead of Character. There's no error there. I hope I didn't cause too much panic with this.... -Patrik _______________________________________________ Classpath mailing list [EMAIL PROTECTED] http://mail.gnu.org/mailman/listinfo/classpath