{"action":"created","issue":{"url":"https://api.github.com/repos/koalaman/shellcheck/issues/339","labels_url":"https://api.github.com/repos/koalaman/shellcheck/issues/339/labels{/name}","comments_url":"https://api.github.com/repos/koalaman/shellcheck/issues/339/comments","events_url":"https://api.github.com/repos/koalaman/shellcheck/issues/339/events","html_url":"https://github.com/koalaman/shellcheck/issues/339","id":65955326,"number":339,"title":"shellcheck: user error (Text.Regex.Posix.String died: (ReturnCode 17,\"illegal byte sequence\"))","user":{"login":"apennebaker-ni","id":10622042,"avatar_url":"https://avatars.githubusercontent.com/u/10622042?v=3","gravatar_id":"","url":"https://api.github.com/users/apennebaker-ni","html_url":"https://github.com/apennebaker-ni","followers_url":"https://api.github.com/users/apennebaker-ni/followers","following_url":"https://api.github.com/users/apennebaker-ni/following{/other_user}","gists_url":"https://api.github.com/users/apennebaker-ni/gists{/gist_id}","starred_url":"https://api.github.com/users/apennebaker-ni/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/apennebaker-ni/subscriptions","organizations_url":"https://api.github.com/users/apennebaker-ni/orgs","repos_url":"https://api.github.com/users/apennebaker-ni/repos","events_url":"https://api.github.com/users/apennebaker-ni/events{/privacy}","received_events_url":"https://api.github.com/users/apennebaker-ni/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":5,"created_at":"2015-04-02T15:46:28Z","updated_at":"2015-04-02T19:46:06Z","closed_at":null,"body":"When I try to shellcheck my wget-memegenerator script, ShellCheck fails on a regex error.\r\n\r\n**Trace**\r\n\r\n```\r\n$ shellcheck lib/wget-memegenerator \r\nshellcheck: user error (Text.Regex.Posix.String died: (ReturnCode 17,\"illegal byte sequence\"))\r\n```\r\n\r\nUpdate:\r\n\r\nI narrowed down the problem to the ASCII `»` symbol in:\r\n\r\n```\r\nPAGES=$(wget -q -O- \"http://memegenerator.net/$TAG/images/new/alltime/page/1\" | grep » -B 6 | grep page | head -n 1 | tr \"[<>]\" \" \" | awk '{ print $3 }')\r\n```\r\n\r\nThat's where shellcheck's regex fails.\r\n\r\n**Source**\r\n\r\nhttps://github.com/mcandre/politerips/blob/shellcheck-339/lib/wget-memegenerator#L13\r\n\r\n**System**\r\n\r\n```\r\n$ specs shellcheck cabal ghc brew os\r\nSpecs:\r\n\r\nspecs 0.14\r\nhttps://github.com/mcandre/specs#readme\r\n\r\nshellcheck --version\r\nShellCheck - shell script analysis tool\r\nversion: 0.3.6\r\nlicense: GNU Affero General Public License, version 3\r\nwebsite: http://www.shellcheck.net\r\n\r\ncabal --version\r\ncabal-install version 1.22.0.1\r\nusing version 1.22.1.0 of the Cabal library \r\n\r\nghc --version\r\nThe Glorious Glasgow Haskell Compilation System, version 7.8.4\r\n\r\nbrew --version\r\n0.9.5\r\n\r\nsystem_profiler SPSoftwareDataType | grep 'System Version'\r\n      System Version: OS X 10.10.2 (14C1514)\r\n```\r\n\r\n**Mitigation**\r\n\r\nFor now, I'm working around this shellcheck regex parsing issue by using a hexcode to represent the offending character.\r\n\r\nhttps://github.com/mcandre/politerips/commit/517bf9299f38ebe2d6a47a7d8705654b2a7ff0eb"},"comment":{"url":"https://api.github.com/repos/koalaman/shellcheck/issues/comments/89022353","html_url":"https://github.com/koalaman/shellcheck/issues/339#issuecomment-89022353","issue_url":"https://api.github.com/repos/koalaman/shellcheck/issues/339","id":89022353,"user":{"login":"apennebaker-ni","id":10622042,"avatar_url":"https://avatars.githubusercontent.com/u/10622042?v=3","gravatar_id":"","url":"https://api.github.com/users/apennebaker-ni","html_url":"https://github.com/apennebaker-ni","followers_url":"https://api.github.com/users/apennebaker-ni/followers","following_url":"https://api.github.com/users/apennebaker-ni/following{/other_user}","gists_url":"https://api.github.com/users/apennebaker-ni/gists{/gist_id}","starred_url":"https://api.github.com/users/apennebaker-ni/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/apennebaker-ni/subscriptions","organizations_url":"https://api.github.com/users/apennebaker-ni/orgs","repos_url":"https://api.github.com/users/apennebaker-ni/repos","events_url":"https://api.github.com/users/apennebaker-ni/events{/privacy}","received_events_url":"https://api.github.com/users/apennebaker-ni/received_events","type":"User","site_admin":false},"created_at":"2015-04-02T19:46:06Z","updated_at":"2015-04-02T19:46:06Z","body":"Hmm, try the larger script. We can pare it down to a minimal case.\r\n\r\nhttps://github.com/mcandre/politerips/blob/shellcheck-339/lib/wget-memegenerator"}}