#9510 closed (invalid)
admin console CRUD operation reject unicode charactors
Reported by: | Owned by: | nobody | |
---|---|---|---|
Component: | contrib.admin | Version: | 1.0 |
Severity: | Keywords: | admin Chinese error | |
Cc: | Triage Stage: | Unreviewed | |
Has patch: | no | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description
I test this on mysql. I create a model and a table in mysql, registered it on admin console.
I try input Chinese charactor with add function, and exceptin thrown like:
Warning at /admin/act/acttype/add/
Incorrect string value: '\xE4\xB8\xAD\xE6\x96\x87' for column 'type_name' at row 1
But the record can is created, with "?" character instead of normal input.
I'd tried to modified the characterset of the table from "latin" to "utf8", but still the same. I'd also tried "gbk" charset, no change at all.
Also the edit and delete function has the same exception throws. I think we should add a setting param to tell the program how to encode or decode the db input/output before db operations.
To show the error for you I'd uploaded the warning page in the attachment list, please have a look.
Attachments (1)
Change History (3)
by , 16 years ago
Attachment: | Warning at -admin-act-acttype-add-.rar added |
---|
comment:1 by , 16 years ago
Resolution: | → invalid |
---|---|
Status: | new → closed |
Please take this to the django-users mailing list. The problem you are having is a database configuration issue, not a Django bug. Django handles Chinese characters just fine, the error you are getting is because your database table is using a character set that has no representation for these characters. I do not believe the command you issued to change the table charset worked; if you give details of exactly what command you issued someone on django-users may be able to provide the right one to truly convert the table columns to utf8.
Error warning page when adding record with Chinese character input