Hi there? I don't suppose there's any way to read a tab-separated CSV? I've tried "\t", "TAB", the percent code (&#09) and the whitespace character itself... nothing works.

Just about to go into the code to see what might work. I'll post anything I find in case someone else is looking.

Comments

patcon’s picture

Just noticed that Feeds uses the same CSVparser, and they allow for tabs, so hopefully that means it will be simple...

patcon’s picture

Category: support » feature
Status: Active » Needs review

Alright, so I used Feeds modules's FeedsCSVParser.inc as a starter (line 19):

$delimiter = $source_config['delimiter'] == 'TAB' ? "\t" : $source_config['delimiter'];

I altered line 255 in Transformations -- CSV's operations.csv.inc from:

$parser->setDelimiter($this->input('delimiter')->data());

to

$parser->setDelimiter($this->input('delimiter')->data() == 'TAB' ? "\t" : setDelimiter($this->input('delimiter')->data());

So now if I type in "TAB" as the delimiter, it separated based on that.
Sorry that I don't know how to roll a patch yet. I'm pricing laptops and holding off on learning until I have a linux environment to work with.

I'll just switch this to "Needs review",