idna_convert
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:
- www.nörgler.com
- xn--nrgler-wxa
- xn--brse-5qa.xn--knrz-1ra.info
ACE input and output is always expected to be ASCII.
Located in /simplepie/idn/idna_convert.class.php (line 61)
idna_convert
Class | Description |
---|---|
Net_IDNA_php4 | Adapter class for aligning the API of idna_convert with that of |
Decode a given ACE domain name
- string $input: Domain name (ACE string) [@param string Desired output encoding, see set_parameter]
- $one_time_encoding
Encode a given UTF-8 domain name
- string $decoded: Domain name (UTF-8 or UCS-4) [@param string Desired input encoding, see set_parameter]
- $one_time_encoding
Use this method to get the last error ocurred
- void 0
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
- mixed $option: Parameter to set (string: single parameter; array of Parameter => Value pairs)
- string $value: Value to use (if parameter 1 is a string)
Documentation generated on Mon, 05 Mar 2007 21:07:31 +0000 by phpDocumentor 1.3.1