I\'ve got a simple application that opens a tab-delimited text file, and inserts that data into a database.
I\'m using this CSV reader to read the data: http://www.codep
I did some searching, and there is an RFC for CSV files (RFC 4180), and that does explicitly prohibit what they are doing:
Each field may or may not be enclosed in double quotes (however some programs, such as Microsoft Excel, do not use double quotes at all). If fields are not enclosed with double quotes, then double quotes may not appear inside the fields.
Basicly, if they want to do that, they need to enclose that whole field in quotes, like so:
,""SUMISEI MARU NO 2" - sea of Japan",
So if you want you can throw this problem back at them and insist they send you a "proper" RFC 4180 CSV file.
Since you have access to the source files for that CSV reader, another option would be to modify it to handle the kind of quoted strings they are feeding you.
This kind of situation is exactly why it is vital to have source code access to your toolset.
If instead you'd like to preprocess (hack) their files before feeing them to your tool, the correct method would be to look for fields with a quote not immediately in front of or behind a separator, and enclose its whole field in another set of quotes.