diff --git a/reference/idn/book.xml b/reference/idn/book.xml
new file mode 100644
index 0000000000..e1ad6f9683
--- /dev/null
+++ b/reference/idn/book.xml
@@ -0,0 +1,45 @@
+
+
+
+
+
+
+ idn
+ International Domain Names
+
+
+ &reftitle.intro;
+
+ This extension gives access to the GNU Libidn which is
+ an implementation of the Stringprep, Punycode and IDNA specifications
+ defined by the IETF Internationalized Domain Names (IDN) working
+ group, used for internationalized domain names.
+
+
+
+ &reference.idn.setup;
+ &reference.idn.constants;
+ &reference.idn.reference;
+
+
+
+
diff --git a/reference/idn/constants.xml b/reference/idn/constants.xml
new file mode 100644
index 0000000000..f4c65e193d
--- /dev/null
+++ b/reference/idn/constants.xml
@@ -0,0 +1,133 @@
+
+
+
+
+ &reftitle.constants;
+ &extension.constants;
+
+
+
+
+ IDNA_STRINGPREP_ERROR
+ (integer)
+
+
+
+
+
+
+
+
+ IDNA_PUNYCODE_ERROR
+ (integer)
+
+
+
+
+
+
+
+
+ IDNA_CONTAINS_NON_LDH
+ (integer)
+
+
+
+
+
+
+
+
+ IDNA_CONTAINS_MINUS
+ (integer)
+
+
+
+
+
+
+
+
+ IDNA_INVALID_LENGTH
+ (integer)
+
+
+
+
+
+
+
+
+ IDNA_NO_ACE_PREFIX
+ (integer)
+
+
+
+
+
+
+
+
+ IDNA_ROUNDTRIP_VERIFY_ERROR
+ (integer)
+
+
+
+
+
+
+
+
+ IDNA_CONTAINS_ACE_PREFIX
+ (integer)
+
+
+
+
+
+
+
+
+ IDNA_ICONV_ERROR
+ (integer)
+
+
+
+
+
+
+
+
+ IDNA_MALLOC_ERROR
+ (integer)
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/reference/idn/functions/idn-strerror.xml b/reference/idn/functions/idn-strerror.xml
new file mode 100644
index 0000000000..03b423bcd0
--- /dev/null
+++ b/reference/idn/functions/idn-strerror.xml
@@ -0,0 +1,75 @@
+
+
+
+
+
+ idn_strerror
+ Returns string describing the IDNA error code
+
+
+
+ &reftitle.description;
+
+ stringidn_strerror
+ integererrorcode
+
+
+ This function returns the error message string that corresponds to the given error code.
+
+
+
+
+ &reftitle.parameters;
+
+
+
+ errorcode
+
+
+ The error code as returned by idn_to_ascii or idn_to_utf8.
+
+
+
+
+
+
+
+
+ &reftitle.returnvalues;
+
+ The corresponding libidn error message string is returned.
+
+
+
+
+ &reftitle.seealso;
+
+
+ idn_to_ascii
+ idn_to_utf8
+
+
+
+
+
+
+
diff --git a/reference/idn/functions/idn-to-ascii.xml b/reference/idn/functions/idn-to-ascii.xml
new file mode 100644
index 0000000000..f63e32891e
--- /dev/null
+++ b/reference/idn/functions/idn-to-ascii.xml
@@ -0,0 +1,139 @@
+
+
+
+
+
+ idn_to_ascii
+ Convert UTF-8 encoded domain name to ASCII
+
+
+
+ &reftitle.description;
+
+ stringidn_to_ascii
+ stringutf8_domain
+ integererrorcode
+
+
+ This function converts a UTF-8 encoded domain name to ASCII according to the IDNA toUnicode() specification.
+ If the input has non-ASCII characters, the output will be in the "xn--" ACE notation.
+
+
+
+
+ &reftitle.parameters;
+
+
+
+ utf8_domain
+
+
+ The UTF-8 encoded domain name.
+
+
+ If e.g. an ISO-8859-1 (aka Western Europe latin1) encoded string is
+ passed it will be converted into an ACE encoded "xn--" string.
+ It will not be the one you expected though!
+
+
+
+
+
+
+ errorcode
+
+
+ Will be set to the IDNA error code.
+
+
+
+
+
+
+
+
+
+ &reftitle.returnvalues;
+
+
+ The ACE encoded version of the domain name or &false; in case of an error.
+
+
+
+
+ &reftitle.errors;
+
+ If an error occurs &false; is returned and the optional errorcode is set.
+ In addition a E_WARNING message is printed.
+
+
+
+
+ &reftitle.examples;
+
+
+ idn_to_ascii example
+
+ First a simple example and then one explaining how to catch errors.
+
+
+
+]]>
+
+ &example.outputs.similar;
+
+
+
+
+
+
+
+
+ &reftitle.seealso;
+
+
+ utf8_encode
+ idn_strerror
+ itn_to_utf8
+
+
+
+
+
+
+
diff --git a/reference/idn/functions/idn-to-utf8.xml b/reference/idn/functions/idn-to-utf8.xml
new file mode 100644
index 0000000000..079c0cf6d4
--- /dev/null
+++ b/reference/idn/functions/idn-to-utf8.xml
@@ -0,0 +1,130 @@
+
+
+
+
+
+ idn_to_utf8
+ Convert ASCII encoded domain name to UTF-8
+
+
+
+ &reftitle.description;
+
+ stringidn_to_utf8
+ stringascii_domain
+ integererrorcode
+
+
+ This function converts a ASCII encoded domain name to its original UTF-8 version.
+
+
+
+
+ &reftitle.parameters;
+
+
+
+ ascii_domain
+
+
+ The ASCII encoded domain name. Looks like "xn--..." if the it originally contained non-ASCII characters.
+
+
+
+
+ errorcode
+
+
+ Will be set to the IDNA error code.
+
+
+
+
+
+
+
+
+
+ &reftitle.returnvalues;
+
+ The UTF-8 encoded version of the domain name or &false; in case of an error.
+ RFC 3490 4.2 states though "ToUnicode never fails. If any step fails, then the original input
+ sequence is returned immediately in that step."
+
+
+
+
+ &reftitle.errors;
+
+ If an error occurs &false; is returned and the optional errorcode is set.
+ In addition a E_WARNING message is printed.
+
+
+
+
+ &reftitle.examples;
+
+
+ idn_to_utf8 example
+
+ First a simple example and then one explaining how to catch errors (which should never happen according to the RFC).
+
+
+
+]]>
+
+ &example.outputs.similar;
+
+
+
+
+
+
+
+
+ &reftitle.seealso;
+
+
+ utf8_decode
+ idn_strerror
+ idn_to_ascii
+
+
+
+
+
+
+
diff --git a/reference/idn/reference.xml b/reference/idn/reference.xml
new file mode 100644
index 0000000000..59bf65b878
--- /dev/null
+++ b/reference/idn/reference.xml
@@ -0,0 +1,31 @@
+
+
+
+
+ Idn &Functions;
+
+ &reference.idn.entities.functions;
+
+
+
+
+
diff --git a/reference/idn/setup.xml b/reference/idn/setup.xml
new file mode 100644
index 0000000000..012a7b0588
--- /dev/null
+++ b/reference/idn/setup.xml
@@ -0,0 +1,66 @@
+
+
+
+
+ &reftitle.setup;
+
+
+
+ &reftitle.required;
+
+ The GNU IDN library must be installed.
+
+
+
+
+
+
+ &reftitle.install;
+
+ &pecl.moved;
+
+
+ &pecl.info;
+ &url.pecl.package;idn.
+
+
+
+
+
+
+ &reftitle.runtime;
+ &no.config;
+
+
+
+
+
+ &reftitle.resources;
+ &no.resource;
+
+
+
+
+
+
+
+
diff --git a/reference/idn/versions.xml b/reference/idn/versions.xml
new file mode 100644
index 0000000000..57a7064473
--- /dev/null
+++ b/reference/idn/versions.xml
@@ -0,0 +1,33 @@
+
+
+
+
+
+
+
+
+
+
+
+