Ticket #3857 (closed defect: worksforme)
Encoding problem with mysql
| Reported by: | sven.reimers@… | Owned by: | jonas |
|---|---|---|---|
| Priority: | normal | Milestone: | |
| Component: | general | Version: | devel |
| Severity: | major | Keywords: | mysql unicode |
| Cc: |
Description
The init of the environment fails with
UnicodeEncodeError: 'latin-1' codec can't encode character u'\u201c' in position 0: ordinal not in range(256)
This is caused by chars not in latin-1 encoding but in default-wiki pages. I could find that the chars causing problems are:
“”
I can not write any wiki page containg those chars as well, since the submission fails with the same error as above.
Seems there is somehow a problem with correct conversion.
Configuration MySQL 5.0, UTF8 , Python 2.4
Attachments
Change History
comment:3 in reply to: ↑ 1 Changed 4 years ago by yagiz.yasaroglu@…
Replying to thatch:
... I wonder if the database in this ticket's case wasn't utf-8 ...
I am experiencing the same problem on a Windows XP machine with MySQL 5.0. The server (and all tables in the trac schema) is utf-8.
comment:4 follow-up: ↓ 5 Changed 4 years ago by sven.reimers@…
Ok. So I tried latest trac 0.11dev from svn removed my mysqlbindings (beta-version). Using now the 1.2.1 version as indicated seems to work for me.
So what now - close this ticket?
comment:5 in reply to: ↑ 4 Changed 4 years ago by cboos
- Status changed from new to closed
- Resolution set to worksforme
Replying to sven.reimers@gmail.com:
Ok. So I tried latest trac 0.11dev from svn removed my mysqlbindings (beta-version). Using now the 1.2.1 version as indicated seems to work for me.
So what now - close this ticket?
Yes, MySqlDb with the proper charset settings (#3884) and the proper bindings should work.



#4458 was marked as a duplicate of this ticket. See it for a full traceback on 0.10.2.
Also related is comment:ticket:3884:7 which ponders whether utf-8 should be required for mysql -- I wonder if the database in this ticket's case wasn't utf-8, or old mysql bindings were used. Comment:ticket:3908:6 is related to not being able to save wiki pages with unicode.
Can any mysql experts reproduce this on trunk?