summaryrefslogtreecommitdiff
path: root/it_dbi.class
diff options
context:
space:
mode:
authorChristian Helbling2012-04-04 09:25:06 +0000
committerChristian Helbling2012-04-04 09:25:06 +0000
commita0231e4df6f8bfa82451c05998bb349ece764610 (patch)
tree6c1d9e76e8a6388fdf7f1d2435f0da082bd7de62 /it_dbi.class
parent1336ce6ac3baacd1cecbf776cfafa81f8d025272 (diff)
parent14f1c25b43628013507da706544d5c55cb1bc461 (diff)
downloaditools-a0231e4df6f8bfa82451c05998bb349ece764610.tar.gz
itools-a0231e4df6f8bfa82451c05998bb349ece764610.tar.bz2
itools-a0231e4df6f8bfa82451c05998bb349ece764610.zip
Merged devel-utf8 back into live
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) : '';