[freetds] trailing spaces

Michael Sims michaels at crye-leike.com
Wed May 26 07:54:00 EDT 2004

RCS Computers wrote:
> I have found several posts that talk about trailing spaces in output
> from the freetds driver.  I am connecting to a sybase database with
> php
> Some things I have read suggest changing the DB structure.  That is
> not an option.
> So, I would like to know if I can change the freetds in some way,
> either configuration or recompiliation, so that it mimics the Sybase
> ODBC driver and trims the data of spaces automatically?

Which PHP extension are you using with FreeTDS?  Is it the mssql extension,
the sybase extension, or the sybase-ct extension?  The latter two extensions
(and possibly all three, I'm not sure) used to trim trailing spaces but this
was changed around PHP 4.3.3 or so.  This broke a lot of my stuff at the
time so I maintain a local patch to PHP to restore the old trimming
behavior.  I'd be glad to explain more offlist if you think you can use


More information about the FreeTDS mailing list