-
Notifications
You must be signed in to change notification settings - Fork 28
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
enhancement request - allow user specified field wrapper #46
Comments
Fun fact, this is how it worked initially, but I removed it because of bugs. Those bugs are fixed now though... Currently the code mimics the build-in CSV parser in the .NET lib, i.e. the escape sequence for a string that contains the quote character itself is to double it. So e.g. |
I don't think that will work for the files I work with (or the example above). As you say, it seems to be implemented to mimic the functionality of the .Net TextFieldParser (just looked it up) so it has a yes/no for "HasFieldsEnclosedInQuotes" which is the field wrapper, but its set as quotes or nothing. The csv files I work with (technically, not comma separated values but a similar flat file structure) uses a non-alphanumerical character as the delimiter, and a different non-alphanumerical character as the field wrapper. The rationale is that it improves the robustness of the process if your input file happens to have commas or quotes in some of the fields, hence user needs to be able to specify both the delimiter an the field wrapper character. Is adding this back in something you'd consider? |
Settings (and Manual Parse) allows user to specify the delimiter, but not the text/field wrapper applied to the file. For example, text file might use | as the column separator but each field is inside its own field wrapper of ^ - so file reads:
^field1^|^field2^|^field3^
Ability to specify this would be very useful in some scenarios (like mine) and can be disregarded by others if not applicable to them
The text was updated successfully, but these errors were encountered: