You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have my app (DJ 1.4) running nicely on a latin-1 database, this my connection:
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.mysql', # Add 'postgresql_psycopg2', 'postgresql', 'mysql', 'sqlite3' or 'oracle'.
'NAME': 'wedirectory', # Or path to database file if using sqlite3.
'USER': 'user', # Not used with sqlite3.
'PASSWORD': 'password', # Not used with sqlite3.
'HOST': 'localhost', # Set to empty string for localhost. Not used with sqlite3.
'PORT': '3306', # Set to empty string for default. Not used with sqlite3.
'OPTIONS': {
'charset': 'latin1',
},
}
}
It works all fine and especially even if I specify this in the settings:
DEFAULT_CHARSET = 'utf-8'
Everything is nicely shown in utf-8 and Django does perfectly his job but if I activate the:
and try to update a record with the admin interface it throws errors:
DjangoUnicodeDecodeError: 'utf8' codec can't decode byte 0xe7 in position 17: invalid continuation byte. You passed in 'Taverna Pub - Ter\xe7a de Bambas - Natal' (<type 'str'>)
and even worse if you set django to work with latin-1
DEFAULT_CHARSET = 'latin-1'
it crashes badly:
django.utils.encoding.DjangoUnicodeDecodeError
DjangoUnicodeDecodeError: 'utf8' codec can't decode byte 0xe7 in position 236: invalid continuation byte. You passed in '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">\n<html xmlns="http://www.w3.org/1999/xhtml" lang="pt-br" xml:lang="pt-br"
So seems that DDT is not compatible with apps they don't use purely UTF-8.
:( So sad!
The text was updated successfully, but these errors were encountered:
I have my app (DJ 1.4) running nicely on a latin-1 database, this my connection:
It works all fine and especially even if I specify this in the settings:
Everything is nicely shown in utf-8 and Django does perfectly his job but if I activate the:
and try to update a record with the admin interface it throws errors:
and even worse if you set django to work with latin-1
DEFAULT_CHARSET = 'latin-1'
it crashes badly:
So seems that DDT is not compatible with apps they don't use purely UTF-8.
:( So sad!
The text was updated successfully, but these errors were encountered: