EncodingUtil Class Reference

Detailed Description

EncodingUtil provides helper functions for working with different encodings mainly UTF-8.

Author
ingo herwig ingo@.nosp@m.wemo.nosp@m.ve.co.nosp@m.m

Definition at line 19 of file EncodingUtil.php.

Static Public Member Functions

static isUtf8 ($string)
 
static convertCp1252Utf8ToIso ($string)
 
static convertIsoToCp1252Utf8 ($string)
 
static utf8EncodeMix ($input, $encodeKeys=false)
 

Member Function Documentation

static isUtf8 (   $string)
static

Returns true if the given string is valid UTF-8 and false otherwise.

Parameters
$stringThe string to be tested code from: http://us2.php.net/mb_detect_encoding

Definition at line 64 of file EncodingUtil.php.

static convertCp1252Utf8ToIso (   $string)
static

Decodes mixed CP1252 UTF-8 strings to ISO.

Parameters
$stringThe string to be decode code from: http://www.php.net/manual/en/function.utf8-decode.php#47146

Definition at line 78 of file EncodingUtil.php.

static convertIsoToCp1252Utf8 (   $string)
static

Encodes ISO strings to mixed CP1252 UTF-8.

Parameters
$stringThe string to be encode code from: http://www.php.net/manual/en/function.utf8-decode.php#47146

Definition at line 87 of file EncodingUtil.php.

static utf8EncodeMix (   $input,
  $encodeKeys = false 
)
static

Encodes an ISO-8859-1 mixed variable to UTF-8 (PHP 4, PHP 5 compat)

Parameters
$inputAn array, associative or simple
$encodeKeysoptional
Returns
utf-8 encoded input code from: http://de3.php.net/utf8_encode

Definition at line 98 of file EncodingUtil.php.