{"action":"reopened","issue":{"url":"https://api.github.com/repos/faye/faye-websocket-ruby/issues/80","labels_url":"https://api.github.com/repos/faye/faye-websocket-ruby/issues/80/labels{/name}","comments_url":"https://api.github.com/repos/faye/faye-websocket-ruby/issues/80/comments","events_url":"https://api.github.com/repos/faye/faye-websocket-ruby/issues/80/events","html_url":"https://github.com/faye/faye-websocket-ruby/issues/80","id":110104794,"number":80,"title":"Invalid byte sequence in UTF-8","user":{"login":"hansy","id":775807,"avatar_url":"https://avatars.githubusercontent.com/u/775807?v=3","gravatar_id":"","url":"https://api.github.com/users/hansy","html_url":"https://github.com/hansy","followers_url":"https://api.github.com/users/hansy/followers","following_url":"https://api.github.com/users/hansy/following{/other_user}","gists_url":"https://api.github.com/users/hansy/gists{/gist_id}","starred_url":"https://api.github.com/users/hansy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hansy/subscriptions","organizations_url":"https://api.github.com/users/hansy/orgs","repos_url":"https://api.github.com/users/hansy/repos","events_url":"https://api.github.com/users/hansy/events{/privacy}","received_events_url":"https://api.github.com/users/hansy/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-10-06T21:26:24Z","updated_at":"2015-10-06T23:15:23Z","closed_at":null,"body":"I'm trying to send an audio file to a server. Whenever I do something like the code below, the server throws an error about invalid byte sequences:\r\n\r\n```\r\nmedia = File.read(media_path)\r\nputs media.encoding \r\n#=> #<Encoding:UTF-8>\r\n\r\nEM.run {\r\n  ws = Faye::WebSocket::Client.new(uri)\r\n\r\n  ws.on :open do |event|\r\n    ws.send(media)\r\n  end\r\n\r\n...\r\n}\r\n```\r\nI've successfully sent that same file via other means (but binary encoded in the same way) to that same server, so I'm wondering if the `send` method is changing the encoding in some way?"}}