Mysql - Insert queries by inserting funny characters

I have a simple script that inserts values ​​from a text file into mysqldatabase - however, some accented characters are not inserted properly. For example, let's say I have a word:

Reykjavik

I am trying to insert it using a simple sql insert statement, and instead this value ends in the database ????

ReykjavÃk

How to fix it?

==== ==== EDIT

I tried to change the sorting - the fact is that I use navicat here, and if I say that I try to insert any such word with underlined characters, like this, using the QUICK Navicat generator or panel, it is inserted without any problems whatso ever - however mine php script, when it starts a similar request, finishes loading the basket into the table :( What happens here ...

+3
source share
1 answer

The question mark set is that you insert a character whose encoding is not understood by MySQL. Try matching with utf8_bin. That should work.

+2
source

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


All Articles