What platform are you running this on? DBD::ODBC only builds by default using the ODBC Unicode API on Windows. On UNIX you need to add the -u switch to Makefile.PL. What ODBC driver are you using? (as not all of them support unicode). Whilst you are at it show us your DBI and DBD::ODBC versions - you can do that with:
perl -MDBI -le "print $DBI::VERSION" perl -MDBD::ODBC -le "print $DBD::ODBC::VERSION"
Are you sure the column containing chinese text is known to SQL Server as Chinese - normally data like this goes into nvarchar columns. Even if DBD::ODBC is built using the unicode API, the ODBC driver needs to tell DBD::ODBC the column is of type SQL_WCHAR - we will only see that if you provide a trace.
Assuming you have a recent DBI and DBD::ODBC you can produce a trace like this:
# on windows set DBI_TRACE=DBD=x.log run your perl program here # on unix export DBI_TRACE=DBD=x.log run your perl program here
The logging will end up in the file x.log. If that does not produce any logging then your DBI and/or DBD::ODBC are too old so replace the "DBD" above with "15" (you'll get a lot more logging, most of which is not required).
In reply to Re: Perl DBI can't display Chinese text?
by mje
in thread Perl DBI can't display Chinese text?
by Thai Heng
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |