From dfff9c0cc2d9fae4cdbfc217c8776e77a40dc09e Mon Sep 17 00:00:00 2001 From: vfilippov Date: Fri, 15 Jun 2012 15:28:26 +0000 Subject: [PATCH] Bug 82651 git-svn-id: svn://svn.office.custis.ru/3rdparty/viewvc.org/trunk@1573 6955db30-a419-402b-8a0d-67ecbb4d7f56 --- lib/viewvcmagic.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/viewvcmagic.py b/lib/viewvcmagic.py index b58b1c91..f64e954b 100644 --- a/lib/viewvcmagic.py +++ b/lib/viewvcmagic.py @@ -39,7 +39,7 @@ class ContentMagic: charset = 'utf-8' try: content = content.decode('utf-8') except: charset = None - if charset is None and have_chardet: + if charset is None and have_chardet and len(content) > 64: # Try to guess with chardet try: # Only detect on first 256KB if content is longer