Advanced search  

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

Pages: [1]   Go Down

Author Topic: Problem with specific symbol in unicode  (Read 4630 times)

0 Members and 1 Guest are viewing this topic.

mitko

  • Coppermine frequent poster
  • ***
  • Country: 00
  • Offline Offline
  • Gender: Male
  • Posts: 119
    • World of Lighthouses
Problem with specific symbol in unicode
« on: July 17, 2016, 08:17:22 pm »

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é

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 15764
Re: Problem with specific symbol in unicode
« Reply #1 on: July 17, 2016, 11:05:15 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.?
Logged

mitko

  • Coppermine frequent poster
  • ***
  • Country: 00
  • Offline Offline
  • Gender: Male
  • Posts: 119
    • World of Lighthouses
Re: Problem with specific symbol in unicode
« Reply #2 on: July 18, 2016, 07:20:31 pm »

Title, description, any text field

Αndré

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 15764
Re: Problem with specific symbol in unicode
« Reply #3 on: July 18, 2016, 08:27:28 pm »

Works as expected in my testbed. Please try to add
Code: [Select]
$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, ...).
Logged

mitko

  • Coppermine frequent poster
  • ***
  • Country: 00
  • Offline Offline
  • Gender: Male
  • Posts: 119
    • World of Lighthouses
Re: Problem with specific symbol in unicode
« Reply #4 on: July 18, 2016, 08:56:22 pm »

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

Αndré

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 15764
Re: Problem with specific symbol in unicode
« Reply #5 on: July 18, 2016, 09:13:17 pm »

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.
Logged

mitko

  • Coppermine frequent poster
  • ***
  • Country: 00
  • Offline Offline
  • Gender: Male
  • Posts: 119
    • World of Lighthouses
Re: Problem with specific symbol in unicode
« Reply #6 on: July 19, 2016, 08:12:04 pm »

I checked the server configuration
Code: [Select]
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
Code: [Select]
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é

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 15764
Re: Problem with specific symbol in unicode
« Reply #7 on: July 19, 2016, 08:25:42 pm »

Probably your host can answer that question.
Logged

mitko

  • Coppermine frequent poster
  • ***
  • Country: 00
  • Offline Offline
  • Gender: Male
  • Posts: 119
    • World of Lighthouses
Re: Problem with specific symbol in unicode
« Reply #8 on: July 19, 2016, 09:45:24 pm »

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é

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 15764
Re: Problem with specific symbol in unicode
« Reply #9 on: July 20, 2016, 09:25:03 am »

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.
Logged
Pages: [1]   Go Up
 

Page created in 0.04 seconds with 20 queries.