itmgk

Topic: bugs with charset...

Hi!
i install jobberbase, create russian lang file...
replace all,that needs...
bit i see one bug in search.
if i typing search string (live search) - all be ok
if i press <Enter> after typing - i see 2 plase with broken charset...
anyone known how fix it problem?
Thank u

1) right chars -
right charset if use live search
1) broken chars -
broken charset if search on press Enter

Бизнес портал города магнитогорск - все о Магнитогорске: работа в Магнитогорске, недвижимость Магнитогорска, карта Магнитогорска, расписание самолетов, поездов, автобусов.

elgreco

Re: bugs with charset...

ok
in the string htmlentities  ( string $string  [, int $quote_style  [, string $charset  [, bool $double_encode  ]]] ) should be added UTF-8 as $charset

here is an example:

find the 2 stings which inclide ENT_QUOTES, and add a , 'UTF-8'

thats all

Code:

        // save recorded keywords, if available
        if ($_SESSION['search_keywords'])
        {
            $search = new SearchKeywords($_SESSION['search_keywords']);
            $search->Save();
            unset($_SESSION['search_keywords']);
        }
        $smarty->assign('keywords', stripslashes(htmlentities($requestKeywords, ENT_QUOTES, 'UTF-8')));
        $template = 'search.tpl';
    }
    else if ($id != '' && !strstr($id, '|'))
    {
        $smarty->assign('keywords', stripslashes(htmlentities($id, ENT_QUOTES, 'UTF-8')));
        $template = 'search.tpl';
    }
    else
    {
        $smarty->assign('keywords', stripslashes($keywords));
        $template = 'posts-loop.tpl';

itmgk

Re: bugs with charset...

thank u, elgreco smile

Бизнес портал города магнитогорск - все о Магнитогорске: работа в Магнитогорске, недвижимость Магнитогорска, карта Магнитогорска, расписание самолетов, поездов, автобусов.