{"action":"opened","issue":{"url":"https://api.github.com/repos/mjaschen/collmex/issues/2","repository_url":"https://api.github.com/repos/mjaschen/collmex","labels_url":"https://api.github.com/repos/mjaschen/collmex/issues/2/labels{/name}","comments_url":"https://api.github.com/repos/mjaschen/collmex/issues/2/comments","events_url":"https://api.github.com/repos/mjaschen/collmex/issues/2/events","html_url":"https://github.com/mjaschen/collmex/issues/2","id":176886811,"number":2,"title":"Invalid CSV is generated","user":{"login":"mjaschen","id":328130,"avatar_url":"https://avatars.githubusercontent.com/u/328130?v=3","gravatar_id":"","url":"https://api.github.com/users/mjaschen","html_url":"https://github.com/mjaschen","followers_url":"https://api.github.com/users/mjaschen/followers","following_url":"https://api.github.com/users/mjaschen/following{/other_user}","gists_url":"https://api.github.com/users/mjaschen/gists{/gist_id}","starred_url":"https://api.github.com/users/mjaschen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mjaschen/subscriptions","organizations_url":"https://api.github.com/users/mjaschen/orgs","repos_url":"https://api.github.com/users/mjaschen/repos","events_url":"https://api.github.com/users/mjaschen/events{/privacy}","received_events_url":"https://api.github.com/users/mjaschen/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2016-09-14T11:50:51Z","updated_at":"2016-09-14T11:50:51Z","closed_at":null,"body":"The generated CSV is invalid, if a string contains a backslash directly followed by a double-quote, e. g. for the following data\r\n\r\n```php\r\n$data = [\r\n    'CMXINV',\r\n    '-1001338',\r\n    'Some string data here: \"quoted text // highlight string \\\\\\\\\" and \"foo\" bar',\r\n    'baz'\r\n];\r\n```\r\n\r\none would expect this CSV line:\r\n\r\n```csv\r\nCMXINV;-1001338;\"Some string data here: \"\"quoted text // highlight string \\\\\"\" and \"\"foo\"\" bar\";baz\r\n```\r\n\r\nThe generated CSV line is different:\r\n\r\n```csv\r\nCMXINV;-1001338;\"Some string data here: \"\"quoted text // highlight string \\\\\" and \"\"foo\"\" bar\";baz\r\n```\r\n\r\n(a double-quote is missing after the two backslashes)\r\n\r\nThe causing bug is well known: https://bugs.php.net/bug.php?id=43225\r\n\r\nWe should provide a workaround for this issue until the PHP bug gets fixed."}}
{"actor":{"display_login":"mjaschen"}}