Actions
Evolution #691
closedPrevent bug related to strange utf8 content
Start date:
05/05/2017
Due date:
% Done:
100%
Estimated time:
4.00 h
Resolution:
Description
Here a sample of content :
Echec de la requête SQL<br />[<em> error n° 1366 : Incorrect string value: '\xF0\x9F\x8C\x9E, ...' for column 'workcom_body' at row 1</em> ]<br /> SQL query : INSERT INTO l21_workshop_com (workcom_subject, workcom_body, workcom_parent, workcom_user_id, workcom_workshop_id, workcom_statut, workcom_date_crea, workcom_last_modify ) VALUES('Enercoop', '<p>à tout hasard, pour ceux qui ne connaissent pas :</p>\r\n\r\n<p><a href=\"http://www.enercoop.fr\">http://www.enercoop.fr</a></p>\r\n\r\n<p>et leur dernière lettre d\'infos</p>\r\n\r\n<p><a href=\"https://trailer.web-view.net/Show/0XD29525F88F47940C1F0E9A896CE243058C9E31BC40C1040B5D8CC2141CCB347E16F95EB13E48CCAB.htm\">https://trailer.web-view.net/Show/0XD29525F88F47940C1F0E9A896CE243058C9E31BC40C1040B5D8CC2141CCB347E16F95EB13E48CCAB.htm</a></p>\r\n\r\n<p>🌞, Michel</p>\r\n', 0, 35, 7, 'P', NOW(), NOW());<br /> [Fri 05/May/17 17:35:49]<bFri, 05 May 2017 17:35:49 +0200 /> running script :/public/index.php?post-title=Enercoop&post-body=<p>à tout hasard, pour ceux qui ne connaissent pas :</p> <p><a href="http://www.enercoop.fr">http://www.enercoop.fr</a></p> <p>et leur dernière lettre d'infos</p> <p><a href="https://trailer.web-view.net/Show/0XD29525F88F47940C1F0E9A896CE243058C9E31BC40C1040B5D8CC2141CCB347E16F95EB13E48CCAB.htm">https://trailer.web-view.net/Show/0XD29525F88F47940C1F0E9A896CE243058C9E31BC40C1040B5D8CC2141CCB347E16F95EB13E48CCAB.htm</a></p>
Updated by Simon over 7 years ago
Updated by Simon over 7 years ago
Pour un full support de mysql : https://dev.mysql.com/doc/refman/5.5/en/charset-unicode-utf8mb4.html
Article de référence : https://mathiasbynens.be/notes/mysql-utf8mb4#character-sets
A partir de mysql 5.5 (2010)
Il peut y avoir à l'avenir des problèmes avec les indexes. Voir :
The same goes for index keys. The InnoDB storage engine has a maximum index length of 767 bytes, so for utf8 or utf8mb4 columns, you can index a maximum of 255 or 191 characters, respectively. If you currently have utf8 columns with indexes longer than 191 characters, you will need to index a smaller number of characters when using utf8mb4. (Because of this, I had to change some indexed VARCHAR(255) columns to VARCHAR(191).)
source : https://mathiasbynens.be/notes/mysql-utf8mb4#character-sets
Le fixe ne convertit pas les tables existantes. Il créer les nouvelles BDD dans ce format.
Updated by Simon over 7 years ago
- Status changed from Nouveau to Fermé
- % Done changed from 0 to 100
Applied in changeset linea21|r3153.
Actions