Bug 82651

git-svn-id: svn://svn.office.custis.ru/3rdparty/viewvc.org/trunk@1573 6955db30-a419-402b-8a0d-67ecbb4d7f56
remotes/github/custis
vfilippov 2012-06-15 15:28:26 +00:00 committed by Vitaliy Filippov
parent 0bd2b940f9
commit dfff9c0cc2
1 changed files with 1 additions and 1 deletions

View File

@ -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