You are here:  » Problem with ciryllic symbols

Support Forum



Problem with ciryllic symbols

Submitted by AndrewT on Wed, 2012-03-21 09:20 in

David, good day!

I've got problems with ciryllic symbols:

1. In database information about products and categories stored as (ПарфюмироваР

2. In Frontend when browse Merchant, Categories or Brands firstLetter is �.

What can you advise?
With best regards.

Submitted by support on Wed, 2012-03-21 10:29

Hi Andrew,

First check whether your site actually needs to be running in iso-8859-1. You can double check this with your web browser's View > Character Encoding menu. Switch to iso-8859-1 and if the characters then display correctly, change the character set of your installation by changing line 4 of config.php as follows:

  $config_charset = "iso-8859-1";

If that's not the case, it may be necessary to override the character set of the MySQL connection which is a simple modification to includes/database.php as described in this thread. After making the changes don't forget to re-import all feeds...

Hope this helps!

Cheers,
David.
--
PriceTapestry.com

Submitted by AndrewT on Wed, 2012-03-21 11:19

Thanks. Modification to includes/database.php helps. Now in database everything is displaying correct.
But appeared new problem - in frontend when browse Merchant, Categories or Brands - merchant, category and brand name or first letter displaying like that -
� - firsеLetter
Парфюмерия - merchant, category or brand name

Evetywhere is utf-8. Switching to iso-8859-1 not helps. Besides admin panel, products, descriptions are displaying correct.

Submitted by support on Wed, 2012-03-21 12:19

Hi Andrew,

As a next step; please see this comment which contains a dbmod script to alter the table character set and collation which may also be required...

Hope this helps!

Cheers,
David.
--
PriceTapestry.com

Submitted by AndrewT on Wed, 2012-03-21 12:37

It works. Category names are displaying correct.
Remained only problem with firstletter of category name in frontend.

Submitted by support on Wed, 2012-03-21 13:06

Hi Andrew,

Ah - I understand. The ATOZ HTML module uses substr() to extract the first letter but if this is a ciryllic (multi-byte UTF-8) character then it will result in an invalid "first letter". To correct this, the multi-byte version of substr() can be used. In html/atoz.php, look for the following code at line 17:

    $firstLetter = strtoupper(substr($item["name"],0,1));

...and REPLACE with:

    $firstLetter = strtoupper(mb_substr($item["name"],0,1));

Hope this helps!

Cheers,
David.
--
PriceTapestry.com

Submitted by AndrewT on Wed, 2012-03-21 15:26

David,

I've found one more problem: i try to search products - type in line for example "agent" - found 10 results,
type "30" - found 5 results, type cyrillic "вода" - 0 results. Empty searchresults are for every cyrillic query.

Submitted by support on Wed, 2012-03-21 15:38

Hi Andrew,

Could you check whether this is a full text index issue? This can be disabled by changing line 8 of config.advanced.php as follows:

  $config_useFullText = FALSE;

Thanks,
David.
--
PriceTapestry.com

Submitted by AndrewT on Wed, 2012-03-21 15:48

It works. Thanks.