[Trac-tickets] Re: [The Trac Project] #3182: Error when adding or viewing a ticket using MySQL

The Trac Project noreply at edgewall.com
Wed May 24 14:55:50 CDT 2006


#3182: Error when adding or viewing a ticket using MySQL
----------------------------+-----------------------------------------------
 Reporter:  spr at cs.byu.edu  |        Owner:  jonas
     Type:  defect          |       Status:  new  
 Priority:  normal          |    Milestone:       
Component:  ticket system   |      Version:  devel
 Severity:  normal          |   Resolution:       
 Keywords:                  |  
----------------------------+-----------------------------------------------
Comment (by spr at cs.byu.edu):

 After further investigation, I discovered that the error occurs due to the
 fact trac initiates the database connection with charset set to 'utf8',
 though the database has a charset of 'latin1'.

 A quick fix is to simply change line 114 in db/mysql_backend.py to
 {{{
 port=port, use_unicode=True, charset='latin1')
 }}}

 This isn't really a great fix. Instead one could change the charset after
 connecting after checking to see what charset the database is using, but
 I'm at a loss as to how I should do that.

-- 
Ticket URL: <http://projects.edgewall.com/trac/ticket/3182>
The Trac Project <http://trac.edgewall.com/>


More information about the Trac-Tickets mailing list