Question

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 character 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.

Was it helpful?

Solution

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.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top