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: Upgrade to v1.5.10 and got problems with the swedish characters åäö  (Read 4706 times)

0 Members and 1 Guest are viewing this topic.

larsur

  • Coppermine newbie
  • Offline Offline
  • Posts: 4

Hi!

I upgraded yesterday from v1.4.26 to v1.5.10 and got problems with the swedish characters åäö.

After the successful upgrade and adjusting the template files the characters åäö in the picture text and album text  was replaced by unknown characters.

Searched through the forum and:

Changed the configuration to Unicode (utf-8) from Western

Added $CONFIG['dbcharset'] = 'utf8'; to the file config.inc.php
And after that changes the picture text and album text looks correct but now after that the picture files that has a physical filename containing swedish characters åäö are replaced by the NoPic both for the  thumbnail and full picture.

No difference when I tried to use the default theme for a test.

Also tried to change the syntax in function utf_replace($str)
in the file functions.inc.php after following forum thread.

The behaviour can be watched at:
http://www.ckhymer.com/bilder/

I dont have a clue!
Lars
Logged

Αndré

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 15764
Re: Upgrade to v1.5.10 and got problems with the swedish characters åäö
« Reply #1 on: December 17, 2010, 10:33:01 am »

Maybe it works if you undo
Added $CONFIG['dbcharset'] = 'utf8'; to the file config.inc.php
Logged

larsur

  • Coppermine newbie
  • Offline Offline
  • Posts: 4
Re: Upgrade to v1.5.10 and got problems with the swedish characters åäö
« Reply #2 on: December 17, 2010, 11:41:19 am »

Hi André!
I tried to change the different settings such as the entry in config.inc.php and the configuration setting but if I dont have that settings then instead all the characters åäö in the picture text and album text is replaced by unknown characters and unreadable. When the text is containing the unknown charachters then all the image files are working correctly and vice versa when the text is ok with the above settings then the imagefiles containing åäö are not working and replaced with the NoPic symbol.

Kind regards,
Lars
Logged

Αndré

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 15764
Re: Upgrade to v1.5.10 and got problems with the swedish characters åäö
« Reply #3 on: December 17, 2010, 12:03:18 pm »

Do you have a dump of your cpg1.4.26 database?

It doesn't make sense to me that two different columns from the same table behave different regarding the character encoding. Please look at the pictures table in the database. Do the åäö characters look correctly for the file name and the title? Or are that characters replaced with some cryptic characters?
Logged

larsur

  • Coppermine newbie
  • Offline Offline
  • Posts: 4
Re: Upgrade to v1.5.10 and got problems with the swedish characters åäö
« Reply #4 on: December 17, 2010, 11:18:30 pm »

Hi!

I have compared the dump of the cpg1.4.26 database before the upgrade and now how the database looks with the cpg1.5.10 version.
In the [pictures] table in the MySQL database everything looks correct in the [filename] and [caption] column containing the correct swedish characters.
In the [albums] table in the MySQL database everything looks correct in the [title] and [description] column containing the correct swedish characters.

I'm a DBA on MSSQL but dont work to much with MySQL but in the database the collation on column level is "latin1_swedish_ci" by default from the webhotel.
Server settings are:
MySQL characterset: UTF-8 Unicode (utf8)
Collation for MySQL-connection is "utf8_unicode_ci"
I dont know if that could impact things.

Its strange because when I hover over an NoPic image it shows the correct filename with the correct characters but by some reason the image show function gets confused.

Kind regards,
Lars


Logged

larsur

  • Coppermine newbie
  • Offline Offline
  • Posts: 4
Re: Upgrade to v1.5.10 and got problems with the swedish characters åäö
« Reply #5 on: December 19, 2010, 06:16:11 pm »

Hi!
Now it works  :)

I changed back the configuration to Western from Unicode (utf-8)
Removed the row $CONFIG['dbcharset'] = 'utf8'; from the file config.inc.php

Then everything worked with the right characters in the text and the images was viewed correctly but all the words from the language file had unknown characters instead of åäö.
I changed in the language file to $lang_charset = 'iso-8859-1'; and saved it as a ANSI file and after that everything is working as it should be.

Kind regards,
Lars
Logged

Αndré

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 15764
Re: Upgrade to v1.5.10 and got problems with the swedish characters åäö
« Reply #6 on: December 20, 2010, 01:31:11 pm »

Strange workaround, but I'm happy that it works for you :) Don't forget to apply the changes to the language file after each upgrade.
Logged
Pages: [1]   Go Up
 

Page created in 0.024 seconds with 21 queries.