Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Exception: You MUST set system locale to 'UTF-8' to support unicode file names. #5

Closed
cheaphunter opened this issue Mar 6, 2014 · 3 comments

Comments

@cheaphunter
Copy link

python2.6,Centos英文环境。
Locale都设成en_US.UTF-8
Python的getdefaultencoding()和getfilesystemencoding()都已设置成UTF-8
为什么还是报错?
尝试安装了中文语言包,Locale改成zh_CN.UTF-8
依然报错
问题可能比较低级,但一直无解。请指教

@cheaphunter
Copy link
Author

好吧,升了2.7,依然报错。直接注释掉,正常使用。

@houtianze
Copy link
Owner

贴下你locale的输出?如果你设定了UTF-8,按理不应该有问题啊。
注释掉可以,问题不大。这个警告是为了确保能搞上传中文名字文件才强制加上去的,如果你上传中文名文件不出问题,就可以忽略这个。

SystemEncoding.upper() 打印出什么?

@houtianze
Copy link
Owner

@cheaphunter 能帮忙贴下shell下,下面这个命令的输出吗?
python -c "import locale; print locale.getdefaultlocale()"

@lifeike lifeike mentioned this issue Jul 5, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants