Encode/decode Internationalized Domain Names.
The class allows to convert internationalized domain names (see RFC 3490 for details) as they can be used with various registries worldwide to be translated between their original (localized) form and their encoded form as it will be used in the DNS (Domain Name System).
The class provides two public methods, encode() and decode(), which do exactly what you would expect them to do. You are allowed to use complete domain names, simple strings and complete email addresses as well. That means, that you might use any of the following notations:
ACE input and output is always expected to be ASCII.
Located in /libraries/simplepie/idn/idna_convert.class.php (line 54)
Class | Description |
---|---|
![]() |
Adapter class for aligning the API of idna_convert with that of Net_IDNA |
Decode a given ACE domain name
Encode a given UTF-8 domain name
Use this method to get the last error ocurred
Sets a new option value. Available options and values:
[encoding - Use either UTF-8, UCS4 as array or UCS4 as string as input ('utf8' for UTF-8, 'ucs4_string' and 'ucs4_array' respectively for UCS4); The output is always UTF-8] [overlong - Unicode does not allow unnecessarily long encodings of chars, to allow this, set this parameter to true, else to false; default is false.] [strict - true: strict mode, good for registration purposes - Causes errors on failures; false: loose mode, ideal for "wildlife" applications by silently ignoring errors and returning the original input instead
Documentation generated on Tue, 19 Nov 2013 15:05:13 +0100 by phpDocumentor 1.4.3