views:

59

answers:

2

I have a mysql table. When I try to insert, I get this:

Warning: Incorrect string value: '\xAE</...' for column 'value' at row 1

mysql> show create table Configurations;
| Configurations | CREATE TABLE `Configurations` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `title` varchar(255) NOT NULL,
  `ckey` varchar(255) NOT NULL,
  `value` mediumtext,
  PRIMARY KEY (`id`),
  KEY `ckey` (`ckey`),
) ENGINE=InnoDB AUTO_INCREMENT=29 DEFAULT CHARSET=utf8 |

mysql> SHOW VARIABLES LIKE 'coll%';
+----------------------+-----------------+
| Variable_name        | Value           |
+----------------------+-----------------+
| collation_connection | utf8_general_ci |
| collation_database   | utf8_general_ci |
| collation_server     | utf8_general_ci |
+----------------------+-----------------+

I googled the hell out of the error, and it all seemed to boil down to utf8 being set as my default character set. I've been like that for a while. I'm not sure what else to do. Help?

A: 

Can you give an example of an insert statement causing the warnings?

ceteras
+1  A: 

You could try these-

  1. Check what the encoding of the string is before you enter them into your DB, which probably expects it in utf8.
  2. This guy suggests you update each of your table columns to take in utf8.
MovieYoda