cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Bertrand Delacretaz <bdelacre...@codeconsult.ch>
Subject Re: Unicode Umlauts/SQLTransformer
Date Thu, 01 Apr 2004 05:24:27 GMT
Le 31 mars 04, à 16:23, Patrick Schlaepfer a écrit :

> Made the observation that SQLTransformer, doesn't care
> that much about character Encoding:
>
> String retval = SQLTransformger.getStringValue(rs.getObject(i));
> and then returns a new String((byte[]) object)

According to the Java API, this "Constructs a new String by decoding 
the specified array of bytes using the platform's default charset.".

IIUC the platform's default charset is what can be set with the  
-Dfile.encoding parameter, so things should be fine *if* the encoding 
is correctly handled all the way down the pipeline. I don't know if 
this is the case though, you might want to test it by dumping the 
String at various stages or starting with minimal pipelines.

OTOH I'm wondering if the use of rs.getObject(i) as opposed to 
rs.getString() isn't a problem regarding encoding. It would be 
interesting to compare the two, either in a simple test program outside 
of Cocoon, or by modifying the SQLTransformer to use rs.getString() if 
rs.getMetaData().getColumnType(i) says this is a String column.

-Bertrand


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


Mime
View raw message