File/ext/utf8/utils/unicode.php

Description
Functions
utf8_from_unicode (line 205)

Takes an array of ints representing the Unicode characters and returns a UTF-8 string. Astral planes are supported ie. the ints in the input can be > 0xFFFF. Occurrances of the BOM are ignored. Surrogates are not allowed.

Returns false if the input array contains ints that represent surrogates or are outside the Unicode range and raises a PHP error at level E_USER_WARNING Note: this function has been modified slightly in this library to use output buffering to concatenate the UTF-8 string (faster) as well as reference the array by it's keys

mixed utf8_from_unicode (array $arr)
  • array $arr: of unicode code points representing a string
utf8_to_unicode (line 37)

Takes an UTF-8 string and returns an array of ints representing the Unicode characters. Astral planes are supported ie. the ints in the output can be > 0xFFFF. Occurrances of the BOM are ignored. Surrogates are not allowed.

Returns false if the input string isn't a valid UTF-8 octet sequence and raises a PHP error at level E_USER_WARNING Note: this function has been modified slightly in this library to trigger errors on encountering bad bytes

mixed utf8_to_unicode (string $str)
  • string $str: UTF-8 encoded string

Documentation generated on Thu, 08 Jan 2009 17:48:59 +0100 by phpDocumentor 1.4.0a2