2024-06-16 19:14:56 发布
网友
我必须为两个应用程序使用相同的数据库,一个是yii作为后端php,另一个是django。我遇到的问题是,当我在yii“Angela CRéspedes RodrÃguez”和django“Angela CR Céspedes Rodríguez”中保存一个名称时,我需要以同样的方式在django中保存
见Trouble with utf8 characters; what I see is not what I stored中的Mojibake
DATABASES = { 'default': { 'ENGINE': 'django.db.backends.mysql', ... 'OPTIONS': { 'charset': 'utf8mb4', 'use_unicode': True, }, }, } my.cnf: [mysqld] character-set-server=utf8mb4 default-collation=utf8mb4_unicode_ci [client] default-character-set=utf8mb4
见http://stackoverflow.com/questions/28523138/django-character-latin1-mysql
见Trouble with utf8 characters; what I see is not what I stored中的Mojibake
见http://stackoverflow.com/questions/28523138/django-character-latin1-mysql
相关问题 更多 >
编程相关推荐