RE: [viewvc-users] character sets

Zoltan Hamar <[email protected]> Fri, 13 Sep 2013 15:59:40 +0200
Newsgroups gmane.comp.version-control.cvs.viewcvs.user
Message-ID <009901ceb089$7e7b21d0$7b716570$__27467.9957925857$1379080793$gmane$org@gmail.com>
Thanks,

we are running 1.1.15 on windows server.  The 'detect_encoding = 1' was
already set int he config file, so I will try to upgrade and have the
'python-chardet' package!

Many thanks for you help, have a nice week-end!

Zoltan

-----Eredeti üzenet-----
Feladó: C. Michael Pilato [mailto:[email protected]] 
Küldve: 2013. szeptember 13. 15:28
Címzett: Zoltan Hamar
Másolatot kap: [email protected]
Tárgy: Re: [viewvc-users] character sets

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=3064534

To unsubscribe from this discussion, e-mail: [[email protected]].