Have a look at the example I have provided. There
I use Connector/J V3.0.11-stable - which is the latest.
If you use useUnicode=true and characterEncoding=UTF8
getString, does not return the correct string.
At least on a jdk1.4.1_02 on a Solaris host. Any other
oberservations?

OOH, with getByte and new String(byte, characterEncoding) it
does. So it might be a problem with the JDBC Driver. But
it's certainly more difficult to "fix" it in the Driver
than in the cocoon source.
That's what I think, and how it does work.

Patrick

> -----Urspr�ngliche Nachricht-----
> Von: Bertrand Delacretaz [mailto:[EMAIL PROTECTED]
> Gesendet: Donnerstag, 1. April 2004 08:06
> An: [EMAIL PROTECTED]
> Betreff: Re: AW: Unicode Umlauts/SQLTransformer
>
>
> 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: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to