Punycode

Punycode implementation as described in RFC 3492
Methods Summary
public
# __construct( string $encoding = 'UTF-8' )
Constructor
public
# encode( string $input )
Encode a domain to its Punycode version
protected
# encodePart( string $input )
Encode a part of a domain name, such as tld, to its Punycode version
public
# decode( string $input )
Decode a Punycode domain name to its Unicode counterpart
protected
# decodePart( string $input )
Decode a part of domain name, such as tld
protected
# calculateThreshold( int $k , int $bias )
Calculate the bias threshold to fall between TMIN and TMAX
protected
# adapt( int $delta , int $numPoints , bool $firstTime )
Bias adaptation
protected
# listCodePoints( string $input )
List code points for a given input
protected
# charToCodePoint( string $char )
Convert a single or multi-byte character to its code point
protected
# codePointToChar( int $code )
Convert a code point to its single or multi-byte character
Constants Summary
public int BASE
Bootstring parameter values
# 36
public int TMIN
# 1
public int TMAX
# 26
public int SKEW
# 38
public int DAMP
# 700
public int INITIAL_BIAS
# 72
public int INITIAL_N
# 128
public string PREFIX
# 'xn--'
public string DELIMITER
# '-'
Properties Summary
protected static $encodeTable
# array ( 0 => 'a', 1 => 'b', 2 => 'c', 3 => 'd', 4 => 'e', 5 => 'f', 6 => 'g', 7 => 'h', 8 => 'i', 9 => 'j', 10 => 'k', 11 => 'l', 12 => 'm', 13 => 'n', 14 => 'o', 15 => 'p', 16 => 'q', 17 => 'r', 18 => 's', 19 => 't', 20 => 'u', 21 => 'v', 22 => 'w', 23 => 'x', 24 => 'y', 25 => 'z', 26 => '0', 27 => '1', 28 => '2', 29 => '3', 30 => '4', 31 => '5', 32 => '6', 33 => '7', 34 => '8', 35 => '9', )
protected static $decodeTable
# array ( 'a' => 0, 'b' => 1, 'c' => 2, 'd' => 3, 'e' => 4, 'f' => 5, 'g' => 6, 'h' => 7, 'i' => 8, 'j' => 9, 'k' => 10, 'l' => 11, 'm' => 12, 'n' => 13, 'o' => 14, 'p' => 15, 'q' => 16, 'r' => 17, 's' => 18, 't' => 19, 'u' => 20, 'v' => 21, 'w' => 22, 'x' => 23, 'y' => 24, 'z' => 25, 0 => 26, 1 => 27, 2 => 28, 3 => 29, 4 => 30, 5 => 31, 6 => 32, 7 => 33, 8 => 34, 9 => 35, )
protected $encoding
# NULL