Skip to content

Commit

Permalink
Use cchardet for detection
Browse files Browse the repository at this point in the history
  • Loading branch information
georgiana-b committed May 18, 2016
1 parent f620ecf commit 60fd0eb
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions goodtables/datatable/datatable.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
import io
import codecs
import datetime
import chardet
import cchardet as chardet
import xlrd
import csv
from bs4 import BeautifulSoup
Expand Down Expand Up @@ -248,7 +248,7 @@ def _detect_stream_encoding(self, stream):
sample = stream.read(sample_length)
stream.seek(0)

encoding = chardet.detect(sample)['encoding']
encoding = chardet.detect(sample)['encoding'].lower()
# default to utf-8 for safety
if encoding == 'ascii':
encoding = 'utf-8'
Expand Down
2 changes: 1 addition & 1 deletion requirements/base.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
click==3.3
requests==2.5.1
jsonschema==2.4.0
chardet==2.3.0
cchardet>=1.0.0
xlrd>=0.9.3
tellme>=0.2.4
jsontableschema>=0.5.1
Expand Down

0 comments on commit 60fd0eb

Please sign in to comment.