From d0b0d57237e9304300244d62aee7f62847dedb61 Mon Sep 17 00:00:00 2001 From: Sean Finney Date: Sun, 6 Sep 2009 22:26:03 +0200 Subject: oookay, really fix the latin-1/utf-8 problem the proper changes were reverted, the wrongly reverted had the revert reverted, and all is back to normal. move along, nothing to see here... --- templates/patch_view.tmpl | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/templates/patch_view.tmpl b/templates/patch_view.tmpl index 52b9036..0a715b9 100644 --- a/templates/patch_view.tmpl +++ b/templates/patch_view.tmpl @@ -24,6 +24,10 @@ $escape($str($patch.diffstat))

Patch contents

- $pygments.highlight($str($patch).decode('utf-8'), $DiffLexer(), $HtmlFormatter(style='colorful', noclasses=True, encoding='utf-8')) + #try + $pygments.highlight($str($patch).decode('utf-8'), $DiffLexer(), $HtmlFormatter(style='colorful', noclasses=True, encoding='utf-8')) + #except UnicodeDecodeError + $pygments.highlight($str($patch).decode('latin-1'), $DiffLexer(), $HtmlFormatter(style='colorful', noclasses=True, encoding='latin-1')) + #end try
#end def -- cgit v1.2.3