Edgewall Software

Ticket #1556 (closed defect: worksforme)

Opened 4 years ago

Last modified 4 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:

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

Changed 4 years ago by anonymous

I forgot to include the link to the actual diff issue:

http://anciens.enib.fr/trac/public/changeset/6#file48

Changed 4 years ago by cmlenz

  • status changed from new to closed
  • resolution set to worksforme

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.

Changed 4 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...

Changed 4 years ago by anonymous

Default charset is actually iso-8859-15, from db_default.py [989] (0.8.1 release)
I've updated TracIni.

Add/Change #1556 (Diff fails to display utf-8 files)

Author



Change Properties
<Author field>
Action
as closed
Next status will be 'reopened'
to The owner will change from cmlenz. Next status will be 'closed'
 
Note: See TracTickets for help on using tickets.