Mailing List Archive

Changeset diff view and swedish characters
Hi,

I'm having some trouble getting the changeset view to work with swedish
characters. The swedish characters and some other characters around them are
replaced by what looks like chineese.

When browsing the source the swedish characters displays just fine.

I'm using trac 0.7.1.pre, python 2.3, subversion 1.0.3, apache 2.0.49 on
windows xp pro. Not sure which diffprogram is used, but I have gnuwin32 diff
installed so I'm guessing that's what is used.

I'm guessing something is not quite right in my setup, anyone have any ideas
on where I should start looking?

/Johan
Changeset diff view and swedish characters [ In reply to ]
Johan Appelgren wrote:

> Hi,
>
> I'm having some trouble getting the changeset view to work with swedish
> characters. The swedish characters and some other characters around them are
> replaced by what looks like chineese.
>
> When browsing the source the swedish characters displays just fine.
>
> I'm using trac 0.7.1.pre, python 2.3, subversion 1.0.3, apache 2.0.49 on
> windows xp pro. Not sure which diffprogram is used, but I have gnuwin32 diff
> installed so I'm guessing that's what is used.
>
> I'm guessing something is not quite right in my setup, anyone have any ideas
> on where I should start looking?

Hi,

I think the problem is that the Swedish characters in your files are
encoded using latin1 (iso-8859-1) and not utf-8 that Trac uses internally.
The changeset module probably need to do the same trick as the file
browser module does. It assumes that a file uses latin1 if it isn't in
utf-8.
Because detecting encoding is hard/impossible the best we can do is to
convert the text from one user specified encoding (in trac.ini) to utf-8
before sending the data to the browser.
This will only work if all your files uses either utf-8 or encoding x.

I created ticket #450 about this issue.

/ Jonas
--
Jonas Borgstr?m | Edgewall Software
jonas@edgewall.com | Professional GNU/Linux & Open Source Consulting.
| http://www.edgewall.com/