MySQL Forums
Forum List  »  PHP

Issue when digit special characters
Posted by: Lorenzo Vitali
Date: November 11, 2020 03:46AM

In a server Ubuntu 16.04 I have installed MySQL 5.7.31.

To setup UTF8 in MySQL, I have changed the following sections.



character-set-client-handshake = false #force encoding to uft8

Running the instruction

show global variables like '%char%'"

I can see that MySQL appears to be well configured.

character_set_client utf8
character_set_connection utf8
character_set_database utf8
character_set_filesystem binary
character_set_results utf8
character_set_server utf8
character_set_system utf8
character_sets_dir /usr/share/mysql/charsets/

And also running the instruction


collation_connection utf8_general_ci
collation_database utf8_general_ci
collation_server utf8_general_ci

However, when I enter into the default console of MySQL

mysql -u root -p

I cannot digit the special characters (like ù or à).

Furthermore, if I paste a simple select like this one

select * from TableA where name like '%testà%';

the text inside the like instruction became '%test%' instead of '%testà%' (the special characters à is not preserved).

After many investigation, I have found that if I comment out the part for UTF8 in [client] and [mysql] configurations then I can re-digit the special characters.

Why have I this behavior?

Is it maybe a bug of this version?

Can I safety remove the configurations about UTF8 from the sections [client] and [mysql]?

Many thanks.

Options: ReplyQuote

Written By
Issue when digit special characters
November 11, 2020 03:46AM

Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.