-2

I'm trying to save a string:

`Error Number: 1366</p><p>Incorrect string value: '\xCC\xC7 Ree...' for column 'ShipToName' at row 1</p><p>INSERT INTO `default_orders` (`OrderNumber`, `ShipCarrier`, `ShipService`, `ShipDate`, `ShipToName`, `ShipToAddress1`, `ShipToAddress2`, `ShipToCity`, `ShipToState`, `ShipToZip`, `ShipToCountry`, `ShipToPhone`, `SKU1`, `ProdName1`, `Qty1`, `batch_id`, `timestamp`, `client_id`, `status`) VALUES ('LIFEG-1004648', 'USPS', 'First Class Mail', '', 'Zo�� Reed', '17`

But it won't save. I'm using CodeIgniter Active record if that matters.

4

1 回答 1

2

在您的 HTML 中使用form_open('controller/function')函数,它将 添加accept-charset="utf-8"到表单中,将您的排序规则更改为utf8_bin并尝试一次。

于 2013-09-06T15:39:22.483 回答