[freetds] unknown marker error with Sybase ASE 15.0, character encoding-related
ZIGLIO, Frediano, VF-IT
Frediano.Ziglio at vodafone.com
Mon May 28 09:42:57 EDT 2007
> I am using freetds' ct-lib to provide a database driver to the qore
> programming language for sybase and ms sql server databases. For the
> moment, I am now working on Sybase connectivity.
> Everything is going pretty well with the port to FreeTDS, however,
> with freetds, I get an "Unknown marker" error if I set a character
> encoding different to the server's encoding in my freetds.conf file
> (client message 52: severity 78: Unknown marker) and I make a simple
> select. This error is returned when the server returns a result set.
> It does not happen when I compile my driver with the real Sybase
> ct-lib, and it does not happen if I set the character encoding in
> freetds.conf to the same encoding as the server; it only happens if
> the encoding is different. Also the problem does not go away if I
> change the TDS protocol version level in the freetds.conf file (or by
> using the TDSVER environment variable).
> For example, I have a Sybase ASE 15 server called "barney" using
> "iso_1" (iso-8859-1) encoding. If I set my freetds.conf entry for
> barney to the following:
> host = barney
> port = 4112
> tds version = 5.0
> charset = utf8
> I can see from the server messages that the character encoding for the
> connection is being set properly - from my own output of the server
> TID 0: server: line:0, severity:10, n:5704: Changed client character
> set setting to 'utf8'.
> TID 0: server: line:0, severity:10, n:5701: Changed database context
> to 'master'.
> I can execute SQL statements without any problem as long as they do
> not return a result set. With the first statement that returns a
> result set, I get the "Unknown marker" error.
> As I mentioned before, it does not happen wtih Sybase' ct-lib, it does
> not happen if I set the encoding to the same value as the server (i.e.
> with charset = iso_1 in the freetds.conf entry for "barney"), and the
> problem does not go away if I change the tds protocol version number.
> I've included a dump file from setting TDSDUMP when I got this error;
> if anyone can help it would be greatly appreciated.
Mmmm.... 0xAF... this is TDS_LONGCHAR !!!
But we probably handle it as a XSYBCHAR.. which is not even supported by
How is name column declared??
More information about the FreeTDS