adodb mssql server utf8 issue

11/09/2008 - 23:16 von David .Wu | Report spam
I use adodb for php connect to mssql server through odbc, and my
default character set is utf8, when I insert traditional Chinese
character, the data become garbage character in database, I thought it
was because adodb driver did not declare my data as utf8, and I found
the solution for php with mysql

if ($this->_connectionID false) return false;

+ @mysql_query("SET NAMES 'utf8'", $this->_connectionID);

if ($argDatabasename) return $this->SelectDB($argDatabasename);
return true;

add the query between connection query and every thins was fine, but I
can't find solution for mssql, any one can help me?
 

Lesen sie die antworten

#1 Thorsten Albers
12/09/2008 - 13:12 | Warnen spam
David .Wu schrieb im Beitrag
...
I use adodb for php connect to mssql server through odbc, and my
default character set is utf8, when I insert traditional Chinese
character, the data become garbage character in database, I thought it
was because adodb driver did not declare my data as utf8, and I found
the solution for php with mysql

if ($this->_connectionID false) return false;

+ @mysql_query("SET NAMES 'utf8'", $this->_connectionID);

if ($argDatabasename) return $this->SelectDB($argDatabasename);
return true;

add the query between connection query and every thins was fine, but I
can't find solution for mssql, any one can help me?



a) This newsgroup is for postings in german language only. There are
comparable newsgroups for other languages available.

b) This is a newsgroup for programming with MS Visual Basic <= 6.0. It is
not a newsgroup for questions concerning MySQL, PHP, ADODB, or ODBC. Ask
your question in an appropriate newsgroup.

-
Thorsten Albers albers(a)uni-freiburg.de
-

Ähnliche fragen