Class I18N_Punycode_Unicode

Description

Class for encoding/decoding on international domainnames using Punycode; Unicode-mode

Punycode is meant to be used with Unicode-strings. This ASCII-class is just provided for convenience if you can be sure you just need to encode strings with usual ASCII-characters.

Located in /Punycode.php (line 451)

I18N_Punycode_ASCII
   |
   --I18N_Punycode_Unicode
Method Summary
 string decode (string $domainname, [string $encoding = null])
 string encode (string $domainname, [string $encoding = null])
 mixed &factory ([string $extension = 'auto'])
Methods
decode (line 829)

Decode the given string/domainname from Punycode

string decode (string $domainname, [string $encoding = null])
  • string $domainname: String/name to be decoded
  • string $encoding: Character encoding which the input/output strings use; if not set auto-detect is tried; as last resort ISO-8859-1 is used

Redefinition of:
I18N_Punycode_ASCII::decode()
Decode the given string/domainname from Punycode
encode (line 786)

Encode the given string/domainname using Punycode

As a first step "nameprep" is applied to the input-string. Then all non-basic code-points using the Punycode-algorithm.

string encode (string $domainname, [string $encoding = null])
  • string $domainname: String/name to be encoded
  • string $encoding: Character encoding which the input/output strings use; if not set auto-detect is tried; as last resort ISO-8859-1 is used

Redefinition of:
I18N_Punycode_ASCII::encode()
Encode the given string/domainname using Punycode
factory (line 478)

Create a new I18N_Punycode_Unicode object

This function exists because the I18N_Punycode_Unicode can interface with various unicode-extensions and needs to be able to return error-objects when a new object is created.

  • return: newly created I18N_Punycode_Unicode object, or a I18N_Punycode error code
  • access: public
mixed &factory ([string $extension = 'auto'])
  • string $extension: Unicode-extension to be used for character-conversions (currently only 'mbstring' supported)

Redefinition of:
I18N_Punycode_ASCII::factory()
Create a new I18N_Punycode_ASCII object

Inherited Methods

Inherited From I18N_Punycode_ASCII

 I18N_Punycode_ASCII::decode()
 I18N_Punycode_ASCII::encode()
 I18N_Punycode_ASCII::factory()

Documentation generated on Sun, 9 May 2004 19:35:30 +0200 by phpDocumentor 1.3.0RC2