|Subject:||FEATURE REQUEST: Parse SEP= parameters used by Excel|
Microsoft Excel has the ability to read the field separator used in a CSV file from a "sep=" parameter specified in the first line of that file. This will ensure that the file will be properly parsed no matter the separator specified by the locale settings. (See:Unfortunately, Text::CSV_XS will read that line as a regular line in the CSV file and may alter it. (For instance, it will add quotes if "always_quote" is set to 1, which will break the functionality in Excel. I would suggest that Text::CSV_XS function csv::in should parse that line, use it to set the "sep_char" parameter, and remove the line from the stream provided by the module. Optionally, you could pass a new argument to the "csv" function that would add it back in before writing to a file using csv::out, adjusting it's value if sep_char has been changed.