Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Solution to jConnect cp850 Charset Conversion Error

48 views
Skip to first unread message

Daniel Soriano

unread,
Mar 17, 2004, 6:52:42 AM3/17/04
to
Hi.
There are a lot of posts with an error about charset conversion with
jdbc sybase driver jconnect2:

java.sql.SQLException: JZ006: Caught IOException: java.io.IOException:
JZ0I6: An error occured converting UNICODE to the charset used by the
server. Error message: java.io.CharConversionException: ...

And a lot sof suggestions in the way of... try to use PureConvertor o
sample2.SunIoConvertor. This runs only with data retrieving, but
doesn't run with data modification. The solution I have definitively
arranged is to make a class like SunIoConvertor, but modify the next
method:

public void setEncoding(String encoding)
throws UnsupportedEncodingException
{
_toUnicode = ByteToCharConverter.getConverter("8859_1");
_fromUnicode = CharToByteConverter.getConverter("8859_1");
}

and with de connection url, only provide the CHARSET_CONVERTER_CLASS
property/parameter, with no CHARSET provided.

This runs Ok with my Resin 2.1.10, jdk1.4, jconnect5_5, ASE12.5
(installed in a unknown s.o. , maybe NT).

Until here, i had made my work.

0 new messages