diff --git a/reference/intl/constants.xml b/reference/intl/constants.xml index 10dad215d8..0dd1900369 100644 --- a/reference/intl/constants.xml +++ b/reference/intl/constants.xml @@ -51,6 +51,129 @@ + + + IDNA_CHECK_BIDI + (integer) + + + + Check whether the input conforms to the BiDi rules. + Ignored by the IDNA2003 implementation, which always performs this check. + + + + + + IDNA_CHECK_CONTEXTJ + (integer) + + + + Check whether the input conforms to the CONTEXTJ rules. + Ignored by the IDNA2003 implementation, as this check is new in IDNA2008. + + + + + + IDNA_NONTRANSITIONAL_TO_ASCII + (integer) + + + + Option for nontransitional processing in + idn_to_ascii. Transitional processing is activated + by default. This option is ignored by the IDNA2003 implementation. + + + + + + IDNA_NONTRANSITIONAL_TO_UNICODE + (integer) + + + + Option for nontransitional processing in + idn_to_utf8. Transitional processing is activated + by default. This option is ignored by the IDNA2003 implementation. + + + + + + INTL_IDNA_VARIANT_2003 + (integer) + + + + Use IDNA 2003 algorithm in idn_to_utf8 and + idn_to_ascii. This is the default. + + + + + + INTL_IDNA_VARIANT_UTS46 + (integer) + + + + Use UTS #46 algorithm in idn_to_utf8 and + idn_to_ascii. + + + + + + IDNA_ERROR_EMPTY_LABEL (integer) + + + IDNA_ERROR_LABEL_TOO_LONG (integer) + + + IDNA_ERROR_DOMAIN_NAME_TOO_LONG (integer) + + + IDNA_ERROR_LEADING_HYPHEN (integer) + + + IDNA_ERROR_TRAILING_HYPHEN (integer) + + + IDNA_ERROR_HYPHEN_3_4 (integer) + + + IDNA_ERROR_LEADING_COMBINING_MARK + (integer) + + + IDNA_ERROR_DISALLOWED (integer) + + + IDNA_ERROR_PUNYCODE (integer) + + + IDNA_ERROR_LABEL_HAS_DOT (integer) + + + IDNA_ERROR_INVALID_ACE_LABEL (integer) + + + IDNA_ERROR_BIDI (integer) + + + IDNA_ERROR_CONTEXTJ (integer) + + + + Errors reported in a bitset returned by the UTS #46 algorithm in + idn_to_utf8 and + idn_to_ascii. + + + diff --git a/reference/intl/idn/idn-to-ascii.xml b/reference/intl/idn/idn-to-ascii.xml index 231603156d..bd1035e74e 100644 --- a/reference/intl/idn/idn-to-ascii.xml +++ b/reference/intl/idn/idn-to-ascii.xml @@ -11,7 +11,9 @@ stringidn_to_ascii stringdomain - intoptions + intoptions0 + intvariantINTL_IDNA_VARIANT_2003 + arrayidna_info This function converts Unicode domain name to IDNA ASCII-compatible format. @@ -34,14 +36,40 @@ options - Conversion options - combination of IDNA_* constants. + Conversion options - combination of IDNA_* constants + (except IDNA_ERROR_* constants). + + + + + variant + + + Either INTL_IDNA_VARIANT_2003 for IDNA 2003 or + INTL_IDNA_VARIANT_UTS46 for UTS #46. + + + + + idna_info + + + This parameter can be used only if + INTL_IDNA_VARIANT_UTS46 was used for + variant. In that case, it will be filled with an + array with the keys 'result', the possibly illegal + result of the transformation, + 'isTransitionalDifferent', a boolean indicating + whether the usage of the transitional mechanisms of UTS #46 either has + or would have changed the result and 'errors', + which is an int representing a bitset of the error + constants IDNA_ERROR_*. - &reftitle.returnvalues; @@ -49,6 +77,31 @@ Domain name encoded in ASCII-compatible form. &return.falseforfailure; + + + &reftitle.changelog; + + + + + + &Version; + &Description; + + + + + 5.4.0/PECL 2.0.0b1 + + Added the parameters variant and + idna_info; UTS #46 support. + + + + + + + &reftitle.examples; diff --git a/reference/intl/idn/idn-to-utf8.xml b/reference/intl/idn/idn-to-utf8.xml index b5cae24011..7d188fb60b 100644 --- a/reference/intl/idn/idn-to-utf8.xml +++ b/reference/intl/idn/idn-to-utf8.xml @@ -11,10 +11,12 @@ stringidn_to_utf8 stringdomain - intoptions + intoptions0 + intvariantINTL_IDNA_VARIANT_2003 + arrayidna_info - This function converts Unicode domain name from IDNA ASCII-compatible format to plain Unicode. + This function converts Unicode domain name from IDNA ASCII-compatible format to plain Unicode, encoded in UTF-8. @@ -34,19 +36,70 @@ options - Conversion options - combination of IDNA_* constants. + Conversion options - combination of IDNA_* constants + (except IDNA_ERROR_* constants). + + + + + variant + + + Either INTL_IDNA_VARIANT_2003 for IDNA 2003 or + INTL_IDNA_VARIANT_UTS46 for UTS #46. + + + + + idna_info + + + This parameter can be used only if + INTL_IDNA_VARIANT_UTS46 was used for + variant. In that case, it will be filled with an + array with the keys 'result', the possibly illegal + result of the transformation, + 'isTransitionalDifferent', a boolean indicating + whether the usage of the transitional mechanisms of UTS #46 either has + or would have changed the result and 'errors', + which is an int representing a bitset of the error + constants IDNA_ERROR_*. - - + &reftitle.returnvalues; - Domain name in Unicode. In PHP 5, domain name will be in UTF-8. &return.falseforfailure; + Domain name in Unicode, encoded in UTF-8. &return.falseforfailure; + + + + + &reftitle.changelog; + + + + + + &Version; + &Description; + + + + + 5.4.0/PECL 2.0.0b1 + + Added the parameters variant and + idna_info; UTS #46 support. + + + + +