-
Notifications
You must be signed in to change notification settings - Fork 199
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
執行gh-ost 遇到錯誤 #137
Comments
解決辦法:
或是 Dockfile 加上
|
你好,中文是支持的,这个一直在用,应该是包含了ascii字符,明天方便把你的注释发我,我测试一下
发自我的 iPhone
… 在 2018年11月22日,22:31,HaroldZhen ***@***.***> 写道:
解決辦法:
# 80端口為外部端口,可自行更改
# 8000為docker內部服務端口,8000端口不可改變
docker run -itd -p 80:8000 -e PYTHONIOENCODING=utf-8 -e LC_ALL='en_US.UTF-8' --name=sqlaudit 0a2b9265372d /bin/bash
或是 Dockfile 加上
ENV PYTHONIOENCODING=utf-8 LC_ALL en_US.UTF-8
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or mute the thread.
|
好的是支持utf8,支持中文注释的。一直在用,应该是你那包含了ascii,我明天测试一下。方便发我一下你的注释嘛?
发自我的 iPhone
… 在 2018年11月22日,22:31,HaroldZhen ***@***.***> 写道:
解決辦法:
# 80端口為外部端口,可自行更改
# 8000為docker內部服務端口,8000端口不可改變
docker run -itd -p 80:8000 -e PYTHONIOENCODING=utf-8 -e LC_ALL='en_US.UTF-8' --name=sqlaudit 0a2b9265372d /bin/bash
或是 Dockfile 加上
ENV PYTHONIOENCODING=utf-8 LC_ALL en_US.UTF-8
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or mute the thread.
|
出錯語法:
|
是的,資料庫字符集是utf8,語法就是只上面這樣 ALTER TABLE `hotel` ADD COLUMN `en_name` varchar(255) NOT NULL DEFAULT '' COMMENT '飯店英文名稱' AFTER `name` |
好的。我复制过来的,执行没问题,我模拟下加入ASCII字符,进行测试,并修正下,谢谢。如果有使用上的问题,请反馈,谢谢。如果有好的思路或者方法,也请反馈给我,感谢。 |
你是加了:-e PYTHONIOENCODING=utf-8 这个解决的吗? |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
執行gh-ost遇到註解為中文的報錯問題
'ascii' codec can't encode characters in position 343-348: ordinal not in range(128)
The text was updated successfully, but these errors were encountered: