‪TYPO3CMS  9.5
Mso\IdnaConvert\EncodingHelper Class Reference

Static Public Member Functions

static string false toUtf8 ($string='', $encoding='iso-8859-1', $safe_mode=false)
 
static string false fromUtf8 ($string='', $encoding='iso-8859-1', $safe_mode=false)
 

Static Protected Member Functions

static string map_w1252_iso8859_1 ($string='')
 
static string map_iso8859_1_w1252 ($string='')
 

Detailed Description

Definition at line 10 of file EncodingHelper.php.

Member Function Documentation

◆ fromUtf8()

static string false Mso\IdnaConvert\EncodingHelper::fromUtf8 (   $string = '',
  $encoding = 'iso-8859-1',
  $safe_mode = false 
)
static

Convert a string from UTF-8 to any of various encodings

Parameters
string$string‪String to decode [
string$encoding‪Encoding; Default: ISO-8859-1] [
bool$safe_mode‪Safe Mode: if set to TRUE, the original string is retunred on errors]
Returns
‪string|false The decoded string or false on failure
Since
0.0.1

Definition at line 68 of file EncodingHelper.php.

References Mso\IdnaConvert\EncodingHelper\map_iso8859_1_w1252().

◆ map_iso8859_1_w1252()

static string Mso\IdnaConvert\EncodingHelper::map_iso8859_1_w1252 (   $string = '')
staticprotected

Special treatment for our guys in Redmond Windows-1252 is basically ISO-8859-1 – with some exceptions, which get accounted for here

Parameters
string$string‪Your input in ISO-8859-1
Returns
‪string The resulting Win1252 string
Since
0.0.1

Definition at line 149 of file EncodingHelper.php.

Referenced by Mso\IdnaConvert\EncodingHelper\fromUtf8().

◆ map_w1252_iso8859_1()

static string Mso\IdnaConvert\EncodingHelper::map_w1252_iso8859_1 (   $string = '')
staticprotected

Special treatment for our guys in Redmond Windows-1252 is basically ISO-8859-1 – with some exceptions, which get accounted for here

Parameters
string$string‪Your input in Win1252
Returns
‪string The resulting ISO-8859-1 string
Since
0.0.1

Definition at line 117 of file EncodingHelper.php.

◆ toUtf8()

static string false Mso\IdnaConvert\EncodingHelper::toUtf8 (   $string = '',
  $encoding = 'iso-8859-1',
  $safe_mode = false 
)
static

Convert a string from any of various encodings to UTF-8

Parameters
string$string‪String to encode [
string$encoding‪Encoding; Default: ISO-8859-1] [
bool$safe_mode‪Safe Mode: if set to TRUE, the original string is retunred on errors]
Returns
‪string|false The encoded string or false on failure
Since
0.0.1

Definition at line 21 of file EncodingHelper.php.