mirror of
https://github.com/ibm-s390-linux/s390-tools.git
synced 2026-08-05 02:14:52 +00:00
This patch modifies the default behavior of CSV header generation: header cells are no longer enclosed in double quotes unless the FMT_QUOTEALL flag is explicitly set. According to RFC 4180, quoting is only required when a cell contains control characters, commas, or double quotes. The goal of this change is to produce cleaner and more readable CSV output by default, and to avoid unnecessary quoting in header rows. It also simplifies algorithms that rely on FMT_UTIL and improves compatibility with downstream tools expecting unquoted headers. Tools that expect unquoted headers include: * SQL tools: Headers optional, usually unquoted * R (read.csv): Uses header=TRUE, no quotes needed * Pandas: Assumes headers, quoting not required * Excel: Detects headers; quotes only for special chars Signed-off-by: Jan Polensky <japo@linux.ibm.com> Reviewed-by: Peter Oberparleiter <oberpar@linux.ibm.com> Signed-off-by: Steffen Eiden <seiden@linux.ibm.com>