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.

Recommended Answers

All 2 Replies

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

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

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.