Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Better support for CSV/TSV files #51

Closed
eseifert opened this issue Mar 30, 2015 · 1 comment
Closed

Better support for CSV/TSV files #51

eseifert opened this issue Mar 30, 2015 · 1 comment
Milestone

Comments

@eseifert
Copy link
Owner

At the moment GRAL only supports very a simple form of CSV. Although the CSV format is considered to be an easy exchange format, countless variants exist. There are quoted values, different characters for quoting, escaping, newline, etc.

The CSVReader and CSVWriter plug-ins should have more settings and be more configurable to the different variants.

Imported from trac ticket #52, created by eseifert on 11-28-2011 at 02:44, last modified: 11-28-2011 at 03:01

@eseifert eseifert added this to the 0.9 Release milestone Mar 30, 2015
@eseifert
Copy link
Owner Author

Major changes were done in r405 that will make CSVReader more flexible. [https://tools.ietf.org/html/rfc4180 RFC 4180] was used as a reference for the new implementation. And the reader employs the StatefulTokenizer class to apply more complex rules for parsing. This way, quoting and escaping are now possible.

At the moment double quotes are hard coded and quoting a value like

"foo;bar";foo;bar

will now output three string foo;bar, foo, and bar.

Escaping the quotes by doubling:

"foo""the""bar"

will now output the string foo"the"bar containing the quotes.

Additionally, settings have been changed from strings to static constants, like SEPARATOR_CHAR. Once the new class has been thoroughly tested, more settings will be added

Trac comment by eseifert on 11-28-2011 at 03:01

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

No branches or pull requests

1 participant