title: Coldfusion with Java IDN handling international domains
body: <p>I'm rewriting one of our forms so that it can handle international domains, but before I start on that i thought i would test the capabilities of handling IDNs.</p>
  
  <p>My thoughts were, should someone enter a domain like: http://清华大学.cn i would store it as the punycode in my database. With this in mind I then found the Java IDN handler and wrote this bit of test code:</p>
  
  <pre><code>&lt;cfset strUrl = "http://清华大学.cn" /&gt;
  &lt;cfoutput&gt;
  #strURL#
  &lt;/cfoutput&gt;     
  &lt;!--- Create a Java URL. ---&gt;
  &lt;cfset jUrl = CreateObject( "java", "java.net.IDN" ).toAscii(strUrl) /&gt;
  
  &lt;cfoutput&gt;
  #jURL#
  &lt;/cfoutput&gt;
  </code></pre>
  
  <p>However, upon running this I get an error:</p>
  
  <blockquote>
    <p>A prohibited code point was found in the inputhttp://æ ̧...å�žå¤§å¦ </p>
  </blockquote>
  
  <p>This occurs on the <code>.toAscii</code> line. What have i missed?</p>