Problem with specific symbol in unicode Problem with specific symbol in unicode
 

News:

CPG Release 1.6.26
Correct PHP8.2 issues with user and language managers.
Additional fixes for PHP 8.2
Correct PHP8 error with SMF 2.0 bridge.
Correct IPTC supplimental category parsing.
Download and info HERE

Main Menu

Problem with specific symbol in unicode

Started by mitko, July 17, 2016, 08:17:22 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

mitko

Gents, recently i got a report from one of the users:
---
in Norwegian and other Scandinavian Languages there are a few letters more, like Æ, Å, etc.
all this I can use for the name, but not the capital letter "Ø" ... ALT0216 ...
when I use it, it appears a question mark and a rhombus, which not looks good.
instad of I am now using the German letter "Ö", wich works.
both letter Ö and Ø have the same sound, it is a bit like the Russian "Ё" ... not exactly, but similar ...
---
I checked, the problem is really exist. Also i checked MySQL (db is utf8_general_ci) and Coppermine properties (utf8 in config).
What else i should check? 

Αndré

Quote from: mitko on July 17, 2016, 08:17:22 PM
all this I can use for the name

What exactly is meant with "name"? The file name? Or some meta data like title, description, etc.?

mitko


Αndré

Works as expected in my testbed. Please try to add
$CONFIG['dbcharset'] = 'utf8';
to include/config.inc.php. This will probably break all existing text fields, but I'd like to know if it works as expected for new text (title, description, comment, ...).

mitko

You're right, Andre, $CONFIG['dbcharset'] = 'utf8'; fixes the problem for new text but brokes for old.

Αndré

You need to convert the data in your database to utf8 to fix the issue for old and new data. Unfortunately I'm no expert for such stuff. Some of our (dev team) members are more experienced in such things, maybe someone replies to this thread. Feel free to search our board for similar threads, there are some (in some cases quite long) threads which fixed the issue for the user.

mitko

I checked the server configuration
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
collation_connection utf8mb4_unicode_ci
collation_database utf8_general_ci
collation_server latin1_swedish_ci


I tried to use
ALTER DATABASE databasename CHARACTER SET utf8 COLLATE utf8_general_ci;
but see strange behaviour: character_set_database becames utf8 for several minutes but then drops back to latin1

Αndré

Probably your host can answer that question.

mitko

OK now i have following
character_set_client utf8mb4
character_set_connection utf8mb4
character_set_database utf8
character_set_filesystem binary
character_set_results utf8mb4
character_set_server latin1
character_set_system utf8
collation_connection utf8mb4_unicode_ci
collation_database utf8_general_ci
collation_server latin1_swedish_ci
Two questions:
1. Problem still exist
2. Could be parameters highlighted by bold be a reason?

Αndré

Quote from: mitko on July 19, 2016, 09:45:24 PM
Could be parameters highlighted by bold be a reason?

character_set_server latin1 - maybe
collation_server latin1_swedish_ci - no

I also don't know if changing "character_set_server" will fix your issue at all. Have you tested that? From what I remember you need to run one or more SQL queries to convert the encoding of the data already stored in your database. If I have some spare time, I'll try to find the thread where this has been fixed for another user.