#10994 closed (invalid)
Flat page content with unicode causes fatal error but data is still commited
Reported by: | Owned by: | nobody | |
---|---|---|---|
Component: | contrib.admin | Version: | 1.0 |
Severity: | Keywords: | uniode mysql flatpages | |
Cc: | Triage Stage: | Unreviewed | |
Has patch: | no | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description
Hi ,
I'm creating a flatpage through the admin ui and when I add the content I get a
Warning Incorrect string value
However data does get added to the database which I can see through phpmyadmin.
Maybe better unicode escaping can be done if this is not a MYSQL error. Also data shouldn't get added to the DB if an error is thrown.
Thanks,
Alp
Change History (2)
comment:1 by , 16 years ago
Resolution: | → invalid |
---|---|
Status: | new → closed |
comment:2 by , 16 years ago
Summary: | Flay page content with unicode causes fatal error but data is still commited → Flat page content with unicode causes fatal error but data is still commited |
---|
Note:
See TracTickets
for help on using tickets.
It sounds like the character set for your table is the MySQL default latin1. When you try to store some Unicode value that cannot be represented in latin1 you will get "incorrect string value" from MySQL, because there simply is no way to represent some Unicode data in latin1. There is no bug with Django here, the problem is your database. The fix is to convert your table to use utf8 as the character set. Here's the MySQL doc for how to do that: http://dev.mysql.com/doc/refman/5.1/en/alter-table.html. Specifically, see the "CONVERT TO CHARACTER SET" part.