Code Monkey home page Code Monkey logo

Comments (8)

lazzyfu avatar lazzyfu commented on July 21, 2024 1

好的。我复制过来的,执行没问题,我模拟下加入ASCII字符,进行测试,并修正下,谢谢。如果有使用上的问题,请反馈,谢谢。如果有好的思路或者方法,也请反馈给我,感谢。

from goinsight.

HaroldZhen avatar HaroldZhen commented on July 21, 2024

解決辦法:

# 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

from goinsight.

lazzyfu avatar lazzyfu commented on July 21, 2024

from goinsight.

lazzyfu avatar lazzyfu commented on July 21, 2024

from goinsight.

HaroldZhen avatar HaroldZhen commented on July 21, 2024

出錯語法:

ALTER TABLE `hotel` ADD COLUMN `en_name` varchar(255) NOT NULL DEFAULT '' COMMENT '飯店英文名稱' AFTER `name`

from goinsight.

lazzyfu avatar lazzyfu commented on July 21, 2024

您好,我这边测试是OK的,请问题你数据库的字符集是utf8?或者你输入的ALTER语句包含了ASCII字符,谢谢。
image

from goinsight.

HaroldZhen avatar HaroldZhen commented on July 21, 2024

是的,資料庫字符集是utf8,語法就是只上面這樣

ALTER TABLE `hotel` ADD COLUMN `en_name` varchar(255) NOT NULL DEFAULT '' COMMENT '飯店英文名稱' AFTER `name`

from goinsight.

lazzyfu avatar lazzyfu commented on July 21, 2024

你是加了:-e PYTHONIOENCODING=utf-8 这个解决的吗?

from goinsight.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.