Exponential 6.0.13 Exponential Enterprise Open Source CMS - PHP Class Reference

Static Public Member Functions | List of all members
eZUTF8Codec Class Reference
Internationalization

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

## Static Public Member Functions
static | convertStringToUnicode ( $str)
static | convertUnicodeToString ( $unicodeValues)
static | toUTF8 ( $char_code)
static | fromUtf8 ( $multi_char, $offs, &$len)
static | utf8LengthTable ()
static | characterByteLength ( $str, $pos)
static | strlen ( $str)
static | instance ()

## Detailed Description

Converter for utf8 and 32bit unicode.

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

Definition at line 21 of file ezutf8codec.php.

## Member Function Documentation

## ◆ characterByteLength()

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

Definition at line 212 of file ezutf8codec.php.

References utf8LengthTable().

## ◆ convertStringToUnicode()

static eZUTF8Codec::convertStringToUnicode | ( |  | $str | ) |
| static

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

Definition at line 26 of file ezutf8codec.php.

References strlen().

Referenced by eZTextCodec\convertUTF8ToUnicode().

## ◆ convertUnicodeToString()

static eZUTF8Codec::convertUnicodeToString | ( |  | $unicodeValues | ) |
| static

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

Definition at line 44 of file ezutf8codec.php.

References toUTF8().

Referenced by eZTextCodec\convertUnicodeToUTF8().

## ◆ fromUtf8()

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.

Definition at line 109 of file ezutf8codec.php.

## ◆ instance()

static eZUTF8Codec::instance | ( |  | ) |
| static

Returns a shared instance of the eZUTF8Codec class.

Returns
  eZUTF8Codec

Definition at line 239 of file ezutf8codec.php.

Referenced by eZCodePage\convertString(), eZAlphabetOperator\fetchAlphabet(), eZCodePageCodec\fromUnicode(), eZCodePage\load(), eZCodePage\strlenFromUTF8(), and eZTextCodec\strlenUTF8().

## ◆ strlen()

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

Definition at line 219 of file ezutf8codec.php.

References utf8LengthTable().

Referenced by convertStringToUnicode().

## ◆ toUTF8()

static eZUTF8Codec::toUTF8 | ( |  | $char_code | ) |
| static

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

Definition at line 61 of file ezutf8codec.php.

Referenced by convertUnicodeToString().

## ◆ utf8LengthTable()

static eZUTF8Codec::utf8LengthTable | ( |  | ) |
| static

Definition at line 200 of file ezutf8codec.php.

Referenced by characterByteLength(), and strlen().

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

- ezutf8codec.php

Copyright © 1998 – 2026 7x. All rights reserved. Licensed under the GNU GPLv2+.