{"action":"created","issue":{"url":"https://api.github.com/repos/PyFilesystem/pyfilesystem/issues/250","repository_url":"https://api.github.com/repos/PyFilesystem/pyfilesystem","labels_url":"https://api.github.com/repos/PyFilesystem/pyfilesystem/issues/250/labels{/name}","comments_url":"https://api.github.com/repos/PyFilesystem/pyfilesystem/issues/250/comments","events_url":"https://api.github.com/repos/PyFilesystem/pyfilesystem/issues/250/events","html_url":"https://github.com/PyFilesystem/pyfilesystem/issues/250","id":145960160,"number":250,"title":"OSFS: Issue with non-ascii filenames in listdirinfo()","user":{"login":"zopyx","id":594239,"avatar_url":"https://avatars.githubusercontent.com/u/594239?v=3","gravatar_id":"","url":"https://api.github.com/users/zopyx","html_url":"https://github.com/zopyx","followers_url":"https://api.github.com/users/zopyx/followers","following_url":"https://api.github.com/users/zopyx/following{/other_user}","gists_url":"https://api.github.com/users/zopyx/gists{/gist_id}","starred_url":"https://api.github.com/users/zopyx/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zopyx/subscriptions","organizations_url":"https://api.github.com/users/zopyx/orgs","repos_url":"https://api.github.com/users/zopyx/repos","events_url":"https://api.github.com/users/zopyx/events{/privacy}","received_events_url":"https://api.github.com/users/zopyx/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":7,"created_at":"2016-04-05T11:23:26Z","updated_at":"2016-05-17T12:26:01Z","closed_at":"2016-05-17T12:10:06Z","body":"fs 0.5.4, Python 2.7, running on OpenSuse, EXT4\r\n\r\nI have a local fs /tmp/test with one file named 'ä'.\r\nlistdir() always works, listdirinfo() always fails independent of the encoding parameter being utf8 or iso-8859-15\r\n\r\n```\r\nfrom fs.osfs import OSFS\r\nimport pprint\r\n\r\nl = OSFS('/tmp/test', encoding='utf8')\r\nprint l.listdir()\r\nprint l.listdirinfo()\r\n```\r\n\r\n```\r\nbin/zopepy xx.py \r\n[u'\\xe4']\r\nTraceback (most recent call last):\r\n  File \"bin/zopepy\", line 326, in <module>\r\n    exec(compile(__file__f.read(), __file__, \"exec\"))\r\n  File \"xx.py\", line 6, in <module>\r\n    print l.listdirinfo()\r\n  File \"/home/ajung/.buildout/eggs/fs-0.5.4-py2.7.egg/fs/base.py\", line 540, in listdirinfo\r\n    files_only=files_only)]\r\n  File \"/home/ajung/.buildout/eggs/fs-0.5.4-py2.7.egg/fs/base.py\", line 530, in getinfo\r\n    return self.getinfo(pathjoin(path, p))\r\n  File \"/home/ajung/.buildout/eggs/fs-0.5.4-py2.7.egg/fs/errors.py\", line 257, in wrapper\r\n    return func(self,*args,**kwds)\r\n  File \"/home/ajung/.buildout/eggs/fs-0.5.4-py2.7.egg/fs/osfs/__init__.py\", line 366, in getinfo\r\n    stats = self._stat(path)\r\n  File \"/home/ajung/.buildout/eggs/fs-0.5.4-py2.7.egg/fs/osfs/__init__.py\", line 360, in _stat\r\n    return _os_stat(sys_path)\r\n  File \"/home/ajung/.buildout/eggs/fs-0.5.4-py2.7.egg/fs/errors.py\", line 257, in wrapper\r\n    return func(self,*args,**kwds)\r\n  File \"/home/ajung/.buildout/eggs/fs-0.5.4-py2.7.egg/fs/osfs/__init__.py\", line 47, in _os_stat\r\n    return os.stat(path)\r\nUnicodeEncodeError: 'ascii' codec can't encode character u'\\xe4' in position 10: ordinal not in range(128)\r\n```\r\n"},"comment":{"url":"https://api.github.com/repos/PyFilesystem/pyfilesystem/issues/comments/219702145","html_url":"https://github.com/PyFilesystem/pyfilesystem/issues/250#issuecomment-219702145","issue_url":"https://api.github.com/repos/PyFilesystem/pyfilesystem/issues/250","id":219702145,"user":{"login":"lurch","id":476186,"avatar_url":"https://avatars.githubusercontent.com/u/476186?v=3","gravatar_id":"","url":"https://api.github.com/users/lurch","html_url":"https://github.com/lurch","followers_url":"https://api.github.com/users/lurch/followers","following_url":"https://api.github.com/users/lurch/following{/other_user}","gists_url":"https://api.github.com/users/lurch/gists{/gist_id}","starred_url":"https://api.github.com/users/lurch/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lurch/subscriptions","organizations_url":"https://api.github.com/users/lurch/orgs","repos_url":"https://api.github.com/users/lurch/repos","events_url":"https://api.github.com/users/lurch/events{/privacy}","received_events_url":"https://api.github.com/users/lurch/received_events","type":"User","site_admin":false},"created_at":"2016-05-17T12:26:01Z","updated_at":"2016-05-17T12:26:01Z","body":"Thanks for confirming :-)"}}