我有一个我想打开的unicode文件名.以下代码:
cmd = u'cmd /c "C:\\Pok\xe9mon.mp3"'
cmd = cmd.encode('utf-8')
subprocess.Popen(cmd)
Run Code Online (Sandbox Code Playgroud)
回报
>>> 'C:\Pok?mon.mp3' is not recognized as an internal or external command, operable program or batch file.
Run Code Online (Sandbox Code Playgroud)
即使该文件确实存在.为什么会这样?