Somebody linked our site with a smiley in the url. The url looks like this:
myurl/nummer-333😊🤓/
This results in a 500 error.

Because this page does not exist I expected a 404 error. The 500 error 
shows:
(1267, "Illegal mix of collations (latin1_swedish_ci,IMPLICIT) and 
(utf8_general_ci,COERCIBLE) for operation '='")

Because latin1 doesn't support smileys I converted my database and tables 
to utf8mb4_unicode_ci (I saw several site advising against using 
utf8_unicode_ci with mysql)

Then I got this error:
(1267, "Illegal mix of collations (utf8mb4_unicode_ci,IMPLICIT) and 
(utf8_general_ci,COERCIBLE) for operation '='")

So the database conversion worked (no other encoding problems with the 
site) but still the error. I changed my my.cnf to:
[mysqld]
local-infile=0
innodb_file_per_table
bind-address=127.0.0.1
character_set_server=utf8mb4
collation_server=utf8mb4_unicode_ci

[client]
socket=/usr/local/mysql/data/mysql.sock
default-character-set = utf8mb4

[mysql]
default-character-set = utf8mb4

But still the same error. Anybody an idea?

More info:
Database: mysql  Ver 15.1 Distrib 5.5.46-MariaDB, for Linux (x86_64) using 
readline 5.1
Django: 1.11.4
Python: 3.4.2

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/85f12e69-2446-460a-8e60-3ace96ebc3d3%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to