{"action":"created","issue":{"url":"https://api.github.com/repos/ros/genpy/issues/34","labels_url":"https://api.github.com/repos/ros/genpy/issues/34/labels{/name}","comments_url":"https://api.github.com/repos/ros/genpy/issues/34/comments","events_url":"https://api.github.com/repos/ros/genpy/issues/34/events","html_url":"https://github.com/ros/genpy/pull/34","id":53596308,"number":34,"title":"pretty print non-ascii string in list-type message","user":{"login":"furushchev","id":1901008,"avatar_url":"https://avatars.githubusercontent.com/u/1901008?v=3","gravatar_id":"","url":"https://api.github.com/users/furushchev","html_url":"https://github.com/furushchev","followers_url":"https://api.github.com/users/furushchev/followers","following_url":"https://api.github.com/users/furushchev/following{/other_user}","gists_url":"https://api.github.com/users/furushchev/gists{/gist_id}","starred_url":"https://api.github.com/users/furushchev/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/furushchev/subscriptions","organizations_url":"https://api.github.com/users/furushchev/orgs","repos_url":"https://api.github.com/users/furushchev/repos","events_url":"https://api.github.com/users/furushchev/events{/privacy}","received_events_url":"https://api.github.com/users/furushchev/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-01-07T04:22:41Z","updated_at":"2015-01-07T04:23:13Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/ros/genpy/pulls/34","html_url":"https://github.com/ros/genpy/pull/34","diff_url":"https://github.com/ros/genpy/pull/34.diff","patch_url":"https://github.com/ros/genpy/pull/34.patch"},"body":"By this change, we can see non-ascii string human readably in list-type or tuple-type message.\r\n\r\ntest script:\r\n\r\n1. run the script that publishes non-ascii string.\r\n\r\n```python\r\n# test.py\r\n# -*- coding: utf-8 -*-\r\n\r\nimport rospy\r\nfrom test.msg import StringArray # this message has string[] data\r\n\r\nrospy.init_node(\"foo\")\r\npub = rospy.Publisher(\"/string\", StringArray)\r\nwhile not rospy.is_shutdown():\r\n    msg = StringArray()\r\n    msg.data = [\"ほげ\", \"ふが\", \"ბარ\", \"кот\", \"foo\"]\r\n    pub.publish(msg)\r\n    rospy.sleep(1.0)\r\n```\r\n\r\n```bash\r\n$ roscore &\r\n$ python test.py\r\n```\r\n\r\n2. in another terminal, `rostopic echo`\r\n\r\n**BEFORE**\r\n\r\n```bash\r\n$ rostopic echo /string\r\ndata: ['\\xe3\\x81\\xbb\\xe3\\x81\\x92', '\\xe3\\x81\\xb5\\xe3\\x81\\x8c', '\\xe1\\x83\\x91\\xe1\\x83\\x90\\xe1\\x83\\xa0', '\\xd0\\xba\\xd0\\xbe\\xd1\\x82', 'foo']\r\n---\r\n```\r\n\r\n**AFTER**\r\n\r\n```bash\r\n$ rostopic echo /string\r\ndata: ['ほげ', 'ふが', 'ბარ', 'кот', 'foo']\r\n---\r\n```"},"comment":{"url":"https://api.github.com/repos/ros/genpy/issues/comments/68977382","html_url":"https://github.com/ros/genpy/pull/34#issuecomment-68977382","issue_url":"https://api.github.com/repos/ros/genpy/issues/34","id":68977382,"user":{"login":"furushchev","id":1901008,"avatar_url":"https://avatars.githubusercontent.com/u/1901008?v=3","gravatar_id":"","url":"https://api.github.com/users/furushchev","html_url":"https://github.com/furushchev","followers_url":"https://api.github.com/users/furushchev/followers","following_url":"https://api.github.com/users/furushchev/following{/other_user}","gists_url":"https://api.github.com/users/furushchev/gists{/gist_id}","starred_url":"https://api.github.com/users/furushchev/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/furushchev/subscriptions","organizations_url":"https://api.github.com/users/furushchev/orgs","repos_url":"https://api.github.com/users/furushchev/repos","events_url":"https://api.github.com/users/furushchev/events{/privacy}","received_events_url":"https://api.github.com/users/furushchev/received_events","type":"User","site_admin":false},"created_at":"2015-01-07T04:23:13Z","updated_at":"2015-01-07T04:23:13Z","body":"BTW, where is the repo for hydro?"}}