block unicode migration bugs

This commit is contained in:
toyomoyo
2006-04-18 06:17:30 +00:00
parent d553ae9f74
commit 98ae4e63da
3 changed files with 69 additions and 6 deletions
+4 -2
View File
@@ -794,10 +794,12 @@ function log_the_problem_somewhere() { //Eloy: Nice function, perhaps we could
}
//only this function should be used during db migraton, because of addslashes at the end of the convertion
function utfconvert($string, $enc) {
function utfconvert($string, $enc, $slash=true) {
global $textlib;
if ($result = $textlib->convert($string, $enc)) {
$result = addslashes($result);
if ($slash) {
$result = addslashes($result);
}
}
return $result;
}