{"action":"created","issue":{"url":"https://api.github.com/repos/comma-csv/comma/issues/99","repository_url":"https://api.github.com/repos/comma-csv/comma","labels_url":"https://api.github.com/repos/comma-csv/comma/issues/99/labels{/name}","comments_url":"https://api.github.com/repos/comma-csv/comma/issues/99/comments","events_url":"https://api.github.com/repos/comma-csv/comma/issues/99/events","html_url":"https://github.com/comma-csv/comma/issues/99","id":138494083,"number":99,"title":"Exporting with BOM","user":{"login":"DannyBen","id":2405099,"avatar_url":"https://avatars.githubusercontent.com/u/2405099?v=3","gravatar_id":"","url":"https://api.github.com/users/DannyBen","html_url":"https://github.com/DannyBen","followers_url":"https://api.github.com/users/DannyBen/followers","following_url":"https://api.github.com/users/DannyBen/following{/other_user}","gists_url":"https://api.github.com/users/DannyBen/gists{/gist_id}","starred_url":"https://api.github.com/users/DannyBen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DannyBen/subscriptions","organizations_url":"https://api.github.com/users/DannyBen/orgs","repos_url":"https://api.github.com/users/DannyBen/repos","events_url":"https://api.github.com/users/DannyBen/events{/privacy}","received_events_url":"https://api.github.com/users/DannyBen/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2016-03-04T14:53:37Z","updated_at":"2016-03-11T22:05:43Z","closed_at":null,"body":"I was contemplating whether I should open an issue or a question on SO. Apologies if I chose poorly...\r\n\r\nIs there anything I need to do in comma config, or the call to \"render\" in order to get the CSV with BOM? The reason I am asking, is that my users see gibberish when opening with Excel 2010, but it opened nicely when I added the BOM (manually).\r\n\r\nI found [this post][1] that shows how to do it without comma, but I was hoping to get to something simpler, in the same spirit of comma. Maybe something like:\r\n\r\n```ruby\r\nrespond_to do |format|\r\n  format.html { @activities = @activities.page(params[:page]) }\r\n  format.csv  { render :csv => @activities, bom: true } # <--- tadaaa...\r\nend\r\n```\r\n\r\n[1]: http://blog.plataformatec.com.br/2009/09/exporting-data-to-csv-and-excel-in-your-rails-app/\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/comma-csv/comma/issues/comments/195571438","html_url":"https://github.com/comma-csv/comma/issues/99#issuecomment-195571438","issue_url":"https://api.github.com/repos/comma-csv/comma/issues/99","id":195571438,"user":{"login":"DannyBen","id":2405099,"avatar_url":"https://avatars.githubusercontent.com/u/2405099?v=3","gravatar_id":"","url":"https://api.github.com/users/DannyBen","html_url":"https://github.com/DannyBen","followers_url":"https://api.github.com/users/DannyBen/followers","following_url":"https://api.github.com/users/DannyBen/following{/other_user}","gists_url":"https://api.github.com/users/DannyBen/gists{/gist_id}","starred_url":"https://api.github.com/users/DannyBen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DannyBen/subscriptions","organizations_url":"https://api.github.com/users/DannyBen/orgs","repos_url":"https://api.github.com/users/DannyBen/repos","events_url":"https://api.github.com/users/DannyBen/events{/privacy}","received_events_url":"https://api.github.com/users/DannyBen/received_events","type":"User","site_admin":false},"created_at":"2016-03-11T22:05:43Z","updated_at":"2016-03-11T22:05:43Z","body":"Perhaps [this patch][1] can be the beginning of a solution?\r\nIt is working for me, but I am not sure if it is the ideal place to put it, and I have not created any specs for it.\r\n\r\n[1]: https://github.com/DannyBen/comma/commit/38699c38522ce3cd16e2b0c64b647b32264a9460"}}