Edgewall Software
Modify

Opened 15 years ago

Closed 15 years ago

Last modified 6 months ago

#9285 closed defect (invalid)

Genshi UnicodeDecodeError while rendering template revisionlog.html for cyrillic revision author name

Reported by: aprudnikov Owned by:
Priority: normal Milestone:
Component: version control/log view Version: 0.12dev
Severity: normal Keywords:
Cc: al.prudnikov@… Branch:
Release Notes:
API Changes:
Internal Changes:

Description

Error occurred when view revision log.

Genshi UnicodeDecodeError error while rendering template 'D:\python26\lib\site-packages\trac\versioncontrol\templates\revisionlog.html', line 152, char -1

This line is

<td class="author" py:content="authorinfo_short(change.author)" />

And in my SVN repository change.author is cyrillic name Александр. Trac uses MySQL database.

System Information

OS Windows 7 x64
Python 2.6.5 (r265:79096, Mar 19 2010, 21:48:26) [MSC v.1500 32 bit (Intel)]
Trac 0.12b1
Babel 0.9.5
Genshi 0.6
Subversion 1.6.6 (r40053)
MySQL server : "5.1.46-community", client: "5.1.33", thread-safe: 1
MySQLdb 1.2.3c1
Mercurial 1.5.1
mod_wsgi 3.0 (WSGIProcessGroup WSGIApplicationGroup %{GLOBAL})

Attachments (0)

Change History (5)

comment:1 by aprudnikov, 15 years ago

Cc: al.prudnikov@… added

comment:2 by Remy Blank, 15 years ago

I cannot reproduce the issue here with SQLite, maybe this is MySQL-specific. Can you confirm that your database is configured with the utf8 character set and and the utf8_bin collation type?

in reply to:  2 comment:3 by aprudnikov, 15 years ago

Replying to rblank:

Can you confirm that your database is configured with the utf8 character set and and the utf8_bin collation type?

Yes.

mysql> show create table revision;
...

CREATE TABLE `revision` (
  `repos` int(11) NOT NULL DEFAULT '0',
  `rev` text COLLATE utf8_bin NOT NULL,
  `time` bigint(20) DEFAULT NULL,
  `author` text COLLATE utf8_bin,
  `message` text COLLATE utf8_bin,
  PRIMARY KEY (`repos`,`rev`(20)),
  KEY `revision_repos_time_idx` (`repos`,`time`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin
Last edited 15 years ago by aprudnikov (previous) (diff)

comment:4 by aprudnikov, 15 years ago

Resolution: invalid
Status: newclosed

I run again resync and the error disappeared.

comment:5 by Remy Blank, 15 years ago

Milestone: 0.12

Thanks for he update.

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The ticket will remain with no owner.
The resolution will be deleted. Next status will be 'reopened'.
to The owner will be changed from (none) 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.