Re: Unable to connect to Sql Server via PHP when client chartset = CP1252

Frediano Ziglio <[email protected]>
Newsgroups gmane.comp.db.tds.freetds
Message-ID <CAHt6W4ef3qL1HNeEg=9RCi=F4Fr7J1FSuL4jw41Ee-TTN+mL1Q@mail.gmail.com>
2011/11/22 Chris Ballard <[email protected]>:
> James K. Lowden <jklowden <at> freetds.org> writes:
>
>>
>> On Fri, 18 Nov 2011 17:32:43 +0000 (UTC)
>> Chris Ballard <cballard <at> datix.co.uk> wrote:
>>
>> > 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.
>>
>> Are you linked to a real iconv library?  The built-in one won't handle
>> 1252.  TDSDUMP is your friend there, also "tsql -C".
>>
>> Second, what collation are you using on the column holding the, ahem,
>> smart quotes?  Are those characters in fact part of that collation?
>>
>> --jkl
>>
>
> Hi James,
>
> Thanks for your response.  PHP has native iconv functionality which I've tried
> using, but to no avail.  The collation that's used is Latin1_General_CI_AS - I
> don't think this is the issue though since the characters save ok when running
> the statement against the DB directly (i.e. via Management Studio), so I'd guess
> it's something to do the way the driver is interpreting/presenting these
> characters?
>
> I've done some testing with a whole load of other non-standard ASCII characters
> and they seem to save ok - the only ones that get saved as question marks appear
> to be these "smart quotes": “”‘’.
>

ASCII is a standard, there are no non-standard ASCII characters :)
Smart quote is a no-ASCII character. Question marks usually appear
when something encoding are not correct. Enabling FreeTDS logs could
help understanding how FreeTDS is currently sending data.

> Is there any reason these particular characters would be causing an issue?
>
> Cheers,
> Chris
>
>

bye
  freddy77
_______________________________________________
FreeTDS mailing list
[email protected]
http://lists.ibiblio.org/mailman/listinfo/freetds
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.