0

I am using JDBC to connect to a Sybase table that contains extended ascii characters (ascii code >= 128). And they are returned as ?.

I am calling this from Dot Net for Apache Spark using JConn4. The sybase database is using iso_1.

In another test I was able to make ODBC show the character correctly by instructing ODBC to not use character conversion.

How could I make jdbc read the extended ascii characters properly?

Mark Rotteveel
  • 100,966
  • 191
  • 140
  • 197
  • "extended ASCII" is a very loose term that means a character set that is based on ASCII and provides a mapping to other characters for bytes 128-255. It doesn't mean anything without knowing the explicit character set to use. You may also want to look at http://infocenter.sybase.com/help/index.jsp?topic=/com.sybase.infocenter.dc39001.0707/html/prjdbc0707/BHCFJECE.htm (and its sub-topics). – Mark Rotteveel Mar 05 '20 at 17:19
  • Thank you for the reply and the link Mark Rotteveel, I tried a few things from there: Changed the JCONNECT_VERSION Set DISABLE_UNICHAR_SENDING to False Previously I had tried .Option("CHARSET", "iso_1") Option("JAVA_CHARSET_MAPPING ", "cp1252") To declare a mapping between what I have in Sybase and what I understand to be the equivalent mapping. But none of this worked. Any other suggestions? Thank you, Waldemar – Waldemar Sarmiento Mar 06 '20 at 13:15
  • I don't use Sybase myself, so I can't help you other than what I suggested earlier. – Mark Rotteveel Mar 06 '20 at 14:29

0 Answers0