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/idna_convert/idna_convert.class.php (line 54)
Holds all relevant mapping tables See RFC3454 for details
Gets the length of a string in bytes even if mbstring function overloading is turned on
the constructor
Decode a given ACE domain name
Encode a given UTF-8 domain name
Removes a weakness of encode(), which cannot properly handle URIs but instead encodes their path or query components, too.
Attempts to return a concrete IDNA instance.
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
Attempts to return a concrete IDNA instance for either php4 or php5, only creating a new instance if no IDNA instance with the same parameters currently exists.
Adapt the bias according to the current code point and position
Applies the cannonical ordering of a decomposed UCS4 sequence
Do composition of a sequence of starter and non-starter
Returns the combining class of a certain wide char
Ccomposes a Hangul syllable
(see http://www.unicode.org/unicode/reports/tr15/#Hangul
Decomposes a Hangul syllable
(see http://www.unicode.org/unicode/reports/tr15/#Hangul
Do Nameprep according to RFC3491 and RFC3454
Convert UCS-4 strin into UCS-4 garray
Convert UCS-4 array into UCS-4 string
Convert UCS-4 string into UTF-8 string
See _utf8_to_ucs4() for details
This converts an UTF-8 encoded string to its UCS-4 representation By talking about UCS-4 "strings" we mean arrays of 32bit integers representing each of the "chars". This is due to PHP not being able to handle strings with bit depth different from 8. This apllies to the reverse method _ucs4_to_utf8(), too.
The following UTF-8 encodings are supported: bytes bits representation
Documentation generated on Tue, 19 Nov 2013 15:05:04 +0100 by phpDocumentor 1.4.3