#9 reads "When a field enclosed in double quotes has spaces before and/or after the double quotes, the spaces MUST be ignored"
But #6 says "Spaces are considered part of a field and MUST NOT be ignored."
In my view this overcomplicates the parsing. This practically means that the file cannot easily be parsed one way. I'd have to remember if the field started with spaces only and then if I find a quote go back to where the first non-space was. Space is not a special character other than for this purpose.
My suggestion:
If the first character after the comma is a " (double quote) the field should be considered quoted - it spans until the next single ".
If the first character after the comma is not a double quote the field should be interpreted as not quoted thus it spans until the next new line or next comma whichever comes first. If there are double quotes inside the field then treat them as regular characters.
This way I'd never have to go backwards.
Are there many csv exporters that use ", " as field delimiter for quoted fields?
#9 reads "When a field enclosed in double quotes has spaces before and/or after the double quotes, the spaces MUST be ignored"
But #6 says "Spaces are considered part of a field and MUST NOT be ignored."
In my view this overcomplicates the parsing. This practically means that the file cannot easily be parsed one way. I'd have to remember if the field started with spaces only and then if I find a quote go back to where the first non-space was. Space is not a special character other than for this purpose.
My suggestion:
If the first character after the comma is a " (double quote) the field should be considered quoted - it spans until the next single ".
If the first character after the comma is not a double quote the field should be interpreted as not quoted thus it spans until the next new line or next comma whichever comes first. If there are double quotes inside the field then treat them as regular characters.
This way I'd never have to go backwards.
Are there many csv exporters that use ", " as field delimiter for quoted fields?