diff options
author | Sean Finney <seanius@debian.org> | 2009-09-06 22:26:03 +0200 |
---|---|---|
committer | Sean Finney <seanius@debian.org> | 2009-09-06 22:26:03 +0200 |
commit | d0b0d57237e9304300244d62aee7f62847dedb61 (patch) | |
tree | 5c0556da511ca1194458ce400bacde7c349f0f17 | |
parent | 60bc48b1e9270d52967c82ac3417d4ada763c04e (diff) | |
download | patch-tracker-d0b0d57237e9304300244d62aee7f62847dedb61.tar.gz |
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...
-rw-r--r-- | templates/patch_view.tmpl | 6 |
1 files changed, 5 insertions, 1 deletions
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)) </div> <h2>Patch contents</h2> <div class="patch"> - $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 </div> #end def |