eZPublish  4.4
eZMySQLCharset Class Reference

Static Public Member Functions

static mapFrom ($charset)
 Maps a MySQL charset to an internal one. More...
 
static mapTo ($charset)
 Maps an internal charset to one understood by MySQL. More...
 

Static Protected Attributes

static $mapping
 
static $reverseMapping
 

Member Function Documentation

static eZMySQLCharset::mapFrom (   $charset)
static

Maps a MySQL charset to an internal one.

If the charset is unknown, it will be returned as is.

Parameters
string$charsetCharset to map.
Returns
string The converted charset.
Since
4.4

Referenced by eZMySQLiDB\checkCharsetPriv(), and eZMySQLDB\checkCharsetPriv().

static eZMySQLCharset::mapTo (   $charset)
static

Maps an internal charset to one understood by MySQL.

If the charset is unknown, it will be returned as is.

Parameters
string$charsetCharset to map.
Returns
string The converted charset.
Since
4.4

Referenced by eZDFSFileHandlerMySQLBackend\_connect(), eZDFSFileHandlerMySQLiBackend\_connect(), eZDBFileHandlerMysqlBackend\_connect(), eZDBFileHandlerMysqliBackend\_connect(), eZMySQLDB\connect(), and eZMySQLiDB\connect().

Member Data Documentation

eZMySQLCharset::$mapping
staticprotected
Initial value:
= array(
'iso-8859-1' => 'latin1',
'iso-8859-2' => 'latin2',
'iso-8859-8' => 'hebrew',
'iso-8859-7' => 'greek',
'iso-8859-9' => 'latin5',
'iso-8859-13' => 'latin7',
'windows-1250' => 'cp1250',
'windows-1251' => 'cp1251',
'windows-1256' => 'cp1256',
'windows-1257' => 'cp1257',
'utf-8' => 'utf8',
'koi8-r' => 'koi8r',
'koi8-u' => 'koi8u'
)
eZMySQLCharset::$reverseMapping
staticprotected
Initial value:
= array(
'latin1' => 'iso-8859-1',
'latin2' => 'iso-8859-2',
'hebrew' => 'iso-8859-8',
'greek' => 'iso-8859-7',
'latin5' => 'iso-8859-9',
'latin7' => 'iso-8859-13',
'cp1250' => 'windows-1250',
'cp1251' => 'windows-1251',
'cp1256' => 'windows-1256',
'cp1257' => 'windows-1257',
'utf8' => 'utf-8',
'koi8r' => 'koi8-r',
'koi8u' => 'koi8-u'
)

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