Class \Prado\Util\TUtf8Converter
TUtf8Converter class.
TUtf8Converter is a simple wrapper around iconv functions to convert strings from and to UTF-8.
Class hierarchy
Author: Fabio Bas <fbio.bas@gmail.com>Since: 4.0.2
public
static
|
fromUTF8(string $string, string $to[, string|null $lang = null ]) : string
Convert UTF-8 strings to a different encoding. NB. The result
may not have been encoded if iconv fails.
|
public
static
|
parseEncodingLanguage(string &$encoding, string|null &$lang) : mixed
This parses a Character Set Encoding for an appended/embedded language.
eg "ASCII" can also be "ASCII.de" to designate German ASCII layout. In this example, at input $encoding is "ASCII.de" and on output $encoding is 'ASCII' with $lang is "de". |
public
static
|
toUTF8(string $string, string $from[, string|null $lang = null ]) : string
Convert strings to UTF-8 via iconv. NB, the result may not by UTF-8
if the conversion failed.
|
|