Mercurial > hg
view templates/filelog.tmpl @ 7120:db7557359636
highlight: convert text to local before passing to pygmentize (issue1341)
Example case:
Display file written in iso-8859-1 with current HGENCODING utf-8.
At the moment only an Error page appears because pygmentize
chokes on the replacement chars.
Alternatives:
1) Turn off highlighting and avoid UnicodeDecodeError
for files that are not in HGENCODING.
2) [this patch] use util.tolocal to display these files.
Alternative 2) seems ok, as this only concerns display and
readability.
See also: fe38b0a3a928, apparently put aside during refactor of
highlight.
Add test for UnicodeDecodeError with iso-8859-1 file contents.
author | Christian Ebert <blacktrash@gmx.net> |
---|---|
date | Fri, 17 Oct 2008 12:12:33 +0200 |
parents | 248e54a9456e |
children |
line wrap: on
line source
#header# <title>#repo|escape#: #file|escape# history</title> <link rel="alternate" type="application/atom+xml" href="#url#atom-log/tip/#file|urlescape#" title="Atom feed for #repo|escape#:#file#"> <link rel="alternate" type="application/rss+xml" href="#url#rss-log/tip/#file|urlescape#" title="RSS feed for #repo|escape#:#file#"> </head> <body> <div class="buttons"> <a href="#url#log{sessionvars%urlparameter}">changelog</a> <a href="#url#shortlog{sessionvars%urlparameter}">shortlog</a> <a href="#url#graph{sessionvars%urlparameter}">graph</a> <a href="#url#tags{sessionvars%urlparameter}">tags</a> <a href="#url#file/#node|short#/#file|urlescape#{sessionvars%urlparameter}">file</a> <a href="#url#annotate/#node|short#/#file|urlescape#{sessionvars%urlparameter}">annotate</a> <a type="application/rss+xml" href="#url#rss-log/tip/#file|urlescape#">rss</a> <a type="application/atom+xml" href="#url#atom-log/tip/#file|urlescape#" title="Atom feed for #repo|escape#:#file#">atom</a> </div> <h2>#file|escape# revision history</h2> <p>navigate: <small class="navigate">{nav%filenaventry}</small></p> #entries%filelogentry# #footer#