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.
please refer to the source for the package name
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.
Try using SunIOConverter or PureConverter for your charset converter.
Do you think I don't have SunIoConveter ? I suspect this but do not know
how to check. Your input is very appreciate.