summaryrefslogtreecommitdiff
path: root/it_dbi.class
diff options
context:
space:
mode:
authorChristian Schneider2012-03-28 14:51:57 +0000
committerChristian Schneider2012-03-28 14:51:57 +0000
commit07c7a6f9c568fc1d1e20eb75c733ca314e36005e (patch)
tree01a6e238e384e25d8dda2dcb25eaf398d2870737 /it_dbi.class
parenta7ac24d9f9698ff0a1d42268d79f74cd21f70eb4 (diff)
downloaditools-07c7a6f9c568fc1d1e20eb75c733ca314e36005e.tar.gz
itools-07c7a6f9c568fc1d1e20eb75c733ca314e36005e.tar.bz2
itools-07c7a6f9c568fc1d1e20eb75c733ca314e36005e.zip
Added encoding check to it_dbi, improved encoding check (currently lives in it_html)
Diffstat (limited to 'it_dbi.class')
-rw-r--r--it_dbi.class4
1 files changed, 4 insertions, 0 deletions
diff --git a/it_dbi.class b/it_dbi.class
index ba0606c..ced925b 100644
--- a/it_dbi.class
+++ b/it_dbi.class
@@ -247,7 +247,11 @@ function _set($tags, $allfields = false)
if (substr($field, 0, 1) == '-') # Unquoted value (always added)
$r[] = substr($field, 1)."=$value";
else if ($allfields || ($value !== $this->_data[$field]))
+ {
+ if ($this->_p['charset'] == "utf8") # NOTE: Mysql charset is simply utf8, not utf-8
+ $value = it_html::fix_encoding($value);
$r[] = "`$field`=".(isset($value) ? $this->escape_string($value) : 'NULL');
+ }
}
return $r ? 'SET '.implode(', ', $r) : '';