Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • C csvkit
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 61
    • Issues 61
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 4
    • Merge requests 4
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Package Registry
    • Infrastructure Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • wireservice
  • csvkit
  • Merge requests
  • !205

Fix escaping for quotechar and escapechar

  • Review changes

  • Download
  • Email patches
  • Plain diff
Closed Administrator requested to merge github/fork/dallongo/master into master Mar 05, 2013
  • Overview 0
  • Commits 4
  • Pipelines 0
  • Changes 9

Created by: dallongo

The quote characters were never being escaped because doublequote could never be False. Some changes to csvkit/cli.py were needed because all of the attributes of self.args that we are checking for in the CSVKitUtility class already exist so the 'if' statements should be checking that the attributes are not None type instead of simply checking that they exist. This fixes the problem where 'doublequote=False' is never passed into kwargs.

A bug in the Python built-in csv class does not escape the escapechar when writing out with csv.writer. See http://bugs.python.org/issue12178. I have added a few lines as a work-around in csvkit/unicsv.py for UnicodeCSVWriter.writerow(). In the event that the bug is finally fixed in Python, just remove the 10 lines that I've added.

Assignee
Assign to
Reviewers
Request review from
Time tracking
Source branch: github/fork/dallongo/master