-2

I have to use the same database for two apps one with yii as backend php and other with django the problem that i have is when i save a name for example in yii "Angela CR Céspedes Rodríguez" vs in django "Angela CR Céspedes Rodríguez" i need save in django in the same way.

1 Answers1

1

See Mojibake in Trouble with utf8 characters; what I see is not what I stored

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

And see http://stackoverflow.com/questions/28523138/django-character-latin1-mysql

Rick James
  • 135,179
  • 13
  • 127
  • 222