{"action":"created","issue":{"url":"https://api.github.com/repos/niosus/EasyClangComplete/issues/342","repository_url":"https://api.github.com/repos/niosus/EasyClangComplete","labels_url":"https://api.github.com/repos/niosus/EasyClangComplete/issues/342/labels{/name}","comments_url":"https://api.github.com/repos/niosus/EasyClangComplete/issues/342/comments","events_url":"https://api.github.com/repos/niosus/EasyClangComplete/issues/342/events","html_url":"https://github.com/niosus/EasyClangComplete/pull/342","id":269334119,"number":342,"title":"Fix macro parse bug for files containing non-ASCII characters","user":{"login":"kjteske","id":20820660,"avatar_url":"https://avatars2.githubusercontent.com/u/20820660?v=4","gravatar_id":"","url":"https://api.github.com/users/kjteske","html_url":"https://github.com/kjteske","followers_url":"https://api.github.com/users/kjteske/followers","following_url":"https://api.github.com/users/kjteske/following{/other_user}","gists_url":"https://api.github.com/users/kjteske/gists{/gist_id}","starred_url":"https://api.github.com/users/kjteske/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kjteske/subscriptions","organizations_url":"https://api.github.com/users/kjteske/orgs","repos_url":"https://api.github.com/users/kjteske/repos","events_url":"https://api.github.com/users/kjteske/events{/privacy}","received_events_url":"https://api.github.com/users/kjteske/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2017-10-28T17:18:26Z","updated_at":"2017-10-28T17:18:35Z","closed_at":null,"author_association":"CONTRIBUTOR","pull_request":{"url":"https://api.github.com/repos/niosus/EasyClangComplete/pulls/342","html_url":"https://github.com/niosus/EasyClangComplete/pull/342","diff_url":"https://github.com/niosus/EasyClangComplete/pull/342.diff","patch_url":"https://github.com/niosus/EasyClangComplete/pull/342.patch"},"body":"Before, reading files with non-ASCII characters would fail, i.e. a file\r\nwith a unicode copyright symbol in a comment:\r\n// ©\r\n#define MACRO() printf(\"foo\")\r\nMACRO();\r\n\r\nHovering over MACRO() would give this error in the console:\r\nERROR:concurrent.futures:exception calling callback for <Future at 0x10aa5b610 state=finished raised UnicodeDecodeError>\r\nTraceback (most recent call last):\r\n  File \"./python3.3/concurrent/futures/_base.py\", line 296, in _invoke_callbacks\r\n  File \"/Users/kyleteske/Library/Application Support/Sublime Text 3/Packages/EasyClangComplete/EasyClangComplete.py\", line 329, in info_finished\r\n    (tooltip_request, result) = future.result()\r\n  File \"./python3.3/concurrent/futures/_base.py\", line 394, in result\r\n  File \"./python3.3/concurrent/futures/_base.py\", line 353, in __get_result\r\n  File \"./python3.3/concurrent/futures/thread.py\", line 54, in run\r\n  File \"/Users/kyleteske/Library/Application Support/Sublime Text 3/Packages/EasyClangComplete/plugin/view_config.py\", line 403, in trigger_info\r\n    return config.completer.info(tooltip_request)\r\n  File \"/Users/kyleteske/Library/Application Support/Sublime Text 3/Packages/EasyClangComplete/plugin/completion/lib_complete.py\", line 274, in info\r\n    cursor.referenced, self.cindex)\r\n  File \"/Users/kyleteske/Library/Application Support/Sublime Text 3/Packages/EasyClangComplete/plugin/clang/utils.py\", line 300, in build_info_details\r\n    macro_parser = MacroParser(cursor.spelling, cursor.location)\r\n  File \"/Users/kyleteske/Library/Application Support/Sublime Text 3/Packages/EasyClangComplete/plugin/clang/utils.py\", line 43, in __init__\r\n    macro_file_lines = f.readlines()\r\n  File \"./python3.3/encodings/ascii.py\", line 26, in decode\r\nUnicodeDecodeError: 'ascii' codec can't decode byte 0xc2 in position 3: ordinal not in range(128)"},"comment":{"url":"https://api.github.com/repos/niosus/EasyClangComplete/issues/comments/340206379","html_url":"https://github.com/niosus/EasyClangComplete/pull/342#issuecomment-340206379","issue_url":"https://api.github.com/repos/niosus/EasyClangComplete/issues/342","id":340206379,"user":{"login":"maintainerd[bot]","id":29246572,"avatar_url":"https://avatars0.githubusercontent.com/in/2859?v=4","gravatar_id":"","url":"https://api.github.com/users/maintainerd%5Bbot%5D","html_url":"https://github.com/apps/maintainerd","followers_url":"https://api.github.com/users/maintainerd%5Bbot%5D/followers","following_url":"https://api.github.com/users/maintainerd%5Bbot%5D/following{/other_user}","gists_url":"https://api.github.com/users/maintainerd%5Bbot%5D/gists{/gist_id}","starred_url":"https://api.github.com/users/maintainerd%5Bbot%5D/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/maintainerd%5Bbot%5D/subscriptions","organizations_url":"https://api.github.com/users/maintainerd%5Bbot%5D/orgs","repos_url":"https://api.github.com/users/maintainerd%5Bbot%5D/repos","events_url":"https://api.github.com/users/maintainerd%5Bbot%5D/events{/privacy}","received_events_url":"https://api.github.com/users/maintainerd%5Bbot%5D/received_events","type":"Bot","site_admin":false},"created_at":"2017-10-28T17:18:35Z","updated_at":"2017-10-28T17:18:35Z","author_association":"NONE","body":"[maintainerd](http://maintainerd.divmain.com/) logging is enabled for this repository.\n\nAll actions related to rules and their enforcement will be logged here as a permanent record.\n\n---\n\n<details>\n<summary>Click to view log...</summary>\n<p>\n\n - `2017-10-28T17:18:35.246Z:030160a`: The pull request was created\n<!-- log tail -->\n\n</p></details>\n"}}
{"actor":{"display_login":"maintainerd"}}