eZPublish  4.7
eZUTF8Codec Class Reference

Converter for utf8 and 32bit unicode. More...

Public Member Functions

 eZUTF8Codec ()
 

Static Public Member Functions

static characterByteLength ($str, $pos)
 
static convertStringToUnicode ($str)
 
static convertUnicodeToString ($unicodeValues)
 
static fromUtf8 ($multi_char, $offs, &$len)
 
static instance ()
 Returns a shared instance of the eZUTF8Codec class. More...
 
static strlen ($str)
 
static toUTF8 ($char_code)
 
static utf8LengthTable ()
 

Detailed Description

Converter for utf8 and 32bit unicode.

Allows for conversion from utf8 charactes and to 32bit unicode values, and vice versa.

Member Function Documentation

static eZUTF8Codec::characterByteLength (   $str,
  $pos 
)
static
static eZUTF8Codec::convertStringToUnicode (   $str)
static

Converts an UTF8 string into Unicode values and returns an array with the values.

Referenced by eZTextCodec\convertUTF8ToUnicode().

static eZUTF8Codec::convertUnicodeToString (   $unicodeValues)
static

Converts an array with Unicode values into an UTF8 string and returns it.

Referenced by eZTextCodec\convertUnicodeToUTF8().

eZUTF8Codec::eZUTF8Codec ( )

Initializes utf8 codec.

Referenced by instance().

static eZUTF8Codec::fromUtf8 (   $multi_char,
  $offs,
$len 
)
static

Converts the first utf8 char in the string $multi_char to a 32 bit integer. $offs is the offset in the string. $len will contain the length of utf8 char in the string which can be used to find the next char.

static eZUTF8Codec::instance ( )
static
static eZUTF8Codec::strlen (   $str)
static

Referenced by convertStringToUnicode().

static eZUTF8Codec::toUTF8 (   $char_code)
static

Converts the 32 bit integer $char_code to a utf8 string representing the Unicode character.

Referenced by convertUnicodeToString().

static eZUTF8Codec::utf8LengthTable ( )
static

Referenced by characterByteLength(), and strlen().


The documentation for this class was generated from the following file: