{"action":"created","issue":{"url":"https://api.github.com/repos/atom/electron/issues/634","labels_url":"https://api.github.com/repos/atom/electron/issues/634/labels{/name}","comments_url":"https://api.github.com/repos/atom/electron/issues/634/comments","events_url":"https://api.github.com/repos/atom/electron/issues/634/events","html_url":"https://github.com/atom/electron/issues/634","id":42139479,"number":634,"title":"'hex' Buffer encoding doesn't parse clipboard data correctly","user":{"login":"Morhaus","id":1621758,"avatar_url":"https://avatars.githubusercontent.com/u/1621758?v=3","gravatar_id":"","url":"https://api.github.com/users/Morhaus","html_url":"https://github.com/Morhaus","followers_url":"https://api.github.com/users/Morhaus/followers","following_url":"https://api.github.com/users/Morhaus/following{/other_user}","gists_url":"https://api.github.com/users/Morhaus/gists{/gist_id}","starred_url":"https://api.github.com/users/Morhaus/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Morhaus/subscriptions","organizations_url":"https://api.github.com/users/Morhaus/orgs","repos_url":"https://api.github.com/users/Morhaus/repos","events_url":"https://api.github.com/users/Morhaus/events{/privacy}","received_events_url":"https://api.github.com/users/Morhaus/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/atom/electron/labels/bug","name":"bug","color":"fc2929"}],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":7,"created_at":"2014-09-07T10:37:44Z","updated_at":"2015-05-27T07:27:41Z","closed_at":"2015-05-27T07:27:04Z","body":"Hey.\r\n\r\nWhen retrieving a hexadecimal string from the user's clipboard and converting it to a Buffer via `new Buffer string, 'hex'`, it seems that the second half of the string isn't parsed correctly and defaults to a random byte string.\r\n\r\n```coffeescript\r\ndocument.addEventListener 'paste', (evt) ->\r\n  str1 = evt.clipboardData.getData 'Text'\r\n  str2 = 'F1F2F3F4'\r\n  buf1 = new Buffer str1, 'hex'\r\n  buf2 = new Buffer str2, 'hex'\r\n  str1 === str2 # => true\r\n  buf1.toString 'hex' # => 'f1f20000'\r\n  buf2.toString 'hex' # => 'f1f2f3f4'\r\n```\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/atom/electron/issues/comments/105797196","html_url":"https://github.com/atom/electron/issues/634#issuecomment-105797196","issue_url":"https://api.github.com/repos/atom/electron/issues/634","id":105797196,"user":{"login":"zcbenz","id":639601,"avatar_url":"https://avatars.githubusercontent.com/u/639601?v=3","gravatar_id":"","url":"https://api.github.com/users/zcbenz","html_url":"https://github.com/zcbenz","followers_url":"https://api.github.com/users/zcbenz/followers","following_url":"https://api.github.com/users/zcbenz/following{/other_user}","gists_url":"https://api.github.com/users/zcbenz/gists{/gist_id}","starred_url":"https://api.github.com/users/zcbenz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zcbenz/subscriptions","organizations_url":"https://api.github.com/users/zcbenz/orgs","repos_url":"https://api.github.com/users/zcbenz/repos","events_url":"https://api.github.com/users/zcbenz/events{/privacy}","received_events_url":"https://api.github.com/users/zcbenz/received_events","type":"User","site_admin":true},"created_at":"2015-05-27T07:27:40Z","updated_at":"2015-05-27T07:27:40Z","body":"Fixed with patch https://github.com/atom/node/commit/b772c19a8f9db65673184822fb294235eff9c364."}}