{"action":"created","issue":{"url":"https://api.github.com/repos/freeorion/freeorion/issues/492","repository_url":"https://api.github.com/repos/freeorion/freeorion","labels_url":"https://api.github.com/repos/freeorion/freeorion/issues/492/labels{/name}","comments_url":"https://api.github.com/repos/freeorion/freeorion/issues/492/comments","events_url":"https://api.github.com/repos/freeorion/freeorion/issues/492/events","html_url":"https://github.com/freeorion/freeorion/issues/492","id":135239362,"number":492,"title":"[AI] return universeObject.name as unicode","user":{"login":"Cjkjvfnby","id":171597,"avatar_url":"https://avatars.githubusercontent.com/u/171597?v=3","gravatar_id":"","url":"https://api.github.com/users/Cjkjvfnby","html_url":"https://github.com/Cjkjvfnby","followers_url":"https://api.github.com/users/Cjkjvfnby/followers","following_url":"https://api.github.com/users/Cjkjvfnby/following{/other_user}","gists_url":"https://api.github.com/users/Cjkjvfnby/gists{/gist_id}","starred_url":"https://api.github.com/users/Cjkjvfnby/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Cjkjvfnby/subscriptions","organizations_url":"https://api.github.com/users/Cjkjvfnby/orgs","repos_url":"https://api.github.com/users/Cjkjvfnby/repos","events_url":"https://api.github.com/users/Cjkjvfnby/events{/privacy}","received_events_url":"https://api.github.com/users/Cjkjvfnby/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/freeorion/freeorion/labels/feature","name":"feature","color":"006b75"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":4,"created_at":"2016-02-21T18:27:50Z","updated_at":"2016-02-25T13:36:11Z","closed_at":null,"body":"If name contains greek letters it is returned like that  `Plato \\xce\\xb2 III` and prints as `Plato β III`\r\n\r\nIn case that we want to print text to log like in tables we will have broken aligment.\r\n\r\nI tested it on **windows**, may be other platforms have different behavior\r\n\r\nHere is some example code:\r\n```python\r\na = 'Plato \\xce\\xb2 III'  # str with greek like it returned in game\r\nb = a.decode('utf-8')     # unicode\r\nc = 'Plato B III'         # str without greek\r\n\r\nprint len(a), len(b), len(c)\r\n> 12 11 11\r\nprint a, b, c\r\n> Plato β III Plato β III Plato B III\r\nprint [a, b, c]  # still need to avoid of print it in lists\r\n> ['Plato \\xce\\xb2 III', u'Plato \\u03b2 III', 'Plato B III']\r\nprint '%-15s planet' % a\r\nprint '%-15s planet' % b\r\nprint '%-15s planet' % c\r\n> Plato β III    planet\r\n> Plato β III     planet\r\n> Plato B III     planet\r\n```\r\n\r\nPS you can find example in log after string `System Threat Assessments`\r\n"},"comment":{"url":"https://api.github.com/repos/freeorion/freeorion/issues/comments/188787637","html_url":"https://github.com/freeorion/freeorion/issues/492#issuecomment-188787637","issue_url":"https://api.github.com/repos/freeorion/freeorion/issues/492","id":188787637,"user":{"login":"Vezzra","id":10279417,"avatar_url":"https://avatars.githubusercontent.com/u/10279417?v=3","gravatar_id":"","url":"https://api.github.com/users/Vezzra","html_url":"https://github.com/Vezzra","followers_url":"https://api.github.com/users/Vezzra/followers","following_url":"https://api.github.com/users/Vezzra/following{/other_user}","gists_url":"https://api.github.com/users/Vezzra/gists{/gist_id}","starred_url":"https://api.github.com/users/Vezzra/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Vezzra/subscriptions","organizations_url":"https://api.github.com/users/Vezzra/orgs","repos_url":"https://api.github.com/users/Vezzra/repos","events_url":"https://api.github.com/users/Vezzra/events{/privacy}","received_events_url":"https://api.github.com/users/Vezzra/received_events","type":"User","site_admin":false},"created_at":"2016-02-25T13:36:11Z","updated_at":"2016-02-25T13:36:11Z","body":"Yes, found more or less the same already too. Will give it a try."}}