Upgrade to v1.5.10 and got problems with the swedish characters åäö Upgrade to v1.5.10 and got problems with the swedish characters åäö
 

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

Upgrade to v1.5.10 and got problems with the swedish characters åäö

Started by larsur, December 16, 2010, 11:13:51 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

larsur

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

Αndré


larsur

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

Αndré

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?

larsur

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



larsur

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

Αndré

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.