php-windows Digest 14 Mar 2007 18:54:27 -0000 Issue 3166

Topics (messages 27582 through 27582):

Japanese text in MSSQL database
        27582 by: Mike Matz

Administrivia:

To subscribe to the digest, e-mail:
        [EMAIL PROTECTED]

To unsubscribe from the digest, e-mail:
        [EMAIL PROTECTED]

To post to the list, e-mail:
        [email protected]


----------------------------------------------------------------------
--- Begin Message ---
Hello,
 
I'm working with an MSSQL 2000 database that contains Japanese
characters in ntext columns.  I'm not entirely sure how to see what
encoding or charset it's using, but there is a ColdFusion admin
application that can display the data in UTF8 as well as accept the
data.  I'm trying to access this data from PHP for import into a MySQL
database, and I'm currently using the PDO ODBC driver.  I had difficulty
getting other drivers working when I began importing data, either due to
the charset/encoding on these fields or due to the long text in some of
the fields, and the PDO ODBC driver in PHP 5.2.0+ was the one that
seemed to work the best.  However, I'm just now realizing that the
Japanese characters are being replaced with "?" characters when I do the
select.  I found I had this problem on the MySQL end before, but I
solved it by adding some SQL calls when initializing the connection:
 
   "SET CHARACTER SET utf8",
   "SET collation_connection = 'utf8_general_ci'",
   "SET character_set_database = utf8",
   "SET character_set_server = utf8",
   "SET character_set_client = utf8",
   "SET character_set_filesystem = utf8",

Is there something similar I need to do with MSSQL?  Is there an option
in the PDO ODBC driver I need to set somehow?  I'm guessing there's
probably a simple solution but thus far I've been unable to find
anything.  Any help or insight would be greatly appreciated!
 
Thanks,
Mike

--- End Message ---

Reply via email to