1
我正在和德語Umlauten like aöü
。send_long_data charset failur
這個carset在php和數據庫上設置爲utf8_general。插入藏漢作爲選擇工作正常,只有當數據通過
$stmt->send_long_data(1,$entry->text);
這些德語字符結束了在數據庫中插入ü
。 如果它們沒有被send_long_data插入,它們會被正確存儲。 我也試過與其他列以及。
它總是一樣的: Normal Insert - >Umlaute存儲爲äöü。 使用send_long_data - >存儲爲ü等等。
我已經衝過UTF-8 all the way through,但我找不到答案。
$ret ="";
$null= NULL;
$entry->a_date=convert_date($entry->a_date);
$conn=get_sql_connection();
$stmt = $conn->prepare("SELECT create_entry (?,?,?,?,?)");;
$stmt->bind_param("sbisi",$entry->head,$null,$entry->area,$entry->a_date,$entry->showdate);
$stmt->send_long_data(1,$entry->text);
$stmt->execute();
$stmt->bind_result($col);
$stmt->fetch();
$ret = $col;
finish($stmt);
return $ret;