mssql charset conversion problem

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
lapith
Forum Newbie
Posts: 11
Joined: Fri Jul 27, 2007 4:37 pm

mssql charset conversion problem

Post by lapith »

I am currently having an issue with connecting to my mssql database in PHP. I am getting the error:

Warning: mssql_query() [function.mssql-query]: WARNING! Some character(s) could not be converted into client's character set. Unconverted bytes were changed to question marks ('?'). (severity 16) in /var/www/tools/scripts/display_widget_script.php on line 32

I am using a very simple query to just get everything from a table and mssql is quick to print out this error (many many times). After some troubleshooting I found that the table has some data in it that includes curly (or smart) quotes (which I believe are utf-8). I have tried to take some steps to fix this problem, however nothing that I do seems to help, and since the warnings are being printed when the actual query takes place (before I actually try to use the data) I cannot use utf8_encode or decode to fix the problem.

I would imagine that this topic has had to have come up before. If anyone has some information regarding a solution it would be greatly appreciated.
Post Reply