{"action":"created","issue":{"url":"https://api.github.com/repos/johnkerl/miller/issues/62","labels_url":"https://api.github.com/repos/johnkerl/miller/issues/62/labels{/name}","comments_url":"https://api.github.com/repos/johnkerl/miller/issues/62/comments","events_url":"https://api.github.com/repos/johnkerl/miller/issues/62/events","html_url":"https://github.com/johnkerl/miller/issues/62","id":104782952,"number":62,"title":"DKVP: pair separator in value breaks parsing","user":{"login":"rbroemeling","id":149464,"avatar_url":"https://avatars.githubusercontent.com/u/149464?v=3","gravatar_id":"","url":"https://api.github.com/users/rbroemeling","html_url":"https://github.com/rbroemeling","followers_url":"https://api.github.com/users/rbroemeling/followers","following_url":"https://api.github.com/users/rbroemeling/following{/other_user}","gists_url":"https://api.github.com/users/rbroemeling/gists{/gist_id}","starred_url":"https://api.github.com/users/rbroemeling/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rbroemeling/subscriptions","organizations_url":"https://api.github.com/users/rbroemeling/orgs","repos_url":"https://api.github.com/users/rbroemeling/repos","events_url":"https://api.github.com/users/rbroemeling/events{/privacy}","received_events_url":"https://api.github.com/users/rbroemeling/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/johnkerl/miller/labels/duplicate","name":"duplicate","color":"cccccc"},{"url":"https://api.github.com/repos/johnkerl/miller/labels/on%20deck","name":"on deck","color":"eb6420"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-09-03T21:12:05Z","updated_at":"2015-09-03T21:36:41Z","closed_at":null,"body":"Miller has difficulty parsing DKVP when the pair separator character is within the value of the data that it is parsing.  To whit:\r\n\r\nSource File\r\n```\r\na=pan,b=pan,i=1,x=0.3467901443380824,y=0.7268028627434533\r\na=eks,b=pan,i=2,x=0.7586799647=899636,y=0.5221511083334797\r\na=wye,b=\"wy=e\",i=3,x=0.20460330576630303,y=0.33831852551664776\r\na=eks,b=wye,i=4,x==0.38139939387114097,y=0.13418874328430463\r\na=wye,b=pan,i=5=,x=0.5732889198020006,y=0.8636244699032729\r\n```\r\n\r\nExpected Output of `mlr --opprint cat`\r\n```\r\na   b      i  x                    y\r\npan pan    1  0.3467901443380824   0.7268028627434533\r\neks pan    2  0.7586799647=899636  0.5221511083334797\r\nwye \"wy=e\" 3  0.20460330576630303  0.33831852551664776\r\neks wye    4  =0.38139939387114097 0.13418874328430463\r\nwye pan    5= 0.5732889198020006   0.8636244699032729\r\n```\r\n\r\nActual Output of `mlr --opprint cat`\r\n```\r\na   b   i x                   y\r\npan pan 1 0.3467901443380824  0.7268028627434533\r\neks pan 2 899636              0.5221511083334797\r\nwye e\"  3 0.20460330576630303 0.33831852551664776\r\neks wye 4 0.38139939387114097 0.13418874328430463\r\nwye pan - 0.5732889198020006  0.8636244699032729\r\n```\r\n\r\nIt looks like what miller does is that it reads the key until it finds the _first_ pair separator, and then starts reading the value after the _last_ pair separator.\r\n\r\nWhat it should do, I think, is read the key until it finds the _first_ pair separator, and then assign everything after that first pair separator right up until the field separator is found to be value."},"comment":{"url":"https://api.github.com/repos/johnkerl/miller/issues/comments/137581109","html_url":"https://github.com/johnkerl/miller/issues/62#issuecomment-137581109","issue_url":"https://api.github.com/repos/johnkerl/miller/issues/62","id":137581109,"user":{"login":"johnkerl","id":2008794,"avatar_url":"https://avatars.githubusercontent.com/u/2008794?v=3","gravatar_id":"","url":"https://api.github.com/users/johnkerl","html_url":"https://github.com/johnkerl","followers_url":"https://api.github.com/users/johnkerl/followers","following_url":"https://api.github.com/users/johnkerl/following{/other_user}","gists_url":"https://api.github.com/users/johnkerl/gists{/gist_id}","starred_url":"https://api.github.com/users/johnkerl/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/johnkerl/subscriptions","organizations_url":"https://api.github.com/users/johnkerl/orgs","repos_url":"https://api.github.com/users/johnkerl/repos","events_url":"https://api.github.com/users/johnkerl/events{/privacy}","received_events_url":"https://api.github.com/users/johnkerl/received_events","type":"User","site_admin":false},"created_at":"2015-09-03T21:36:40Z","updated_at":"2015-09-03T21:36:40Z","body":"The RFC-compliant CSV reader handles embedded separators within double quotes; readers for the other formats do not at all. This is a non-ideal situation, for sure.\r\n\r\nThis is a dup of https://github.com/johnkerl/miller/issues/52 and all four of the current on-deck or active tasks are what I'm actively working on for v2.2.0."}}