forum.coppermine-gallery.net

Support => cpg1.5.x Support => cpg1.5 miscellaneous => Topic started by: pasenger on February 01, 2014, 08:30:30 pm

Title: Problem with Polish chars in picture descriptions
Post by: pasenger on February 01, 2014, 08:30:30 pm
After updating the gallery with version 1.5.24 to 1.5.26 swapping files and update the database in the descriptions of pictures appeared in August bushes.

If the file config.inc.php will add $ CONFIG ['dbcharset'] = 'latin2'; descriptions are displayed correctly in the keywords appear in the bushes.

How to solve it?
Title: Re: Problem with Polish chars in picture descriptions
Post by: Αndré on February 03, 2014, 12:04:53 pm
Splitted from http://forum.coppermine-gallery.net/index.php/topic,76135.0.html

Please undo the change in include/config.inc.php and post a link to your gallery, especially some links where we can see the issue.
Title: Re: Problem with Polish chars in picture descriptions
Post by: pasenger on February 09, 2014, 07:00:33 pm
http://www.natorze.com.pl/displayimage.php?pid=809

The problem only for displaying the correct keywords:

instead "Chabówka" displays "Chabówka"

instead "małopolskie displays maÅ�opolskie"

instead "jesień" displays "jesieÅ�"

In the file include / functions.inc.php have modified record descriptions of images to display them properly:

Code: [Select]
function cpg_db_connect()
{
    global $CONFIG;

    $result = @mysql_connect($CONFIG['dbserver'], $CONFIG['dbuser'], $CONFIG['dbpass']);

    if (!$result) {
        return false;
    }

    if (!mysql_select_db($CONFIG['dbname'])) {
        return false;
    }

    if (empty($CONFIG['dbcharset'])) {
        cpg_db_query("set names latin2", $result);
    }

    return $result;
}

With this modification, include / function.ini.php version 1.5.24 working properly. Version 1.5.26 has a problem with Polish characters in keywords.
Title: Re: Problem with Polish chars in picture descriptions
Post by: pasenger on February 09, 2014, 08:23:12 pm
http://natorze.com.pl/search.php
Title: Re: Problem with Polish chars in picture descriptions
Post by: Αndré on February 10, 2014, 01:36:31 pm
Please have a look at the (currently) last post of this topic and follow the link to our SVN repository to see how to fix that issue: http://forum.coppermine-gallery.net/index.php/topic,76830.msg372140.html#msg372140

Title: Re: Problem with Polish chars in picture descriptions
Post by: pasenger on February 10, 2014, 09:52:20 pm
Everything works fine after replacing these files. Thank you Andre.