{"action":"created","comment":{"url":"https://api.github.com/repos/ros2/rosidl/pulls/comments/305536946","pull_request_review_id":264447218,"id":305536946,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDMwNTUzNjk0Ng==","diff_hunk":"@@ -34,7 +34,20 @@ def generate_c(generator_arguments_file):\n         'idl__struct.h.em': '%s__struct.h',\n         'idl__type_support.h.em': '%s__type_support.h',\n     }\n-    generate_files(generator_arguments_file, mapping)\n+    generate_files(\n+        generator_arguments_file, mapping,\n+        post_process_callback=prefix_with_bom_if_necessary)\n+\n+\n+def prefix_with_bom_if_necessary(content):\n+    try:\n+        content.encode('ASCII')\n+    except UnicodeError:\n+        prefix = '\\ufeff' + \\","path":"rosidl_generator_c/rosidl_generator_c/__init__.py","position":14,"original_position":14,"commit_id":"2697181f1df5a9b6bd8e63786171985ff1bc276c","original_commit_id":"2697181f1df5a9b6bd8e63786171985ff1bc276c","user":{"login":"sloretz","id":4175662,"node_id":"MDQ6VXNlcjQxNzU2NjI=","avatar_url":"https://avatars1.githubusercontent.com/u/4175662?v=4","gravatar_id":"","url":"https://api.github.com/users/sloretz","html_url":"https://github.com/sloretz","followers_url":"https://api.github.com/users/sloretz/followers","following_url":"https://api.github.com/users/sloretz/following{/other_user}","gists_url":"https://api.github.com/users/sloretz/gists{/gist_id}","starred_url":"https://api.github.com/users/sloretz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sloretz/subscriptions","organizations_url":"https://api.github.com/users/sloretz/orgs","repos_url":"https://api.github.com/users/sloretz/repos","events_url":"https://api.github.com/users/sloretz/events{/privacy}","received_events_url":"https://api.github.com/users/sloretz/received_events","type":"User","site_admin":false},"body":"[2.13 Page 58 (pdf page 52)](https://www.unicode.org/versions/Unicode5.0.0/ch02.pdf) says the utf-8 BOM is `0xEF, 0xBB, 0xBF`. This looks like the UTF-16 BOM.","created_at":"2019-07-19T21:56:37Z","updated_at":"2019-07-19T21:58:48Z","html_url":"https://github.com/ros2/rosidl/pull/391#discussion_r305536946","pull_request_url":"https://api.github.com/repos/ros2/rosidl/pulls/391","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/ros2/rosidl/pulls/comments/305536946"},"html":{"href":"https://github.com/ros2/rosidl/pull/391#discussion_r305536946"},"pull_request":{"href":"https://api.github.com/repos/ros2/rosidl/pulls/391"}}},"pull_request":{"url":"https://api.github.com/repos/ros2/rosidl/pulls/391","id":299358625,"node_id":"MDExOlB1bGxSZXF1ZXN0Mjk5MzU4NjI1","html_url":"https://github.com/ros2/rosidl/pull/391","diff_url":"https://github.com/ros2/rosidl/pull/391.diff","patch_url":"https://github.com/ros2/rosidl/pull/391.patch","issue_url":"https://api.github.com/repos/ros2/rosidl/issues/391","number":391,"state":"open","locked":false,"title":"use utf-8 encoding when reading/writing expanded templates","user":{"login":"dirk-thomas","id":1335366,"node_id":"MDQ6VXNlcjEzMzUzNjY=","avatar_url":"https://avatars1.githubusercontent.com/u/1335366?v=4","gravatar_id":"","url":"https://api.github.com/users/dirk-thomas","html_url":"https://github.com/dirk-thomas","followers_url":"https://api.github.com/users/dirk-thomas/followers","following_url":"https://api.github.com/users/dirk-thomas/following{/other_user}","gists_url":"https://api.github.com/users/dirk-thomas/gists{/gist_id}","starred_url":"https://api.github.com/users/dirk-thomas/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dirk-thomas/subscriptions","organizations_url":"https://api.github.com/users/dirk-thomas/orgs","repos_url":"https://api.github.com/users/dirk-thomas/repos","events_url":"https://api.github.com/users/dirk-thomas/events{/privacy}","received_events_url":"https://api.github.com/users/dirk-thomas/received_events","type":"User","site_admin":false},"body":"Addresses the problem on Windows related to ros2/test_interface_files#8.\r\n\r\n[![Build Status](https://ci.ros2.org/buildStatus/icon?job=ci_windows&build=7438)](https://ci.ros2.org/job/ci_windows/7438/) (only passed because these tests are disabled: ros2/system_tests#377).","created_at":"2019-07-19T14:28:22Z","updated_at":"2019-07-19T21:58:48Z","closed_at":null,"merged_at":null,"merge_commit_sha":"c7c651f15d025042dc0861563faa69b6e2466493","assignee":{"login":"dirk-thomas","id":1335366,"node_id":"MDQ6VXNlcjEzMzUzNjY=","avatar_url":"https://avatars1.githubusercontent.com/u/1335366?v=4","gravatar_id":"","url":"https://api.github.com/users/dirk-thomas","html_url":"https://github.com/dirk-thomas","followers_url":"https://api.github.com/users/dirk-thomas/followers","following_url":"https://api.github.com/users/dirk-thomas/following{/other_user}","gists_url":"https://api.github.com/users/dirk-thomas/gists{/gist_id}","starred_url":"https://api.github.com/users/dirk-thomas/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dirk-thomas/subscriptions","organizations_url":"https://api.github.com/users/dirk-thomas/orgs","repos_url":"https://api.github.com/users/dirk-thomas/repos","events_url":"https://api.github.com/users/dirk-thomas/events{/privacy}","received_events_url":"https://api.github.com/users/dirk-thomas/received_events","type":"User","site_admin":false},"assignees":[{"login":"dirk-thomas","id":1335366,"node_id":"MDQ6VXNlcjEzMzUzNjY=","avatar_url":"https://avatars1.githubusercontent.com/u/1335366?v=4","gravatar_id":"","url":"https://api.github.com/users/dirk-thomas","html_url":"https://github.com/dirk-thomas","followers_url":"https://api.github.com/users/dirk-thomas/followers","following_url":"https://api.github.com/users/dirk-thomas/following{/other_user}","gists_url":"https://api.github.com/users/dirk-thomas/gists{/gist_id}","starred_url":"https://api.github.com/users/dirk-thomas/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dirk-thomas/subscriptions","organizations_url":"https://api.github.com/users/dirk-thomas/orgs","repos_url":"https://api.github.com/users/dirk-thomas/repos","events_url":"https://api.github.com/users/dirk-thomas/events{/privacy}","received_events_url":"https://api.github.com/users/dirk-thomas/received_events","type":"User","site_admin":false}],"requested_reviewers":[],"requested_teams":[],"labels":[{"id":113361321,"node_id":"MDU6TGFiZWwxMTMzNjEzMjE=","url":"https://api.github.com/repos/ros2/rosidl/labels/bug","name":"bug","color":"d73a4a","default":true},{"id":180241239,"node_id":"MDU6TGFiZWwxODAyNDEyMzk=","url":"https://api.github.com/repos/ros2/rosidl/labels/in%20review","name":"in review","color":"388be2","default":false}],"milestone":null,"commits_url":"https://api.github.com/repos/ros2/rosidl/pulls/391/commits","review_comments_url":"https://api.github.com/repos/ros2/rosidl/pulls/391/comments","review_comment_url":"https://api.github.com/repos/ros2/rosidl/pulls/comments{/number}","comments_url":"https://api.github.com/repos/ros2/rosidl/issues/391/comments","statuses_url":"https://api.github.com/repos/ros2/rosidl/statuses/2697181f1df5a9b6bd8e63786171985ff1bc276c","head":{"label":"ros2:dirk-thomas/bom-generated-code","ref":"dirk-thomas/bom-generated-code","sha":"2697181f1df5a9b6bd8e63786171985ff1bc276c","user":{"login":"ros2","id":3979232,"node_id":"MDEyOk9yZ2FuaXphdGlvbjM5NzkyMzI=","avatar_url":"https://avatars1.githubusercontent.com/u/3979232?v=4","gravatar_id":"","url":"https://api.github.com/users/ros2","html_url":"https://github.com/ros2","followers_url":"https://api.github.com/users/ros2/followers","following_url":"https://api.github.com/users/ros2/following{/other_user}","gists_url":"https://api.github.com/users/ros2/gists{/gist_id}","starred_url":"https://api.github.com/users/ros2/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ros2/subscriptions","organizations_url":"https://api.github.com/users/ros2/orgs","repos_url":"https://api.github.com/users/ros2/repos","events_url":"https://api.github.com/users/ros2/events{/privacy}","received_events_url":"https://api.github.com/users/ros2/received_events","type":"Organization","site_admin":false},"repo":{"id":21748344,"node_id":"MDEwOlJlcG9zaXRvcnkyMTc0ODM0NA==","name":"rosidl","full_name":"ros2/rosidl","private":false,"owner":{"login":"ros2","id":3979232,"node_id":"MDEyOk9yZ2FuaXphdGlvbjM5NzkyMzI=","avatar_url":"https://avatars1.githubusercontent.com/u/3979232?v=4","gravatar_id":"","url":"https://api.github.com/users/ros2","html_url":"https://github.com/ros2","followers_url":"https://api.github.com/users/ros2/followers","following_url":"https://api.github.com/users/ros2/following{/other_user}","gists_url":"https://api.github.com/users/ros2/gists{/gist_id}","starred_url":"https://api.github.com/users/ros2/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ros2/subscriptions","organizations_url":"https://api.github.com/users/ros2/orgs","repos_url":"https://api.github.com/users/ros2/repos","events_url":"https://api.github.com/users/ros2/events{/privacy}","received_events_url":"https://api.github.com/users/ros2/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/ros2/rosidl","description":"Packages which provide the ROS IDL (.msg) definition and code generation.","fork":false,"url":"https://api.github.com/repos/ros2/rosidl","forks_url":"https://api.github.com/repos/ros2/rosidl/forks","keys_url":"https://api.github.com/repos/ros2/rosidl/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ros2/rosidl/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ros2/rosidl/teams","hooks_url":"https://api.github.com/repos/ros2/rosidl/hooks","issue_events_url":"https://api.github.com/repos/ros2/rosidl/issues/events{/number}","events_url":"https://api.github.com/repos/ros2/rosidl/events","assignees_url":"https://api.github.com/repos/ros2/rosidl/assignees{/user}","branches_url":"https://api.github.com/repos/ros2/rosidl/branches{/branch}","tags_url":"https://api.github.com/repos/ros2/rosidl/tags","blobs_url":"https://api.github.com/repos/ros2/rosidl/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ros2/rosidl/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ros2/rosidl/git/refs{/sha}","trees_url":"https://api.github.com/repos/ros2/rosidl/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ros2/rosidl/statuses/{sha}","languages_url":"https://api.github.com/repos/ros2/rosidl/languages","stargazers_url":"https://api.github.com/repos/ros2/rosidl/stargazers","contributors_url":"https://api.github.com/repos/ros2/rosidl/contributors","subscribers_url":"https://api.github.com/repos/ros2/rosidl/subscribers","subscription_url":"https://api.github.com/repos/ros2/rosidl/subscription","commits_url":"https://api.github.com/repos/ros2/rosidl/commits{/sha}","git_commits_url":"https://api.github.com/repos/ros2/rosidl/git/commits{/sha}","comments_url":"https://api.github.com/repos/ros2/rosidl/comments{/number}","issue_comment_url":"https://api.github.com/repos/ros2/rosidl/issues/comments{/number}","contents_url":"https://api.github.com/repos/ros2/rosidl/contents/{+path}","compare_url":"https://api.github.com/repos/ros2/rosidl/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ros2/rosidl/merges","archive_url":"https://api.github.com/repos/ros2/rosidl/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ros2/rosidl/downloads","issues_url":"https://api.github.com/repos/ros2/rosidl/issues{/number}","pulls_url":"https://api.github.com/repos/ros2/rosidl/pulls{/number}","milestones_url":"https://api.github.com/repos/ros2/rosidl/milestones{/number}","notifications_url":"https://api.github.com/repos/ros2/rosidl/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ros2/rosidl/labels{/name}","releases_url":"https://api.github.com/repos/ros2/rosidl/releases{/id}","deployments_url":"https://api.github.com/repos/ros2/rosidl/deployments","created_at":"2014-07-11T19:19:18Z","updated_at":"2019-07-19T16:20:05Z","pushed_at":"2019-07-19T21:14:19Z","git_url":"git://github.com/ros2/rosidl.git","ssh_url":"git@github.com:ros2/rosidl.git","clone_url":"https://github.com/ros2/rosidl.git","svn_url":"https://github.com/ros2/rosidl","homepage":"","size":1086,"stargazers_count":8,"watchers_count":8,"language":"Python","has_issues":true,"has_projects":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":32,"mirror_url":null,"archived":false,"disabled":false,"open_issues_count":27,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0","node_id":"MDc6TGljZW5zZTI="},"forks":32,"open_issues":27,"watchers":8,"default_branch":"master"}},"base":{"label":"ros2:master","ref":"master","sha":"961dcdad4483f271c4e047de223a53551333f8ba","user":{"login":"ros2","id":3979232,"node_id":"MDEyOk9yZ2FuaXphdGlvbjM5NzkyMzI=","avatar_url":"https://avatars1.githubusercontent.com/u/3979232?v=4","gravatar_id":"","url":"https://api.github.com/users/ros2","html_url":"https://github.com/ros2","followers_url":"https://api.github.com/users/ros2/followers","following_url":"https://api.github.com/users/ros2/following{/other_user}","gists_url":"https://api.github.com/users/ros2/gists{/gist_id}","starred_url":"https://api.github.com/users/ros2/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ros2/subscriptions","organizations_url":"https://api.github.com/users/ros2/orgs","repos_url":"https://api.github.com/users/ros2/repos","events_url":"https://api.github.com/users/ros2/events{/privacy}","received_events_url":"https://api.github.com/users/ros2/received_events","type":"Organization","site_admin":false},"repo":{"id":21748344,"node_id":"MDEwOlJlcG9zaXRvcnkyMTc0ODM0NA==","name":"rosidl","full_name":"ros2/rosidl","private":false,"owner":{"login":"ros2","id":3979232,"node_id":"MDEyOk9yZ2FuaXphdGlvbjM5NzkyMzI=","avatar_url":"https://avatars1.githubusercontent.com/u/3979232?v=4","gravatar_id":"","url":"https://api.github.com/users/ros2","html_url":"https://github.com/ros2","followers_url":"https://api.github.com/users/ros2/followers","following_url":"https://api.github.com/users/ros2/following{/other_user}","gists_url":"https://api.github.com/users/ros2/gists{/gist_id}","starred_url":"https://api.github.com/users/ros2/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ros2/subscriptions","organizations_url":"https://api.github.com/users/ros2/orgs","repos_url":"https://api.github.com/users/ros2/repos","events_url":"https://api.github.com/users/ros2/events{/privacy}","received_events_url":"https://api.github.com/users/ros2/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/ros2/rosidl","description":"Packages which provide the ROS IDL (.msg) definition and code generation.","fork":false,"url":"https://api.github.com/repos/ros2/rosidl","forks_url":"https://api.github.com/repos/ros2/rosidl/forks","keys_url":"https://api.github.com/repos/ros2/rosidl/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ros2/rosidl/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ros2/rosidl/teams","hooks_url":"https://api.github.com/repos/ros2/rosidl/hooks","issue_events_url":"https://api.github.com/repos/ros2/rosidl/issues/events{/number}","events_url":"https://api.github.com/repos/ros2/rosidl/events","assignees_url":"https://api.github.com/repos/ros2/rosidl/assignees{/user}","branches_url":"https://api.github.com/repos/ros2/rosidl/branches{/branch}","tags_url":"https://api.github.com/repos/ros2/rosidl/tags","blobs_url":"https://api.github.com/repos/ros2/rosidl/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ros2/rosidl/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ros2/rosidl/git/refs{/sha}","trees_url":"https://api.github.com/repos/ros2/rosidl/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ros2/rosidl/statuses/{sha}","languages_url":"https://api.github.com/repos/ros2/rosidl/languages","stargazers_url":"https://api.github.com/repos/ros2/rosidl/stargazers","contributors_url":"https://api.github.com/repos/ros2/rosidl/contributors","subscribers_url":"https://api.github.com/repos/ros2/rosidl/subscribers","subscription_url":"https://api.github.com/repos/ros2/rosidl/subscription","commits_url":"https://api.github.com/repos/ros2/rosidl/commits{/sha}","git_commits_url":"https://api.github.com/repos/ros2/rosidl/git/commits{/sha}","comments_url":"https://api.github.com/repos/ros2/rosidl/comments{/number}","issue_comment_url":"https://api.github.com/repos/ros2/rosidl/issues/comments{/number}","contents_url":"https://api.github.com/repos/ros2/rosidl/contents/{+path}","compare_url":"https://api.github.com/repos/ros2/rosidl/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ros2/rosidl/merges","archive_url":"https://api.github.com/repos/ros2/rosidl/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ros2/rosidl/downloads","issues_url":"https://api.github.com/repos/ros2/rosidl/issues{/number}","pulls_url":"https://api.github.com/repos/ros2/rosidl/pulls{/number}","milestones_url":"https://api.github.com/repos/ros2/rosidl/milestones{/number}","notifications_url":"https://api.github.com/repos/ros2/rosidl/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ros2/rosidl/labels{/name}","releases_url":"https://api.github.com/repos/ros2/rosidl/releases{/id}","deployments_url":"https://api.github.com/repos/ros2/rosidl/deployments","created_at":"2014-07-11T19:19:18Z","updated_at":"2019-07-19T16:20:05Z","pushed_at":"2019-07-19T21:14:19Z","git_url":"git://github.com/ros2/rosidl.git","ssh_url":"git@github.com:ros2/rosidl.git","clone_url":"https://github.com/ros2/rosidl.git","svn_url":"https://github.com/ros2/rosidl","homepage":"","size":1086,"stargazers_count":8,"watchers_count":8,"language":"Python","has_issues":true,"has_projects":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":32,"mirror_url":null,"archived":false,"disabled":false,"open_issues_count":27,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0","node_id":"MDc6TGljZW5zZTI="},"forks":32,"open_issues":27,"watchers":8,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/ros2/rosidl/pulls/391"},"html":{"href":"https://github.com/ros2/rosidl/pull/391"},"issue":{"href":"https://api.github.com/repos/ros2/rosidl/issues/391"},"comments":{"href":"https://api.github.com/repos/ros2/rosidl/issues/391/comments"},"review_comments":{"href":"https://api.github.com/repos/ros2/rosidl/pulls/391/comments"},"review_comment":{"href":"https://api.github.com/repos/ros2/rosidl/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/ros2/rosidl/pulls/391/commits"},"statuses":{"href":"https://api.github.com/repos/ros2/rosidl/statuses/2697181f1df5a9b6bd8e63786171985ff1bc276c"}},"author_association":"MEMBER"}}
{"actor":{"display_login":"sloretz"}}