Advanced search  

News:

cpg1.5.48 Security release - upgrade mandatory!
The Coppermine development team is releasing a security update for Coppermine in order to counter a recently discovered vulnerability. It is important that all users who run version cpg1.5.46 or older update to this latest version as soon as possible.
[more]

Pages: [1]   Go Down

Author Topic: Upgrade to v1.5.10 and got problems with the swedish characters  (Read 3463 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: 15765
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: 15765
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: 15765
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.028 seconds with 20 queries.