db-derby-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Knut Anders Hatlen <knut.hat...@oracle.com>
Subject Re: German Sharp S and UCASE
Date Thu, 08 Dec 2011 15:49:49 GMT
Bryan Pendleton <bpendleton.derby@gmail.com> writes:

>>      ResultSet rs = s.executeQuery("values upper('Straße')");
>>
>> So it seems the value is returned correctly, but the meta-data is wrong
>> (STRASSE is 7 characters long, not 6). ij uses the meta-data to
>> determine how much space each column should have.
>
> 6 *characters* long, but 7 *bytes* long?

Nope, "STRASSE" is both 7 characters and 7 bytes. :)

S T R A S S E
1 2 3 4 5 6 7

"Straße" is 6 characters long (and 7 bytes in UTF-8).

> Do we have a way to represent such a difference?

I don't think so. We return character strings, not byte arrays, and the
byte length will vary between different encondings.

> Certainly sounds like a bug, and with a nice small test case!

Now filed in JIRA:
https://issues.apache.org/jira/browse/DERBY-5525

-- 
Knut Anders

Mime
View raw message