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

encoding utf8 #570

Closed
birdspring opened this issue Jun 7, 2016 · 5 comments
Closed

encoding utf8 #570

birdspring opened this issue Jun 7, 2016 · 5 comments

Comments

@birdspring
Copy link

When I use caravel to connet localhost MySQL database to create a slice, a encoding problem disturbed me a lot.
Some of the tables in my database are encoded in utf8_general_ci. When I called one of this table and created a slice, the Chinese items are displayed as messy code like "???",so how can I resolve this problem?

Thanks,

@chejinye
Copy link

你 怎么 解决的 ,我也遇到这个问题 @ @ @birdspring

@birdspring
Copy link
Author

@chejinye 在数据库名字最后加上 ?charset=utf8

@chejinye
Copy link

OperationalError: (_mysql_exceptions.OperationalError) (2019, "Can't initialize character set 'utf8 ' (path: /usr/share/mysql/charsets/)") 但是我的还是错误

@birdspring
Copy link
Author

@chejinye 首先你本机或者服务器内需要安装mysql,用pip install mysqlclient安装mysql客户端,apt-get安装(ubuntu)也可以。
其次连接mysql数据库的标准uri是 mysql://root:password@localhost/databasename?charset=utf8
用户名与密码是你mysql自己设置的,localhost是你对应的ip,服务器的话自己配置,数据库名字就是你要连接的数据库名,必须提前在mysql中创建,这样点test connection。
如果你用的是caravel自带的例子的话用非sqlite数据库会出现一些问题,这个就是另一个方面了

@chejinye
Copy link

谢谢,中文能正常显示了

zhaoyongjie pushed a commit to zhaoyongjie/incubator-superset that referenced this issue Nov 17, 2021
* feat: add more api wrappers

* test: add unit tests
zhaoyongjie pushed a commit to zhaoyongjie/incubator-superset that referenced this issue Nov 24, 2021
* feat: add more api wrappers

* test: add unit tests
zhaoyongjie pushed a commit to zhaoyongjie/incubator-superset that referenced this issue Nov 25, 2021
* feat: add more api wrappers

* test: add unit tests
zhaoyongjie pushed a commit to zhaoyongjie/incubator-superset that referenced this issue Nov 26, 2021
* feat: add more api wrappers

* test: add unit tests
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