I tried to insert Hebrew a text value into a column, But it changes the value to Gibberish. An example of that:
mssql_query ("UPDATE TABLE SET COLUMON = N'בדיקה'");
As you can assume, It changes the value of the column, But the value changed to ?????
and if I try to do it from Query Analyser it works fine.
My column's collation is HEBREW_CI_AS
. How can I fix this?
I solve this problem if someone else has this problem here is my way to fix that:
- Create a new database for this specific table or else tables for your web.
- Set Hebrew_CI_AS as collation (everyone to what he created).
- In your PHP code use mb_convert_encoding() function for SELECT and INSERT.