{"action":"created","issue":{"url":"https://api.github.com/repos/toyamaprog/learning-haskell/issues/1","labels_url":"https://api.github.com/repos/toyamaprog/learning-haskell/issues/1/labels{/name}","comments_url":"https://api.github.com/repos/toyamaprog/learning-haskell/issues/1/comments","events_url":"https://api.github.com/repos/toyamaprog/learning-haskell/issues/1/events","html_url":"https://github.com/toyamaprog/learning-haskell/issues/1","id":55042212,"number":1,"title":"Windows の Vim QuickRun で日本語を出力すると文字化けする","user":{"login":"tobynet","id":20859,"avatar_url":"https://avatars.githubusercontent.com/u/20859?v=3","gravatar_id":"","url":"https://api.github.com/users/tobynet","html_url":"https://github.com/tobynet","followers_url":"https://api.github.com/users/tobynet/followers","following_url":"https://api.github.com/users/tobynet/following{/other_user}","gists_url":"https://api.github.com/users/tobynet/gists{/gist_id}","starred_url":"https://api.github.com/users/tobynet/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tobynet/subscriptions","organizations_url":"https://api.github.com/users/tobynet/orgs","repos_url":"https://api.github.com/users/tobynet/repos","events_url":"https://api.github.com/users/tobynet/events{/privacy}","received_events_url":"https://api.github.com/users/tobynet/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-01-21T16:32:58Z","updated_at":"2015-01-22T08:16:58Z","closed_at":null,"body":"```haskell\r\n-- test.hs\r\nmain = do\r\n    putStrLn \"(J●＋●Y)\"\r\n    putStrLn \"私はジャバマックス\"\r\n```\r\n\r\nVim QuickRun on Windows:\r\n\r\n文字化け...\r\n\r\n```\r\n(J{Y)\r\n̓Wo}bNX\r\n```\r\n\r\nrunghc.exe on PowerShell\r\n\r\n```\r\n> runghc.exe test.hs\r\n(J●＋●Y)\r\n私はジャバマックス\r\n```\r\n\r\n----\r\n\r\nUbuntu 12.04 on VM\r\n\r\n* 特に問題なし(●の文字幅以外)\r\n"},"comment":{"url":"https://api.github.com/repos/toyamaprog/learning-haskell/issues/comments/70985462","html_url":"https://github.com/toyamaprog/learning-haskell/issues/1#issuecomment-70985462","issue_url":"https://api.github.com/repos/toyamaprog/learning-haskell/issues/1","id":70985462,"user":{"login":"tobynet","id":20859,"avatar_url":"https://avatars.githubusercontent.com/u/20859?v=3","gravatar_id":"","url":"https://api.github.com/users/tobynet","html_url":"https://github.com/tobynet","followers_url":"https://api.github.com/users/tobynet/followers","following_url":"https://api.github.com/users/tobynet/following{/other_user}","gists_url":"https://api.github.com/users/tobynet/gists{/gist_id}","starred_url":"https://api.github.com/users/tobynet/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tobynet/subscriptions","organizations_url":"https://api.github.com/users/tobynet/orgs","repos_url":"https://api.github.com/users/tobynet/repos","events_url":"https://api.github.com/users/tobynet/events{/privacy}","received_events_url":"https://api.github.com/users/tobynet/received_events","type":"User","site_admin":false},"created_at":"2015-01-22T08:16:58Z","updated_at":"2015-01-22T08:16:58Z","body":"Windows では Haskell の処理系は cp932を返してくるようなので、 QuickRun 用にエンコーディング設定を追加することで、一応回避は可能。\r\n\r\n.vimrc\r\n\r\n``` Vim\r\n\" Prevent corruptions of output in Haskell\r\nif has('win32') || has('win64')\r\n    let g:quickrun_config['haskell'] = { \r\n    \\   \"hook/output_encode/enable\" : 1,\r\n    \\   \"hook/output_encode/encoding\" : \"cp932\",\r\n    \\}\r\nendif\r\n```\r\n\r\nただし、 cp932なので出力に **「☃」「𠮷」などが表示されないなどの不具合は残る**"}}