{"action":"closed","issue":{"url":"https://api.github.com/repos/psequel/psequel/issues/108","repository_url":"https://api.github.com/repos/psequel/psequel","labels_url":"https://api.github.com/repos/psequel/psequel/issues/108/labels{/name}","comments_url":"https://api.github.com/repos/psequel/psequel/issues/108/comments","events_url":"https://api.github.com/repos/psequel/psequel/issues/108/events","html_url":"https://github.com/psequel/psequel/issues/108","id":145056682,"number":108,"title":"Support conventional CSV quote escaping","user":{"login":"mgood","id":29016,"avatar_url":"https://avatars.githubusercontent.com/u/29016?v=3","gravatar_id":"","url":"https://api.github.com/users/mgood","html_url":"https://github.com/mgood","followers_url":"https://api.github.com/users/mgood/followers","following_url":"https://api.github.com/users/mgood/following{/other_user}","gists_url":"https://api.github.com/users/mgood/gists{/gist_id}","starred_url":"https://api.github.com/users/mgood/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mgood/subscriptions","organizations_url":"https://api.github.com/users/mgood/orgs","repos_url":"https://api.github.com/users/mgood/repos","events_url":"https://api.github.com/users/mgood/events{/privacy}","received_events_url":"https://api.github.com/users/mgood/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/psequel/psequel/labels/bug","name":"bug","color":"fc2929"}],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2016-04-01T00:52:26Z","updated_at":"2016-06-11T04:38:15Z","closed_at":"2016-06-11T04:38:15Z","body":"Thanks, I really like using PSequel, but I have to manually correct the copied CSV before importing into other tools to fix the quote escaping.\r\n\r\nWhile there are a lot of different dialects of CSV, most tools seem to use two double quotes as an escaped double-quote character, as described in [the CSV RFC](https://www.ietf.org/rfc/rfc4180.txt).\r\n\r\n```\r\n   7.  If double-quotes are used to enclose fields, then a double-quote\r\n       appearing inside a field must be escaped by preceding it with\r\n       another double quote.  For example:\r\n\r\n       \"aaa\",\"b\"\"bb\",\"ccc\"\r\n```\r\n\r\nThe two double-quotes is recognized by both Excel and Numbers, and is the default in the programming libraries I've used as well.\r\n\r\nPSequel uses backslashes to escape double-quotes in values, which I've seen occasionally, but it doesn't seem to be as widely supported.\r\n\r\nWould you consider switching to the two double-quotes for escaping, or provide a setting to switch CSV dialects if some users need to support a different format?\r\n\r\nFor example to reproduce:\r\n\r\nRun query:\r\n```sql\r\nSELECT 'a \" b' AS foo;\r\n```\r\n\r\nCopy as CSV\r\n\r\nPasted result is:\r\n```\r\n\"foo\"\r\n\"a \\\" b\"\r\n```\r\n\r\nInstead, I would expect the quote to be escaped like:\r\n\r\n```\r\n\"foo\"\r\n\"a \"\" b\"\r\n```"}}
{"actor":{"display_login":"psequel"}}