954,587 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

Php mssql nvarchar

We need to access a MS SQL 2000 database with unicode data in nvarchar fields from PHP (on IIS). Unfortunately PHP's MSSQL does not support this. Unfortunately we cannot use a different driver (like ADODB) - we're stuck with the application (Interspire KM) and can't rewrite it. Is there anyway to get PHP's MSSQL driver to talk to Unicode databases?

The error message when we do UPDATEs is: Unicode data in a Unicode-only collation or ntext data cannot be sent to clients using DB-Library (such as ISQL) or ODBC version

Googling for a solution turns up the suggestion that we revert to varchar. However, if we do this, special characters (like "ΓΌ") get stored incorrectly and the search does not work so this is not really a workable option.

cawoodm
Newbie Poster
2 posts since Aug 2010
Reputation Points: 10
Solved Threads: 0
 

If field type is say "username varchar(255) utf8_unicode_ci" in mysql you will be able to save unicode chars.
Please focus on "Collation" of the field

sourcebits
Junior Poster
102 posts since Dec 2008
Reputation Points: 16
Solved Threads: 14
 

I'm sure that's quite useful to those using mySQL...

cawoodm
Newbie Poster
2 posts since Aug 2010
Reputation Points: 10
Solved Threads: 0
 

This article has been dead for over three months

Post: Markdown Syntax: Formatting Help
You
View similar articles that have also been tagged: