Outdated egg!

This is an egg for CHICKEN 4, the unsupported old release. You're almost certainly looking for the CHICKEN 5 version of this egg, if it exists.

If it does not exist, there may be equivalent functionality provided by another egg; have a look at the egg index. Otherwise, please consider porting this egg to the current version of CHICKEN.


  1. Outdated egg!
  2. punycode
    1. Description
    2. API
    3. Example
    4. Source code / Issues


RFC 3492 Punycode implementation for CHICKEN Scheme. Encodes internationalized domain names in the ASCII subset supported by DNS. Useful if you want to display unicode domains in your user interface or accept unicode domains as input.


[procedure] (punycode-encode str)

Converts a unicode string to Punycode ASCII.

[procedure] (punycode-decode str)

Converts a Punycode ASCII string to unicode.

[procedure] (domain->ascii str)

Converts a internationalized domain name to an ASCII representation (if the domain is already ASCII-only it is returned unmodified).

[procedure] (domain->unicode str)

Converts a Punycode ASCII domain name to a unicode string (if the domain is already unicode it is returned unmodified).


(use punycode)

(punycode-encode "Bücher")
;; => "Bcher-kva"

(punycode-decode "Bcher-kva")
;; => "Bücher"

(domain->ascii "www.bücher.de")
;; => "www.xn--bcher-kva.de"

(domain->unicode "www.xn--bcher-kva.de")
;; => "www.bücher.de"

Source code / Issues