Skip to content

Commit

Permalink
Refs #19535 EEA; Added delimiter restrictions to CSV dialect detection
Browse files Browse the repository at this point in the history
  • Loading branch information
olimpiurob committed May 12, 2014
1 parent c7cae92 commit 90ee10c
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
3 changes: 3 additions & 0 deletions docs/HISTORY.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@ Changelog

8.5-dev - (unreleased)
----------------------
* Bug fix: Added delimiter restrictions to CSV dialect detection. Valid CSV
delimiters are: {tab}, {space}, ;, ,, :
[olimpiurob refs #19535]
* Feature: Added test for missing values in json boolean fields and downloading
as tsv
[olimpiurob refs #19206]
Expand Down
3 changes: 2 additions & 1 deletion eea/app/visualization/converter/converter.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,8 @@ def dialect(self, datafile):
datafile.seek(0)
sniffer = csv.Sniffer()
try:
dialect = sniffer.sniff(datafile.read(2048))
dialect = sniffer.sniff(datafile.readline(2048),
delimiters='\t ;,:')
except Exception, err:
logger.debug(err)
dialect = 'eea-tab'
Expand Down

0 comments on commit 90ee10c

Please sign in to comment.