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 |
---|---|
Net_IDNA_php4 | Adapter class for aligning the API of idna_convert with that of Net_IDNA |
Holds all relevant mapping tables, loaded from a seperate file on construct See RFC3454 for details
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
Adapt the bias according to the current code point and position
Apllies the cannonical ordering of a decomposed UCS4 sequence
Do composition of a sequence of starter and non-starter
The actual decoding algorithm
Decode a certain digit
The actual encoding algorithm
Encoding a certain digit
Internal error handling method
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 Mon, 25 Jun 2012 13:55:39 -0500 by phpDocumentor 1.4.4