Included in Libidn are punycode.el and idna.el that provides an Emacs Lisp API to (a limited set of) the Libidn API. This section describes the API. Currently the IDNA API always set the UseSTD3ASCIIRules flag and clear the AllowUnassigned flag, in the future there may be functionality to specify these flags via the API.
punycode-program
Name of the GNU Libidn idn application. The default is
idn. This variable can be customized.
punycode-environment
List of environment variable definitions prepended to
process-environment. The default is ("CHARSET=UTF-8").
This variable can be customized.
punycode-encode-parameters
List of parameters passed to punycode-program to invoke punycode
encoding mode. The default is ("--quiet" "--punycode-encode").
This variable can be customized.
punycode-decode-parameters
Parameters passed to punycode-program to invoke punycode
decoding mode. The default is ("--quiet" "--punycode-decode").
This variable can be customized.
punycode-encode
string
Returns a Punycode encoding of the string, after converting the
input into UTF-8.
punycode-decode
string
Returns a possibly multibyte string which is the decoding of the
string which is a punycode encoded string.