开发者

Error converting client characters into server's character set?

开发者 https://www.devze.com 2023-02-06 19:03 出处:网络
I have designed a web form using PHP as a server-side script that should insert data into a Sybase ASE database table using ODBC Functions.

I have designed a web form using PHP as a server-side script that should insert data into a Sybase ASE database table using ODBC Functions.

When I fill the form fields with English word and ASCII Characters it works ok and saves data in the database but when I use Arabic and extended ASCII, UTF, or Unicode characters, I get the following error message:-

Warning: odbc_exec() [function.odbc-exec]: SQL error: [INTERSOLV][ODBC SQL Server driver][SQL Server]Error converting client characters into server's chara开发者_StackOverflow中文版cter set. Some character(s) could not be converted. , SQL state S1000 in SQLExecDirect in C:\wamp\www\website1\webpage1.php on line 111

Is this because I have the settings on my database (or server) set incorrectly? In which case what should I change? and how do I change it?

Or, do I need to some function(s) to convert the extended ASCII characters? In which case, have the necessary functions already been writeen? and where can I find them? How I can solve that problem?

Thanks for your help.


I discovered the solution of the problem afterwards which was that I am not saving the php file in the correct encoding using Save As and choosing the right encoding. I would like to share that so that it may be helpful for others who had the same problem. Sometimes We face problems that seems to be very difficult but their solutions are very simple as we discovered afterwards.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号