|Welcome to the Monastery|
Re^3: CSV_XS and UTF8 stringsby Tux (Prior)
|on Oct 19, 2011 at 06:44 UTC||Need Help??|
So what you want is a new option to disable the need for quotation on characters with code-points > 127?
Note that the quote_space isn't even tested when writing the fields with the utf-8 characters. It is just tested when a space is encountered inside a field. While scanning a field, there is a flag that is set when quotation is required. When the flag has been set already by whatever other trigger, further tests are skipped. In your example that flag was already triggered by the first "binary" character, so the quote_space is effectively a no-op in your code.
I'm however not sure that I want to implement such a new feature as it will potentially create invalid CSV. OTOH it will be an option that is only used on writing CSV, which is relatively easy to change.
The current quote trigger is like:
A new flag could make that into something like
Leaving it safe for all ASCII binary. I could do that.
Enjoy, Have FUN! H.Merijn