Thanks to visit codestin.com
Credit goes to github.com

Skip to content

CSV line recovery forces Windows line endings #1597

@sinus-x

Description

@sinus-x

The recover_line_csv() function is joining data with \r\n, redgardless of the source file newlines:

tempdata = '\r\n'.join(self.tempdata) + '\r\n' if self.tempdata else ''

This means that bot test are failing even though the parsing succeeded, because the raw values do not match: there is a new CR byte. As a workaround, bot tests are replacing newlines in their test files to account for that, which is not ideal solution.

"raw": utils.base64_encode(SAMPLE_FILE.replace('\n', '\r\n')),

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugIndicates an unexpected problem or unintended behaviorcomponent: corehelp wantedIndicates that a maintainer wants help on an issue or pull request

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions