Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

PHP and MSSQL, UTF-8 and UCS-2

Status
Not open for further replies.

lijil

Programmer
Jun 9, 2004
16
CA
We are creating a multi-language web app, so we want to serve up our pages as UTF-8. However we are using Microsoft SQL Server 2000 for our database back-end, which apparently does NOT support UTF-8 (only UCS-2).
See:
At this point I am completely confused as to how/if these two applications can work together. Could someone give me an overview on what SQL server datatypes should be used (varchar/nvarchar), what PHP mbstring.* settings I should be specifying, etc.

If I enter French or Japanese characters into an nvarchar column via MSSQL Enterprise manager, specify that PHP is to use UTF-8 internally and output UTF-8, I still get garbage text. I have tried using the iconv library to no avail.

This problem must have been encountered before, if it has could someone please direct me to some good documentation!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top