Ticket #513 (closed defect: fixed)
Opened 8 years ago
Last modified 6 years ago
broken national characters while viewing the changeset
| Reported by: | tiger@… | Owned by: | jonas |
|---|---|---|---|
| Priority: | highest | Milestone: | 0.8 |
| Component: | version control/changeset view | Version: | devel |
| Severity: | critical | Keywords: | |
| Cc: | tiger@… | ||
| Release Notes: | |||
| API Changes: | |||
Description
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
Change History
comment:1 Changed 8 years ago by daniel
- Milestone set to 0.8
- Priority changed from normal to highest
- Severity changed from normal to critical
comment:2 Changed 8 years ago by daniel+trac@…
comment:3 Changed 8 years ago by jonas
- Status changed from new to assigned
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 Changed 8 years ago by jonas
- Resolution set to fixed
- Status changed from assigned to closed
comment:5 Changed 8 years ago by tiger@…
- Cc tiger@… added
- Component changed from browser to changeset view
- Resolution fixed deleted
- Status changed from closed to reopened
- Summary changed from broken national characters while viewing the sources to broken national characters while viewing the changeset
- Version changed from 0.7.1 to devel
Changeset [801] closes the problem in the browser, but the same problem happily exists in the changeset viewer.
comment:6 Changed 8 years ago by jonas
- Resolution set to fixed
- Status changed from reopened to closed
Changeset.py now uses the same charset guessing behavoir as File.py.



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.:
or in the above case,
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.