Problems with character_set coherence

Website URL

https://rvalldecabres.great-site.net

Other Information

After creating my database (importing from localhost built with XAMPP) I obtain
these:

SHOW SESSION VARIABLES LIKE ‘character_set_%’ results in:
character_set_client utf8mb4
character_set_connection utf8mb4
character_set_database latin1
character_set_filesystem binary
character_set_results utf8mb4
character_set_server latin1**
character_set_system utf8

SHOW SESSION VARIABLES LIKE ‘collation_%’
collation_connection utf8mb4_unicode_ci
collation_database latin1_swedish_ci**
collation_server latin1_swedish_ci**

The same commands in localhost

SHOW SESSION VARIABLES LIKE ‘character_set_%’;
character_set_client utf8mb4
character_set_connection utf8mb4
character_set_database utf8mb4
character_set_filesystem binary
character_set_results utf8mb4
character_set_server utf8mb4
character_set_system utf8

SHOW SESSION VARIABLES LIKE ‘collation_%’;
collation_connection utf8mb4_unicode_ci
collation_database utf8mb4_general_ci
collation_server utf8mb4_general_ci

I had no problems of visualizing characters like À, é in localhost.
But problems appers in my web site. I do not visualize À, é and also do not obtain the same response in SQL statements including _
I guess the reason is incoherence in shown parameters.

Please read

2 Likes

I tried what you said and the situation gets worst.
You can see what happens if you demand
https://rvalldecabres.great-site.net/dq/peticion3.php
Only a few ‘Notarios’ appears wrong (those which include Ç or ’ ).
If I change to utf8bm4 every Notario with an accent (í,á,à,é, etc) appears bad.

Thanks a lot for your indication.
I tried again from scratch (importing database again) and modifiy connections as you indicated ($con->set_charset(“utf8mb4”):wink: and every thing is running OK.

1 Like

Glad to hear you were able to get it resolved. But for you, or anyone else reading this, there is a knowledge base article about this with some more detail:

2 Likes

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.