Edgewall Software
Modify

Opened 17 years ago

Closed 17 years ago

#3857 closed defect (worksforme)

Encoding problem with mysql

Reported by: sven.reimers@… 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)

comment:1 by Tim Hatch, 17 years ago

Severity: normalmajor

#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?

comment:2 by Tim Hatch, 17 years ago

Keywords: mysql unicode added

in reply to:  1 comment:3 by yagiz.yasaroglu@…, 17 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.

comment:4 by sven.reimers@…, 17 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?

in reply to:  4 comment:5 by Christian Boos, 17 years ago

Resolution: worksforme
Status: newclosed

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.

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain Jonas Borgström.
The resolution will be deleted. Next status will be 'reopened'.
to The owner will be changed from Jonas Borgström to the specified user.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.