Japanese text in MSSQL database

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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

[Index of Archives]     [PHP Home]     [PHP Users]     [PHP Database Programming]     [PHP Install]     [Kernel Newbies]     [Yosemite Forum]     [PHP Books]

  Powered by Linux