Skip to content
This repository has been archived by the owner on Nov 28, 2019. It is now read-only.

Windows 上 UTF-8 的支持有问题 #42

Open
mengmo opened this issue Jan 13, 2017 · 0 comments
Open

Windows 上 UTF-8 的支持有问题 #42

mengmo opened this issue Jan 13, 2017 · 0 comments

Comments

@mengmo
Copy link

mengmo commented Jan 13, 2017

因为命令提示符默认代码页为GBK,中文会显示乱码
所以,chcp 65001将活动代码页转换为UTF-8
下载会出错

python bddown_cli.py download http://pan.baidu.com/s/1c2iM8AO
Please input this sharing password
bpb4
Traceback (most recent call last):
  File "bddown_cli.py", line 53, in <module>
    execute_command()
  File "bddown_cli.py", line 49, in execute_command
    commands[command](args[1:])
  File "D:\PortableApps\pan-baidu-download\command\download.py", line 110, in download
    download_command(fi.filename, savedir, fi.dlink, cookies=cookies, limit=limit, output_dir=output_dir)
  File "D:\PortableApps\pan-baidu-download\command\download.py", line 18, in download_command
    print("\033[32m" + filename + "\033[0m")
LookupError: unknown encoding: cp65001
@mengmo mengmo changed the title Windows 10上UTF-8的支持有问题 Windows 上 UTF-8 的支持有问题 Jan 14, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant