changeset 7120 | db7557359636 |
parent 6938 | ce94b3236ea4 |
child 7948 | de377b1a9a84 |
--- a/hgext/highlight/highlight.py Sat Oct 18 04:26:06 2008 -0500 +++ b/hgext/highlight/highlight.py Fri Oct 17 12:12:33 2008 +0200 @@ -29,6 +29,9 @@ if util.binary(text): return + # avoid UnicodeDecodeError in pygments + text = util.tolocal(text) + # To get multi-line strings right, we can't format line-by-line try: lexer = guess_lexer_for_filename(fctx.path(), text[:1024],