{"action":"created","issue":{"url":"https://api.github.com/repos/ggreer/the_silver_searcher/issues/914","repository_url":"https://api.github.com/repos/ggreer/the_silver_searcher","labels_url":"https://api.github.com/repos/ggreer/the_silver_searcher/issues/914/labels{/name}","comments_url":"https://api.github.com/repos/ggreer/the_silver_searcher/issues/914/comments","events_url":"https://api.github.com/repos/ggreer/the_silver_searcher/issues/914/events","html_url":"https://github.com/ggreer/the_silver_searcher/issues/914","id":157538473,"number":914,"title":"UTF-16 Support","user":{"login":"Nephyrin","id":965090,"avatar_url":"https://avatars.githubusercontent.com/u/965090?v=3","gravatar_id":"","url":"https://api.github.com/users/Nephyrin","html_url":"https://github.com/Nephyrin","followers_url":"https://api.github.com/users/Nephyrin/followers","following_url":"https://api.github.com/users/Nephyrin/following{/other_user}","gists_url":"https://api.github.com/users/Nephyrin/gists{/gist_id}","starred_url":"https://api.github.com/users/Nephyrin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Nephyrin/subscriptions","organizations_url":"https://api.github.com/users/Nephyrin/orgs","repos_url":"https://api.github.com/users/Nephyrin/repos","events_url":"https://api.github.com/users/Nephyrin/events{/privacy}","received_events_url":"https://api.github.com/users/Nephyrin/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2016-05-30T17:44:32Z","updated_at":"2016-05-30T17:47:20Z","closed_at":null,"body":"Encoding a file as UTF-16, either little or big endian, with or without a BOM, results in AG treating it as binary.\r\n\r\n```bash\r\n$ echo Hello > test.txt\r\n$ ag Hello test.txt\r\n1:Hello\r\n$ emacs test.txt --batch --eval \"(progn (set-buffer-file-coding-system 'utf-16) (save-buffer))\"\r\n$ ag Hello test.txt\r\n$ ag --search-binary H.e.l.l.o test.txt\r\nBinary file test.txt matches.\r\n```\r\n\r\nI've uploaded a test utf16.txt file here:\r\nhttps://nemu.pointysoftware.net/sink/utf16.txt\r\n"},"comment":{"url":"https://api.github.com/repos/ggreer/the_silver_searcher/issues/comments/222533550","html_url":"https://github.com/ggreer/the_silver_searcher/issues/914#issuecomment-222533550","issue_url":"https://api.github.com/repos/ggreer/the_silver_searcher/issues/914","id":222533550,"user":{"login":"Nephyrin","id":965090,"avatar_url":"https://avatars.githubusercontent.com/u/965090?v=3","gravatar_id":"","url":"https://api.github.com/users/Nephyrin","html_url":"https://github.com/Nephyrin","followers_url":"https://api.github.com/users/Nephyrin/followers","following_url":"https://api.github.com/users/Nephyrin/following{/other_user}","gists_url":"https://api.github.com/users/Nephyrin/gists{/gist_id}","starred_url":"https://api.github.com/users/Nephyrin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Nephyrin/subscriptions","organizations_url":"https://api.github.com/users/Nephyrin/orgs","repos_url":"https://api.github.com/users/Nephyrin/repos","events_url":"https://api.github.com/users/Nephyrin/events{/privacy}","received_events_url":"https://api.github.com/users/Nephyrin/received_events","type":"User","site_admin":false},"created_at":"2016-05-30T17:47:20Z","updated_at":"2016-05-30T17:47:20Z","body":"... And here's one with a byte order mark (Specifically, `utf-16le-with-signature-unix` in emacs):\r\nhttps://nemu.pointysoftware.net/sink/utf-16le-with-signature-unix.txt\r\n\r\n"}}
{"actor":{"display_login":"Nephyrin"}}