[freetds] Weird behavior with Unicode data

Savvas Kampouridis savvas.kampouridis at gmail.com
Sun Sep 29 16:13:11 EDT 2013


Hello everyone.

I have detected a rather weird behavior when I use FreeTDS with PHP on a
CentOS machine and perform a select on SQL Server 2012 on Unicode data. I
have nvarchar(50) columns that contain Unicode strings with variable
lengths. When any string has a length of more than 25, the driver does not
return the column data at all, returning an empty string instead.

I am using the latest FreeTDS driver with the latest unixODBC and I have
set the tds version to 8.0 and the client charset to utf-8. When the client
charset is not set the response is a lot of ??? which is probably logical.

Is there anything that anyone has in mind? I would happily provide any
additional info you might need.

Thanks in advance for any help that you might be able to provide.


Savvas Kampouridis


More information about the FreeTDS mailing list