I am trying to read some data from an uploaded Excel file through ODBC.

I have the file uploaded properly, and the ODBC socket connection made.

But if i grab data and output, all of the Chinese characters are blown out.

My code is as follows:

<cfquery name="Test" datasource="DataSource">
    SELECT c_item, c_name
    FROM [tablename$]

<cfoutput query="Test">
<p>#c_item# : #c_name#</p>

And the output is like:

40641S : ¶¶µo¤uµ{¦æ
40348H : ¬Ó©É¤uµ{¥ø·~¦³­­¤½¥q
40456J : ª÷©y¦¨¤ô¹qªA°È¦

I've tried meta content-type and cfcontent type, but no luck so far. I also tried to set connection string in CFAdmin "characterEncoding=UTF-8" no luck there either.

What am I missing? Any suggestions are appreciated.


You can determine if the problem is CF-related or DB Driver related by querying the ODBC datasource using a tool other then CF. If you the query comes through okay using another tool, then you know the problem is somewhere in CF.

Hope this helps you isolate the problem!