{"action":"opened","issue":{"url":"https://api.github.com/repos/wangyixiang/SomeWorks/issues/1","repository_url":"https://api.github.com/repos/wangyixiang/SomeWorks","labels_url":"https://api.github.com/repos/wangyixiang/SomeWorks/issues/1/labels{/name}","comments_url":"https://api.github.com/repos/wangyixiang/SomeWorks/issues/1/comments","events_url":"https://api.github.com/repos/wangyixiang/SomeWorks/issues/1/events","html_url":"https://github.com/wangyixiang/SomeWorks/issues/1","id":143421065,"number":1,"title":"In work owneranalyzer, python 2 mbcs conversion may make file name messy.","user":{"login":"wangyixiang","id":884412,"avatar_url":"https://avatars.githubusercontent.com/u/884412?v=3","gravatar_id":"","url":"https://api.github.com/users/wangyixiang","html_url":"https://github.com/wangyixiang","followers_url":"https://api.github.com/users/wangyixiang/followers","following_url":"https://api.github.com/users/wangyixiang/following{/other_user}","gists_url":"https://api.github.com/users/wangyixiang/gists{/gist_id}","starred_url":"https://api.github.com/users/wangyixiang/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wangyixiang/subscriptions","organizations_url":"https://api.github.com/users/wangyixiang/orgs","repos_url":"https://api.github.com/users/wangyixiang/repos","events_url":"https://api.github.com/users/wangyixiang/events{/privacy}","received_events_url":"https://api.github.com/users/wangyixiang/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2016-03-25T04:27:59Z","updated_at":"2016-03-25T04:27:59Z","closed_at":null,"body":"In the file server's file system, the files came from different region. \r\nFor Example:\r\n[The Japanese character \"Middle dot\" which called \"katakana middle dot\"](http://www.fileformat.info/info/unicode/char/30fb/index.htm)\r\n(http://graphemica.com/%E3%83%BB)\r\n\r\nthis dot in the file name, on the windows, it's UTF-16  encoded, so os.listdir(u\".\") will list\r\nthe file name as u\"\\u30fb\".\r\nu\"\\u30fb\".encode(\"mbcs\") -> \"\\x3f\", my code page is 936, and it will not be able to reserve to u\"\\u30fb\" through u\"\\u30fb\".encode(\"mbcs\").decode(\"mbcs\").\r\n\r\nIf I use python2 subprocess module which not supporting Unicode to invoke check_output to invoke \"getowner.exe\" on such a file, \"getowner.exe\" will not be able to find the file which getting through python.(\"getowner.exe\" is Unicode-based.)\r\n\r\nTo solve this problem, there're ways, I think the simplest way is to use python 3 which support unicode in the core."}}