Edgewall Software

Ticket #3857 (closed defect: worksforme)

Opened 2 years ago

Last modified 19 months ago

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

follow-up: ↓ 3   Changed 20 months ago by thatch

  • severity changed from normal to major

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

  Changed 20 months ago by thatch

  • keywords mysql unicode added

in reply to: ↑ 1   Changed 20 months 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.

follow-up: ↓ 5   Changed 20 months 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?

in reply to: ↑ 4   Changed 19 months 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.

Add/Change #3857 (Encoding problem with mysql)

Author



Change Properties
<Author field>
Action
as closed
Next status will be 'reopened'
 
Note: See TracTickets for help on using tickets.