0

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$]
</cfquery>

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

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.

Cheers.

Edited by peter_budo: Keep It Organized - For easy readability, always wrap programming code within posts in [code] (code blocks)

2
Contributors
1
Reply
2
Views
7 Years
Discussion Span
Last Post by utdream
0

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!

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.