Skip to content

Added delimiter sniffing (comma, tab, semicolon)#81

Open
yconst wants to merge 1 commit into
davedelong:masterfrom
yconst:master
Open

Added delimiter sniffing (comma, tab, semicolon)#81
yconst wants to merge 1 commit into
davedelong:masterfrom
yconst:master

Conversation

@yconst

@yconst yconst commented Apr 1, 2015

Copy link
Copy Markdown

I've added a routine to detect the correct delimiter among comma, semicolon and tab. Replaced the default use of a comma as a delimiter with delimiter sniffing in method calls. Newline is passed as a dummy parameter to denote that we want delimiter sniffing.

@yconst

yconst commented Apr 1, 2015

Copy link
Copy Markdown
Author

Good point about NEWLINE. Do you think the assertion is required? _sniffDelimiter() will assign to _delimiter one of COMMA, TAB or SEMICOLON in any case.

@davedelong

Copy link
Copy Markdown
Owner

The assertion is definitely needed, since they could invoke the method with '\r' as the delimiter, for example.

@damienvieira

Copy link
Copy Markdown

Hi guys, I was wondering why this PR was never merged?

After some quick tests over different CSV files separated by comma or semi colon, it seems to be working as expected.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants