Exponential Basic 2.4.0.1 Exponential Basic 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 22 of file ezutf8codec.php.

## Member Function Documentation

## ◆ characterByteLength()

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

Definition at line 213 of file ezutf8codec.php.

References $str, and utf8LengthTable().

## ◆ convertStringToUnicode()

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

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

Definition at line 27 of file ezutf8codec.php.

References $offset, $str, and 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 45 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 110 of file ezutf8codec.php.

## ◆ instance()

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

Returns a shared instance of the eZUTF8Codec class.

Returns
  eZUTF8Codec

Definition at line 240 of file ezutf8codec.php.

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

## ◆ strlen()

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

Definition at line 220 of file ezutf8codec.php.

References $i, $str, and 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 62 of file ezutf8codec.php.

Referenced by convertUnicodeToString().

## ◆ utf8LengthTable()

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

Definition at line 201 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+.