diff options
author | Christian Weber | 2012-03-22 15:17:58 +0000 |
---|---|---|
committer | Christian Weber | 2012-03-22 15:17:58 +0000 |
commit | 4c4deb5825137578cdbf512105ef918af754cbc0 (patch) | |
tree | 389af754aa30f0676872b655de0ba0abc5e4ce30 | |
parent | 2292c7500b2c9b5d3fba77babcdafb34cb0bd241 (diff) | |
download | itools-4c4deb5825137578cdbf512105ef918af754cbc0.tar.gz itools-4c4deb5825137578cdbf512105ef918af754cbc0.tar.bz2 itools-4c4deb5825137578cdbf512105ef918af754cbc0.zip |
set default charset to php's default_charset if set
-rw-r--r-- | it_dbi.class | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/it_dbi.class b/it_dbi.class index 1303323..c85e2ed 100644 --- a/it_dbi.class +++ b/it_dbi.class @@ -33,7 +33,7 @@ class it_dbi 'pw' => "", 'safety' => 1, # 0= never die, 1=die if query invalid, 2=die also if no results #'keyfield' => 'ID', # Don't set to null here, filled later by _get_field_info() - 'charset' => null, # client charset (requires MySQL 5.0.7 or later) + #'charset' => # client charset (requires MySQL 5.0.7 or later) 'classprefix' => "", 'getfieldinfo' => true, # do not read schema. only select() allowed 'localized_defaultlanguage' => "de", # Localize fields with this suffix, e.g. copy title_de to title on read @@ -65,7 +65,7 @@ function it_dbi($p = array(), $query = null) $p += $dp; # Combine our settings with user's defaults and class defaults - $p += (array)$GLOBALS['it_dbi_defaultconfig'] + array('db' => $GLOBALS['ULTRADB']) + $this->_defaultconfig; + $p += (array)$GLOBALS['it_dbi_defaultconfig'] + array('db' => $GLOBALS['ULTRADB']) + $this->_defaultconfig + array('charset' => strtr(strtolower(ini_get('default_charset')), array('utf-8' => 'utf8'))); unset($this->_defaultconfig); # to shorten ED() output $this->_p = $p; |