{"action":"created","issue":{"url":"https://api.github.com/repos/stedolan/jq/issues/1239","repository_url":"https://api.github.com/repos/stedolan/jq","labels_url":"https://api.github.com/repos/stedolan/jq/issues/1239/labels{/name}","comments_url":"https://api.github.com/repos/stedolan/jq/issues/1239/comments","events_url":"https://api.github.com/repos/stedolan/jq/issues/1239/events","html_url":"https://github.com/stedolan/jq/issues/1239","id":177996237,"number":1239,"title":"weird behavior during substitutions","user":{"login":"jmague","id":3157536,"avatar_url":"https://avatars.githubusercontent.com/u/3157536?v=3","gravatar_id":"","url":"https://api.github.com/users/jmague","html_url":"https://github.com/jmague","followers_url":"https://api.github.com/users/jmague/followers","following_url":"https://api.github.com/users/jmague/following{/other_user}","gists_url":"https://api.github.com/users/jmague/gists{/gist_id}","starred_url":"https://api.github.com/users/jmague/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jmague/subscriptions","organizations_url":"https://api.github.com/users/jmague/orgs","repos_url":"https://api.github.com/users/jmague/repos","events_url":"https://api.github.com/users/jmague/events{/privacy}","received_events_url":"https://api.github.com/users/jmague/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2016-09-20T08:24:38Z","updated_at":"2016-09-20T14:28:30Z","closed_at":null,"body":"Hi,\r\n\r\nI've came across a case where substitutions clearly don't work as expected. \r\n\r\n    $ echo '\"“@a\"' | jq -r 'sub(\"a\";\"A\")'\r\n    Aa\r\n\r\nHere are a couple of similar examples: \r\n\r\n    $ echo '\"@“a\"' | jq -r 'sub(\"a\";\"A\")'\r\n    A\r\n\r\nor\r\n\r\n    $ echo '\"“@ a bc\\nd\"' | jq -r 'sub(\"\\n\";\" \";\"g\")'\r\n    “@ a  c d\r\n\r\nI haven't figure out the regularity behind these errors, but the cooccurrence of *“@* seems to be part of the problem."},"comment":{"url":"https://api.github.com/repos/stedolan/jq/issues/comments/248317894","html_url":"https://github.com/stedolan/jq/issues/1239#issuecomment-248317894","issue_url":"https://api.github.com/repos/stedolan/jq/issues/1239","id":248317894,"user":{"login":"jmague","id":3157536,"avatar_url":"https://avatars.githubusercontent.com/u/3157536?v=3","gravatar_id":"","url":"https://api.github.com/users/jmague","html_url":"https://github.com/jmague","followers_url":"https://api.github.com/users/jmague/followers","following_url":"https://api.github.com/users/jmague/following{/other_user}","gists_url":"https://api.github.com/users/jmague/gists{/gist_id}","starred_url":"https://api.github.com/users/jmague/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jmague/subscriptions","organizations_url":"https://api.github.com/users/jmague/orgs","repos_url":"https://api.github.com/users/jmague/repos","events_url":"https://api.github.com/users/jmague/events{/privacy}","received_events_url":"https://api.github.com/users/jmague/received_events","type":"User","site_admin":false},"created_at":"2016-09-20T14:28:30Z","updated_at":"2016-09-20T14:28:30Z","body":"I'm actually using version 1.5\r\n\r\n$ jq --version && echo '\"@ a bc\\nd\"' | jq -r 'sub(\"\\n\";\" \";\"g\")'\r\njq-1.5\r\n@ a bc d"}}
{"actor":{"display_login":"jmague"}}