Skip to content

COPY from csv support delimeter \r\n #6140

Closed
@Xuanwo

Description

@Xuanwo

CsvSource will accept the input delimiter directly. This behavior could make user copied wrong data when input delimiter is \n but files is \r\n.

To make users' lives easier, we can handle them by:

let record_delimiter = if record_delimiter == b'\n' || record_delimiter == b'\r' {
    Terminator::CRLF
} else {
    Terminator::Any(record_delimiter)
};

So that users will not panic when they copied the wrong data with \n.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions