Django character latin1 mysql

I am creating a django application with existing MySQL database, the problem lies in the fact that the encoding for the database - latin1_general_c, and characters utf8 saved as ñ => ñ, ó => óI need to provide information on this page in the correct form, but django displays information about the database, such this

recepción, 4 oficinas, 2 baños

i need show like this

recepcíon, 4 oficinas, 2 baños

For many reasons, I cannot change the database to utf8

What should I do to show the information correctly?

+2
source share
1 answer

Django seems to explicitly require your database to use UTF-8:

Django , UTF-8. .

, OPTIONS . . , charset . MySQL , , Django.

, , Django . , CharField Django , UTF-8.

+2

Source: https://habr.com/ru/post/1619849/


All Articles