title: Using ColdFusion to show Chinese Characters from AS/400 server
body: <p>I am writing a ColdFusion program that uses <code>cfquery</code> to get data from an AS/400 iSeries table and then output that data to a web page. Some times the Data is in Chinese, but it does not output the Chinese characters correctly.</p>
  
  <p>I built the query below for testing, </p>
  
  <pre><code>&lt;cfprocessingdirective pageEncoding="UTF-8" /&gt;
      &lt;cfquery name="Test" Datasource = "AS400"&gt;
          select dsc1 from sales where ref = '123456'
      &lt;/cfquery&gt;
  
  &lt;cfoutput&gt;#test.dsc1#&lt;/cfoutput&gt;
  </code></pre>
  
  <p>The result should be "M5方头螺栓" but I only get "M5".  I did another test running just:</p>
  
  <pre><code>&lt;cfset x = "M5方头螺栓"/&gt;
  &lt;cfoutput&gt;#x#&lt;/cfoutput&gt;
  </code></pre>
  
  <p>and it displays the Chinese no problem.  </p>
  
  <p>Since ColdFusion can display the characters when they are written out in the code, but not when it goes to get the data through SQL, it seems like the issue is with either my ODBC settings or my ColdFusion Server Data Source Settings but I'm not familiar enough with these settings to know what needs to be changed to get this working.</p>