{"action":"opened","issue":{"url":"https://api.github.com/repos/peterbrittain/asciimatics/issues/170","repository_url":"https://api.github.com/repos/peterbrittain/asciimatics","labels_url":"https://api.github.com/repos/peterbrittain/asciimatics/issues/170/labels{/name}","comments_url":"https://api.github.com/repos/peterbrittain/asciimatics/issues/170/comments","events_url":"https://api.github.com/repos/peterbrittain/asciimatics/issues/170/events","html_url":"https://github.com/peterbrittain/asciimatics/issues/170","id":348898917,"node_id":"MDU6SXNzdWUzNDg4OTg5MTc=","number":170,"title":"FileBrowser UTF-8 issues on MacOs","user":{"login":"mronkain","id":2600875,"node_id":"MDQ6VXNlcjI2MDA4NzU=","avatar_url":"https://avatars2.githubusercontent.com/u/2600875?v=4","gravatar_id":"","url":"https://api.github.com/users/mronkain","html_url":"https://github.com/mronkain","followers_url":"https://api.github.com/users/mronkain/followers","following_url":"https://api.github.com/users/mronkain/following{/other_user}","gists_url":"https://api.github.com/users/mronkain/gists{/gist_id}","starred_url":"https://api.github.com/users/mronkain/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mronkain/subscriptions","organizations_url":"https://api.github.com/users/mronkain/orgs","repos_url":"https://api.github.com/users/mronkain/repos","events_url":"https://api.github.com/users/mronkain/events{/privacy}","received_events_url":"https://api.github.com/users/mronkain/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-08-08T21:29:07Z","updated_at":"2018-08-08T21:29:07Z","closed_at":null,"author_association":"CONTRIBUTOR","body":"**Describe the bug**\r\nSome UTF-8 filenames cause either display or decoding errors in the FileBrowser widget. Certain names cause a crash on Python 2.7 with a UnicodeDecodeError. Python 3 doesn't trigger the exception but a few characters are consistently rendered incorrectly.\r\n\r\n**To Reproduce**\r\nBasically any filename with either any of öÖäÄ causes errors. Create a directory with files `oööÖäÄäÄ.txt,` `ØÆ.txt`, `øØæÆ.txt` and view it on the treeview sample. On Python3 the ø's and æ's are ok but the Öä's are not at all well.\r\n\r\nOn Python 2.7, the same directory causes the following exception:\r\n```\r\nFile \"/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/asciimatics/widgets.py\", line 2570, in _populate_list\r\n    tree_files.append(([\"|-- {}\".format(my_file),\r\nUnicodeDecodeError: 'ascii' codec can't decode byte 0xcc in position 2: ordinal not in range(128)\r\n```\r\n\r\n**Expected behavior**\r\nThe filenames should be shown correctly.\r\n\r\n**Screenshots**\r\nOn Python 3.7:\r\n![Screenshot Python3](https://user-images.githubusercontent.com/2600875/43864819-6cfbeb62-9b69-11e8-8495-0e96b74a01e2.png)\r\n\r\n**System details (please complete the following information):**\r\n - Mac Os Sierra / High Sierra\r\n - asciimatics 1.9.0\r\n\r\n**Additional context**\r\nThis seems to be a known issue with the Mac HFS file system and Unicode Normalization. From the console you'll get the following:\r\n```\r\nPython 3.7:\r\n>>> os.listdir('.')\r\n['oööÖäÄäÄ.txt', 'ØÆ.txt', 'øØæÆ.txt']\r\n\r\nPython 2.7:\r\n>>> os.listdir('.')\r\n['oo\\xcc\\x88o\\xcc\\x88O\\xcc\\x88a\\xcc\\x88A\\xcc\\x88a\\xcc\\x88A\\xcc\\x88.txt', '\\xc3\\x98\\xc3\\x86.txt', '\\xc3\\xb8\\xc3\\x98\\xc3\\xa6\\xc3\\x86.txt']`\r\n```"}}
{"actor":{"display_login":"mronkain"}}