Edgewall Software

Opened 20 years ago

Closed 20 years ago

Last modified 18 years ago

#513 closed defect (fixed)

broken national characters while viewing the changeset

Reported by: tiger@… Owned by: Jonas Borgström
Priority: highest Milestone: 0.8
Component: version control/changeset view Version: devel
Severity: critical Keywords:
Cc: tiger@… Branch:
Release Notes:
API Changes:
Internal Changes:


We're running subversion repository server on linux (system's LANG=ru_RU.KOI8-R), while clients are on windows (codepage windows-1251). Almost all sources in the repository contains characters in windows-1251 codepage. Trac's repository browser shows sources in UTF-8 where national chars are broken (e.g. - unreadable)… Seems it assumes that if the server's LANG is KOI8-R then sources are also KOI8-R and converts sources to UTF-8 from KOI8-R. This is wrong. Is there a hack exists to tell Trac the encoding of the sources to be converted to UTF-8 from?

Attachments (0)

Change History (6)

comment:1 by daniel, 20 years ago

Milestone: 0.8
Priority: normalhighest
Severity: normalcritical

comment:2 by daniel+trac@…, 20 years ago

My guess is that Trac should honour the svn:mime-type property and its charset parameter, which is how Subversion keeps track of charsets. Eg.:

svn propset svn:mime-type 'text/plain; charset=iso-8859-1' README

or in the above case,

svn propset svn:mime-type 'text/plain; charset=windows-1251' whatever

Trac should probably convert from that given charset to UTF-8 before displaying it to the browser. Currently, Trac seems to completely ignore the charset specified there, and always assume UTF-8.

comment:3 by Jonas Borgström, 20 years ago

Status: newassigned

Trac currently assumes the charset is utf-8 if it isn't iso-8859-1. Honoring charsets specified in the mime-type property is probably the way to go.

comment:4 by Jonas Borgström, 20 years ago

Resolution: fixed
Status: assignedclosed

Fixed in [801]. The new "default_charset" trac.ini option can be used to specify default charset, see TracIni.

comment:5 by tiger@…, 20 years ago

Cc: tiger@… added
Component: browserchangeset view
Resolution: fixed
Status: closedreopened
Summary: broken national characters while viewing the sourcesbroken national characters while viewing the changeset
Version: 0.7.1devel

Changeset [801] closes the problem in the browser, but the same problem happily exists in the changeset viewer.

comment:6 by Jonas Borgström, 20 years ago

Resolution: fixed
Status: reopenedclosed

Changeset.py now uses the same charset guessing behavoir as File.py.

Modify Ticket

Change Properties
Set your email in Preferences
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.