wCMF  3.6
 All Classes Namespaces Files Functions Variables Groups Pages
EncodingUtil Class Reference

Static Public Member Functions

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

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 67 of file class.EncodingUtil.php.

Member Function Documentation

static EncodingUtil::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 74 of file class.EncodingUtil.php.

Referenced by HierarchicalFormat\processValues(), and utf8EncodeMix().

static EncodingUtil::convertCp1252Utf8ToIso (   $str)
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 86 of file class.EncodingUtil.php.

References $CP1252Map.

Referenced by HierarchicalFormat\processValues().

static EncodingUtil::convertIsoToCp1252Utf8 (   $str)
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 96 of file class.EncodingUtil.php.

References $CP1252Map.

static EncodingUtil::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 108 of file class.EncodingUtil.php.

References $CP1252Map, and isUtf8().

Referenced by gPrintJSONResult().

+ Here is the call graph for this function:


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