Skip to main content
Participating Frequently
August 18, 2007
Question

puny code and IDN(International Domain Name)

  • August 18, 2007
  • 1 reply
  • 878 views
quote:

code in google.cfm

<cflocation url=' http://www.google.co.kr/search?q=#listFirst(cgi.server_name,'.')#' addToken='no'>


The code above is in http://www.dot.kr/test/google.cfm.

if you click the above link it will go to google search page with the keyword " www."

if you change the sub-domain "www" to another word, it will go to google search page with the keyword " another word."


You can test it with the links below.

http://book.dot.kr/test/google.cfm book
http://note.dot.kr/test/google.cfm[ note
http://adobe.dot.kr/test/google.cfm adobe
http://movie.dot.kr/test/google.cfm movie
http://coldfusion.dot.kr/test/google.cfm coldfusion
: :
http://e.dot.kr/test/google.cfm the alphabet e



The links above works fine as I expected.

when the sub-domain is English, it works fine like the links above.



But the sub-domain is non-English, it goes to google search page with the keyword in PUNY Code (xn-code).

For example,

The following link doesn't work correctly because the sub-domain is non-English.

http://é.dot.kr/test/google.cfm the alphabet é

If you click the link above, it will go to google search page with the keyword " xn--9ca" instead of " é"


" xn--9ca" is the PUNY Code (xn code) of the IDN(international domain name) " é."


I like to make it go to google search page with the IDN keyword instead of
the puny code keyword when a user enters IDN sub-domain.
(I like to make it go to google search page with the IDN keyword " é" instead of the puny code keyword " xn--9ca')


Any suggestion will be appreciated.
    This topic has been closed for replies.

    1 reply

    joonstarAuthor
    Participating Frequently
    August 21, 2007
    As IE7 is on the road, most major browsers support IDN(International Domain Name)

    I think Server-scripting language should support IDN,
    i.e. we should read IDN in server-scripting languages.


    I've heard that there are some clues for reading IDN in PHP.

    http://pear.speedpartner.de/apidoc/I18N_Punycode/I18N_Punycode/_Punycode_Punycode_php.html

    http://phlymail.de/index.php?sid=79a...oads&what=idna

    http://www.phpclasses.org/browse/file/5845.html



    Then, why can't ColdFusion read IDN?


    For example,
    #cgi.HTTP_HOST in ColdFusion read EDN(English Domain Name).

    We need a kind of cgi variables which is likely named "cgi.HTTP_IDN" which can read IDN instead of PunyCode.

    How can I read IDN in ColdFusion?

    Any suggestion will be appreciated.