Bug 82651
git-svn-id: svn://svn.office.custis.ru/3rdparty/viewvc.org/trunk@1573 6955db30-a419-402b-8a0d-67ecbb4d7f56remotes/github/custis
parent
0bd2b940f9
commit
dfff9c0cc2
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue