Opened 18 years ago
Closed 18 years ago
#3857 closed defect (worksforme)
Encoding problem with mysql
Reported by: | Owned by: | Jonas Borgström | |
---|---|---|---|
Priority: | normal | Milestone: | |
Component: | general | Version: | devel |
Severity: | major | Keywords: | mysql unicode |
Cc: | Branch: | ||
Release Notes: | |||
API Changes: | |||
Internal Changes: |
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 (0)
Change History (5)
follow-up: 3 comment:1 by , 18 years ago
Severity: | normal → major |
---|
comment:2 by , 18 years ago
Keywords: | mysql unicode added |
---|
comment:3 by , 18 years ago
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.
follow-up: 5 comment:4 by , 18 years ago
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 by , 18 years ago
Resolution: | → worksforme |
---|---|
Status: | new → closed |
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?