{"action":"created","issue":{"url":"https://api.github.com/repos/jgm/pandoc/issues/2101","labels_url":"https://api.github.com/repos/jgm/pandoc/issues/2101/labels{/name}","comments_url":"https://api.github.com/repos/jgm/pandoc/issues/2101/comments","events_url":"https://api.github.com/repos/jgm/pandoc/issues/2101/events","html_url":"https://github.com/jgm/pandoc/issues/2101","id":69674370,"number":2101,"title":"Windows: En dashes break custom Lua output","user":{"login":"jmcphers","id":470418,"avatar_url":"https://avatars.githubusercontent.com/u/470418?v=3","gravatar_id":"","url":"https://api.github.com/users/jmcphers","html_url":"https://github.com/jmcphers","followers_url":"https://api.github.com/users/jmcphers/followers","following_url":"https://api.github.com/users/jmcphers/following{/other_user}","gists_url":"https://api.github.com/users/jmcphers/gists{/gist_id}","starred_url":"https://api.github.com/users/jmcphers/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jmcphers/subscriptions","organizations_url":"https://api.github.com/users/jmcphers/orgs","repos_url":"https://api.github.com/users/jmcphers/repos","events_url":"https://api.github.com/users/jmcphers/events{/privacy}","received_events_url":"https://api.github.com/users/jmcphers/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":5,"created_at":"2015-04-20T20:32:51Z","updated_at":"2015-04-20T23:41:02Z","closed_at":null,"body":"Repro:\r\n\r\nSave this as `score.md`, with UTF-8 encoding (note that it contains an en dash):\r\n\r\n    The score was 4—15. \r\n\r\nRun Pandoc using its sample Lua custom writer:\r\n\r\n    C:\\> pandoc score.md -t sample.lua\r\n\r\nResult:\r\n\r\n    pandoc.exe: Cannot decode byte '\\xe2': Data.Text.Internal.Encoding.Fusion.streamUtf8: Invalid UTF-8 stream\r\n\r\nThe same is true for many other Unicode characters (such as non-breaking spaces and many/most other non-ASCII characters). This may be a dupe of https://github.com/jgm/pandoc/issues/1634; it's not clear why that issue was closed.\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/jgm/pandoc/issues/comments/94593179","html_url":"https://github.com/jgm/pandoc/issues/2101#issuecomment-94593179","issue_url":"https://api.github.com/repos/jgm/pandoc/issues/2101","id":94593179,"user":{"login":"jmcphers","id":470418,"avatar_url":"https://avatars.githubusercontent.com/u/470418?v=3","gravatar_id":"","url":"https://api.github.com/users/jmcphers","html_url":"https://github.com/jmcphers","followers_url":"https://api.github.com/users/jmcphers/followers","following_url":"https://api.github.com/users/jmcphers/following{/other_user}","gists_url":"https://api.github.com/users/jmcphers/gists{/gist_id}","starred_url":"https://api.github.com/users/jmcphers/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jmcphers/subscriptions","organizations_url":"https://api.github.com/users/jmcphers/orgs","repos_url":"https://api.github.com/users/jmcphers/repos","events_url":"https://api.github.com/users/jmcphers/events{/privacy}","received_events_url":"https://api.github.com/users/jmcphers/received_events","type":"User","site_admin":false},"created_at":"2015-04-20T23:41:02Z","updated_at":"2015-04-20T23:41:02Z","body":"It's definitely Windows only; I can't reproduce it on any other system. \r\n\r\nI think the reason you're not reproducing it is that the Win32 shell is automatically converting your en dash into a regular hyphen:\r\n\r\nC:\\downloads>echo \"The score was 4—15.\" > score.md\r\nC:\\downloads>type score.md\r\n\"The score was 4-15.\"\r\n\r\nHere's a gist of score.md, if that helps:\r\n\r\nhttps://gist.github.com/anonymous/bb3c2a7a8aab8afbb311"}}