MySQL sorting incorrectly with Danish characters

The Danish alphabet requires abc ... to come before æ, ø and å. In my MySQL database, when I sort alphabetically it looks like

Øresund
Åse
Alfa

      

which is strange.

Server connection
mapping - utf8_general_ci Database mapping - latin1_swedish_ci Table
comparison - utf8_danish_ci Column
mapping: utf8_danish_ci

Shouldn't collation be set to a higher level on a column / column?

My site is all UTF8 and when I enter text from the website it stops again. But when I look at the text in phpmyadmin the characters are not displayed correctly.

I have attached the contents of the editschool.php file, here: http://pastebin.com/pv8u0BDj

+3


source to share


1 answer


I finally managed to get it to work. One or both of these solved the problem:

1. Adding mysqli_set_charset ($ connection, "UTF8"); at the top of my file,



  1. Forcing my FTP client to download as UTF-8.

Edit: I am now considering option 2 above, the most likely one, so I sketched option 1 through.

0


source







All Articles