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

JZ0I6 error convert UNICODE to cp850

110 views
Skip to first unread message

jden...@hotmail.com

unread,
Apr 15, 2001, 10:52:28 PM4/15/01
to
My sybase db server has cp850 as default char set. There are portugese
character store in the database. I'm using Jisql retrieving data from the
database. I had problem display data in the beginning. I resolved the
problem by setting the following properties:

CHARSET_CONVERTER_CLASS=com.sybase.jdbc2.utils.TruncationConverter

Then, I try insert portugese data. It failed with following error:

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: ê
at
com.sybase.jdbc2.jdbc.ErrorMessage.raiseError(ErrorMessage.java:426)
at com.sybase.jdbc2.tds.Tds.handleIOE(Tds.java:2794)
at com.sybase.jdbc2.tds.Tds.language(Tds.java:635)
at
com.sybase.jdbc2.jdbc.SybStatement.sendQuery(SybStatement.java:1315)
at
com.sybase.jdbc2.jdbc.SybStatement.execute(SybStatement.java:1526)
at
com.sybase.jdbc2.jdbc.SybStatement.execute(SybStatement.java:742)
at com.sybase.jisql.ExecQueryThread.executeIt(Compiled Code)
at com.sybase.jisql.ExecQueryThread.run(Compiled Code)

I then tried add property &CHARSET=cp850 with a thought that if I set this
property, it will send the data to db server as if it is cp850 (not
Unicode), so that there will not be any conversion. Well, it's not
working.

Anyone knows of any workaround for this problem, please advice.

Db server is sybase 11.9.2 on Win NT.
Client is also Winnt.
I'm using jdk 1.1.8, jconnect 5.2, jislq 2.0.

Thanks.

lance.a...@sun.com

unread,
Apr 16, 2001, 10:19:45 AM4/16/01
to
SunIoConverter is in the sample2 directory and it must be
in your class path.

please refer to the source for the package name

jden...@hotmail.com

unread,
Apr 16, 2001, 12:15:38 PM4/16/01
to
Lance,
Got the SunIoConverter to work, Thanks. I have to change the property to
read like:
CHARSET_CONVERTER_CLASS=sample2.SunIoConverter

I'm able to login and do query. But the data isn't displayed correctly.
Although, I can do insert w/o causing error JZ016.

It appears now that if I want to read the existing data or new data which
is entered into database via open client, I have to use
CHARSET_CONVERTER_CLASS=com.sybase.jdbc2.utils.TruncationConverter

Then, if I want to insert data, I have to use SunIoConverter or
PureConverter. However, in order to read these data, I must also use
either SunIoConverter or PureConverter. If I try TruncationConverter,
these data will not be displayed properly.

This is still not good for me... Huhhhh ...!!!

Still welcome for any new suggestion.

lance.a...@sun.com

unread,
Apr 16, 2001, 8:40:14 AM4/16/01
to
Truncation converter is not meant for using characters out of
ascii7 (char(0) - char(127))


Try using SunIOConverter or PureConverter for your charset converter.

jden...@hotmail.com

unread,
Apr 16, 2001, 10:07:37 AM4/16/01
to
Thanks for your reply. I have tried PureConverter, data is not displayed
correctly. Then, I tried SunIoConverter. With this, I couldn't connect to
the database server at all. I got message "Error while connecting to the
database".

Do you think I don't have SunIoConveter ? I suspect this but do not know
how to check. Your input is very appreciate.

0 new messages