{"action":"closed","issue":{"url":"https://api.github.com/repos/ropenscilabs/gtfsr/issues/19","repository_url":"https://api.github.com/repos/ropenscilabs/gtfsr","labels_url":"https://api.github.com/repos/ropenscilabs/gtfsr/issues/19/labels{/name}","comments_url":"https://api.github.com/repos/ropenscilabs/gtfsr/issues/19/comments","events_url":"https://api.github.com/repos/ropenscilabs/gtfsr/issues/19/events","html_url":"https://github.com/ropenscilabs/gtfsr/issues/19","id":176616674,"number":19,"title":"Import error if the gtfs-file encoding is `UTF-8 BOM`","user":{"login":"patperu","id":82020,"avatar_url":"https://avatars.githubusercontent.com/u/82020?v=3","gravatar_id":"","url":"https://api.github.com/users/patperu","html_url":"https://github.com/patperu","followers_url":"https://api.github.com/users/patperu/followers","following_url":"https://api.github.com/users/patperu/following{/other_user}","gists_url":"https://api.github.com/users/patperu/gists{/gist_id}","starred_url":"https://api.github.com/users/patperu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/patperu/subscriptions","organizations_url":"https://api.github.com/users/patperu/orgs","repos_url":"https://api.github.com/users/patperu/repos","events_url":"https://api.github.com/users/patperu/events{/privacy}","received_events_url":"https://api.github.com/users/patperu/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/ropenscilabs/gtfsr/labels/bug","name":"bug","color":"ee0701"}],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":5,"created_at":"2016-09-13T11:32:56Z","updated_at":"2016-09-30T04:18:08Z","closed_at":"2016-09-30T04:18:08Z","body":"Hello,\r\n`import_gtfs` fails if the encoding of a gtfs file is `UTF-8 BOM`. This is because the function use `readr::read_csv` with the default encoding in `locale`  set to `UTF-8`.\r\n\r\nExample:\r\n```R \r\n# source http://www.sardegnamobilita.it/opengovernment/opendata/\r\n# the encoding for `stop_times.txt` is `UTF-8 BOM`\r\nr <- import_gtfs(\"http://www.covimo.de/gtfs/dati_atpss.zip\")\r\n```\r\n\r\nNot sure what a solution could be - maybe make `locale` an argument in the function call? Most of the times all files of a gtfs dataset are of one type (BOM or not BOM).\r\n\r\nThank you for the package!\r\nPatrick"}}
{"actor":{"display_login":"ultinomics"}}