Skip to Content.
Sympa Menu

freetds - [freetds] Unable to connect to Sql Server via PHP when client chartset = CP1252

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: Chris Ballard <cballard AT datix.co.uk>
  • To: freetds AT lists.ibiblio.org
  • Subject: [freetds] Unable to connect to Sql Server via PHP when client chartset = CP1252
  • Date: Fri, 18 Nov 2011 17:32:43 +0000 (UTC)

Hi guys,

We have a web app running on Windows under PHP 5.3.8 using FreeTDS v0.82 to
connect to SQL Server. The original config was as follows:

[global]
host = ourserver
port = 1433
tds version = 8.0
text size = 20971520

We're experiencing problems saving some characters (e.g. “) to the DB -
they're
entered as question marks.

I've attempted to remedy this by adding a client charset definition, but
setting
this to CP1252 results in the connection to SQL Server not working at all.

Curiously, this works if I change the tds version to 7.2 (i.e. the connection
is
successful and the characters are saved correctly) but
all the the calls to stored procedures then fail.

Would be very grateful if anyone can suggest a resolution.

Many thanks in advance,
Chris





Archive powered by MHonArc 2.6.24.

Top of Page