cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Bertrand Delacretaz <bdelacre...@codeconsult.ch>
Subject Re: AW: Unicode Umlauts/SQLTransformer
Date Thu, 01 Apr 2004 06:05:41 GMT
Le 1 avr. 04, à 07:52, Patrick Schlaepfer a écrit :

> I wrote a small standalone class, to test
>   .getString()
> vs
>   .getBytes()
> and .getString doesn't handle the UTF8 characters
> correctly....

hmmm..are you sure that your JDBC driver is configured with the correct 
encoding?

I might be wrong, but I think getString() should use the driver's 
encoding configuration to correctly interpret the database settings and 
convert the data to a correct String.

Using getBytes() might work if you know how the characters are encoded 
in the database, but I don't think it is a general solution: with 
getBytes() the raw bytes need to be decoded by the application 
(=Cocoon), but I think this decoding should take place in the JDBC 
driver.

IMHO the correct way would be to find out how to setup the JDBC driver 
so that getString() returns a correct value, and probably change the 
SQLTransformer to use getString() for string values.

-Bertrand


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Mime
View raw message