How CSV Dialects work
mainA CsvDialect is a value object that defines the structural characters of the CSV format. It is shared between readers and writers to ensure consistency. It consists of four properties:
delimiter: The character separating fields.quoteChar: The character used to wrap fields.escapeChar: The character used to escape special characters.lineTerminator: The character(s) defining the end of a row.
You can use built-in dialects like CsvDialect.RFC4180 or CsvDialect.TSV, or define a custom one.
val customWriter = csvWriter {
dialect = CsvDialect(delimiter = ';', escapeChar = '\\')
}