Ticket #1556 (closed defect: worksforme)
Opened 7 years ago
Last modified 7 years ago
Diff fails to display utf-8 files
| Reported by: | eblot | Owned by: | cmlenz |
|---|---|---|---|
| Priority: | normal | Milestone: | |
| Component: | version control/changeset view | Version: | devel |
| Severity: | normal | Keywords: | |
| Cc: | |||
| Release Notes: | |||
| API Changes: | |||
Description
It seems that the diff attempts to encode in utf8 files that are already encoded in utf8, which leads to weird output.
This change may have been introduced in [1660]
As an example, see
browser.cs browser.cs from the french translation of Trac.
Attachments
Change History
comment:1 Changed 7 years ago by anonymous
comment:2 Changed 7 years ago by cmlenz
- Resolution set to worksforme
- Status changed from new to closed
This is due to the default_charset config option, which is set to ISO Latin 1 encoding by default.
Setting it to UTF-8 should fix it for you, if all the files in your repository use UTF-8. If the repository has mixed encodings, you'll need to set the charset in the snv:mime-type property of those files that are the expection to the rule.
comment:3 Changed 7 years ago by eblot
Sorry, I did not know about this flag.
Does the default value has recently changed ?
The documentation in TracIni#trac reports UTF-8 as the default encoding.
Anyway, I've changed the default_charset to "utf-8" and restart the Apache2 server, but the problem still shows up. Weird. I also tried "utf8" and it does not change the way the diff is displayed...



I forgot to include the link to the actual diff issue:
http://anciens.enib.fr/trac/public/changeset/6#file48