VirtueMart Forum

VirtueMart 2 + 3 + 4 => Virtuemart Development and bug reports => Topic started by: d0ublezer0 on June 14, 2023, 14:40:56 PM

Title: Bug: VM4 Search cannot find products with cyrillic "Р" in name
Post by: d0ublezer0 on June 14, 2023, 14:40:56 PM
Hello! I have problem with VM Search.

How to reproduce: create product with capitalised cyrillic "Р" in product name, try to search in admin panel or in site. In my case always got empty results.
For reproducing "Р" must be standalone or at the end of string:
Product name: "Р"
Product name: "Item Р"
Product name: "Item.Р"

But search worked, if capitalised cyrillic "Р" appears at start or middle of string:
"Р Item"
"Item Р Item"

VM 4.0.12 10777
Joomla 4.2.8

DB in unicode
Title: Re: Bug: VM4 Search cannot find products with cyrillic "Р" in name
Post by: hazael on June 16, 2023, 15:06:22 PM
On the server you should use proper headers - like this:
Quoteheader('Content-Type: text/html; charset=utf-8');

Cyrillic is not just one type of alphabet or language. Russian and Ukrainian, although they use the Cyrillic alphabet, their alphabet and order of characters is slightly different.
The order of characters in the search results depends on which character set you choose in your database. Therefore, you need to choose the right character set for you
http://download.nust.na/pub6/mysql/doc/refman/5.4/en/charset-charsets.html