473,386 Members | 1,745 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

Cannot retrieve data in utf-8 from php


I have a IIS server with php3 installed. I have SQL server database
and data stored in unicode format (nvarchar fields). In header of my
php I have the meta: <meta HTTP-EQUIV="content-type"
CONTENT="text/html; charset=UTF-8">.

I have the following problem:

- I trie to do a query using ODBC (version 3.525.1022.0) and SQL
Server odbc driver (version 200.85.1022.00). The query doesn't
retrieve information in utf format and accents and extra characters
aren't showed correctly.

- I trie to di the query usin native OLE DB. I use mssql funtions and
the problem is the same.

If I install php4 and I use "new
COM("ADODB.Connection",NULL,CP_UTF8);", then it works correctly.

Anybody knows if its posible to retrieve data from sql-server in utf-8
format using php3?

I see in other postings that odbc driver only accept utf-8 in version
3.7 or higher? Is it true? If is true, where I can download odbc
driver 3.7?

Thank's in advance.
Jul 20 '05 #1
1 8799
Miki (mi*******@hotmail.com) writes:
I see in other postings that odbc driver only accept utf-8 in version
3.7 or higher? Is it true? If is true, where I can download odbc
driver 3.7?

First, as far as I know, the ODBC driver for SQL Server does not handle
UTF-8 at all, since SQL Server does not support UTF-8, but stores
all Unicode data as UCS-2. See http://support.microsoft.com/?id=232580.

ODBC is part of the MDAC, and with any recently new Windows machine,
you have an MDAC version which includes ODBC 3.7 or later. If you have
some old NT4 platform, you may have to look for something news.

Go to http://www.microsoft.com/downloads/s...displaylang=en,
and pick MDAC. You will have to check the versions that they support
your OS.
Erland Sommarskog, SQL Server MVP, so****@algonet.se

Books Online for SQL Server SP3 at
Jul 20 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

by: Miki | last post by:
Hi. I have a IIS server with php3 installed. I have SQL server database and data stored in unicode format (nvarchar fields). In header of my php I have the meta: <meta HTTP-EQUIV="content-type"...
by: baustin75 | last post by:
Posted: Mon Oct 03, 2005 1:41 pm Post subject: cannot mail() in ie only when debugging in php designer 2005 -------------------------------------------------------------------------------- ...
by: Daman | last post by:
Hi, I am currently facing difficulty displaying chinese, japanese, russian etc. characters. I am using VB 6 and ADO to query the DB2 Version 7.2 unicode database (UTF-8). The resultset that...
by: Smutny30 | last post by:
Hello, I am preparing a database that will store 10 n * GBs - 100 n * GBs of data. I calculated to have 1,2 GB of bufferpools. I run the DB2 v. 8.2.1 alone on 4 GB box. I obtain : ...
by: Thomas | last post by:
Hi, I used xsd.exe to generate a *.xsd file from the *.xml-File and then I created a typed DataSet in VisualStudio 2003 But now I have problems to read the data from the DataSet. <?xml...
by: Zodiac | last post by:
Hi all, I have exported a XML from Access an it looks like this: <?xml version="1.0" encoding="UTF-8"?> <dataroot xmlns:od="urn:schemas-microsoft-com:officedata"...
by: Charts | last post by:
I used HttpContext.Current.Cache To cache data from database. The code is like that. public static DataView GetCategories() { if ( HttpContext.Current.Cache == null ) {...
by: =?Utf-8?B?QXhlbCBEYWhtZW4=?= | last post by:
Hi, I've created a class library assembly containing several string resource files, like: - TableColumns.resx - TableColumns.de.resx - General.resx - General.de.resx
by: =?Utf-8?B?UVNJRGV2ZWxvcGVy?= | last post by:
I have a C# logging assembly with a static constructor and methods that is called from another C# Assembly that is used as a COM interface for a VB6 Application. Ideally I need to build a file...
by: lifeisgreat20009 | last post by:
I am a newbie to Struts and JSP...I have been working on the code below for 5 hours now..I googled a lot but couldn't get much help so finally I am here.. Hoping of getting my problem solved. Please...
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.