{"action":"closed","issue":{"url":"https://api.github.com/repos/tomchristie/mkdocs/issues/362","labels_url":"https://api.github.com/repos/tomchristie/mkdocs/issues/362/labels{/name}","comments_url":"https://api.github.com/repos/tomchristie/mkdocs/issues/362/comments","events_url":"https://api.github.com/repos/tomchristie/mkdocs/issues/362/events","html_url":"https://github.com/tomchristie/mkdocs/issues/362","id":60529653,"number":362,"title":"Windows UTF-8 woes","user":{"login":"johnstevenson","id":881777,"avatar_url":"https://avatars.githubusercontent.com/u/881777?v=3","gravatar_id":"","url":"https://api.github.com/users/johnstevenson","html_url":"https://github.com/johnstevenson","followers_url":"https://api.github.com/users/johnstevenson/followers","following_url":"https://api.github.com/users/johnstevenson/following{/other_user}","gists_url":"https://api.github.com/users/johnstevenson/gists{/gist_id}","starred_url":"https://api.github.com/users/johnstevenson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/johnstevenson/subscriptions","organizations_url":"https://api.github.com/users/johnstevenson/orgs","repos_url":"https://api.github.com/users/johnstevenson/repos","events_url":"https://api.github.com/users/johnstevenson/events{/privacy}","received_events_url":"https://api.github.com/users/johnstevenson/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/tomchristie/mkdocs/labels/Bug","name":"Bug","color":"fc2929"}],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2015-03-10T16:39:56Z","updated_at":"2015-03-17T11:36:11Z","closed_at":"2015-03-17T11:36:11Z","body":"Windows 8.1\r\nPython 3.4.3\r\nmkdocs 0.11.1\r\n\r\nUTF-8 characters are not recognized, because system code-page character-mapping is being used: `cp1252.py`\r\n\r\nUsing this `mkdocs.yml`\r\n\r\n```yml\r\nsite_name: “My Docs”\r\n```\r\nI get the following error:\r\n\r\n> File \"C:\\Python34\\lib\\encodings\\cp1252.py\", line 23, in decode\r\n    return codecs.charmap_decode(input,self.errors,decoding_table)[0]\r\n    UnicodeDecodeError: 'charmap' codec can't decode byte 0x9d in position 19: character maps to \\<undefined\\>\r\n\r\nObviously, similar errors are returned if any of the `.md` files contain UTF-8 characters.\r\n\r\nI have hacked a personal fix (I am not a Python dev) by changing https://github.com/tomchristie/mkdocs/blob/455c1a66dbc77960893ad371d76dae0fa59bfa96/mkdocs/build.py#L206\r\n\r\n```\r\ninput_content = open(input_path, 'r', encoding='utf8').read()\r\n```\r\nand https://github.com/tomchristie/mkdocs/blob/455c1a66dbc77960893ad371d76dae0fa59bfa96/mkdocs/config.py#L80\r\n\r\n```\r\nwith open(filename, 'r', encoding='utf8') as fp:\r\n```\r\n**Big BUT**\r\nNow we get an error after using the `new` command to create the default files, because `index.md` contains a UTF-8 character (`c2 a0 NO-BREAK SPACE`) that the parser doesn't like :\r\n\r\n>File \"C:\\Python34\\lib\\codecs.py\", line 319, in decode\r\n    (result, consumed) = self._buffer_decode(data, self.errors, final)\r\nUnicodeDecodeError: 'utf-8' codec can't decode byte 0xa0 in position 348: invalid start byte\r\n\r\nIt is here: https://github.com/tomchristie/mkdocs/blob/455c1a66dbc77960893ad371d76dae0fa59bfa96/mkdocs/new.py#L19\r\n\r\n```\r\n## Project layout\r\n\r\n    mkdocs.yml # The configuration file.\r\n                ^\r\n```\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n"}}