[New-bugs-announce] [issue35670] os functions return '??' for unicode characters in paths on windows

Creation Elemental report at bugs.python.org
Sun Jan 6 05:26:47 EST 2019


New submission from Creation Elemental <arceusthe at gmail.com>:

I have a few files that contain emojis in their names, and also a folder that has such. Commands like `os.getcwd`, `os.listdir`, `os.path.realpath`, etc. will cause this to happen. However, this is only, as far as I can tell, happening on pure windows distributions. This does not happen in the cygwin64 version I have, nor does it happen in python3.

For example, say you have a folder simply called '🔭'. If you run python inside of it and run `os.getcwd()` you will simply get `'??'` as the result. This breaks MANY of my programs that depend on knowing exactly where they are, and knowing the contents of a directory to pass to other functions.

----------
components: Windows
messages: 333100
nosy: Creation Elemental, paul.moore, steve.dower, tim.golden, zach.ware
priority: normal
severity: normal
status: open
title: os functions return '??' for unicode characters in paths on windows
type: behavior
versions: Python 2.7

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue35670>
_______________________________________


More information about the New-bugs-announce mailing list