Re: [viewvc-users] character sets
"C. Michael Pilato" <[email protected]> Fri, 13 Sep 2013 09:27:36 -0400
| Newsgroups | gmane.comp.version-control.cvs.viewcvs.user |
|---|---|
| Message-ID | <[email protected]> |
On 09/13/2013 07:36 AM, Zoltan Hamar wrote:
> Dear All,
>
> we are using viewvc, here in Hungary, and there is a problem with hun
> special characters…
>
> The page starts with unicode(utf-8) and does not display the characters
> correctly. If I change the encoding manually to central
> european(ISO-8859-2) it looks just fine.
>
> Is there a way to force the page to start with iso-8859-2?
ViewVC wants to generate UTF-8 output more or less universally[1].
That's the character encoding used by its templates, and the character
set used by Subversion's revision metadata, etc. So UTF-8 really is the
best output character encoding option. Now, obviously, not every
versioned file is going to have UTF-8 contents, so where it can do so,
ViewVC will try to transcode file contents into UTF-8 for display.
ViewVC depends, however, on external Python libraries to do this
transcoding work, though.
My recommendation:
* If you aren't using at least ViewVC 1.1.19, upgrade[2].
* Install the 'chardet' Python module. On Ubuntu Linux, it's the
'python-chardet' package. Not sure what OS you're on. The project
homepage is https://pypi.python.org/pypi/chardet, though.
* Set 'detect_encoding = 1' in your viewvc.conf file.
-- Mike
[1] The "download" (or "checkout") view is the exception.
[2] You might as well upgrade to the latest, 1.1.20, but be aware of
http://viewvc.tigris.org/issues/show_bug.cgi?id=527. I'll try to
release 1.1.21 with the fix for that issue today. Thanks for the
reminder. :-)
------------------------------------------------------
http://viewvc.tigris.org/ds/viewMessage.do?dsForumId=4255&dsMessageId=3064525
To unsubscribe from this discussion, e-mail: [[email protected]].