charmi
(Chermi Ma)
1
CeBe
2
Can not reproduce the problem. Are you manually doing uft8_decode or utf8_encode somewhere?
Can you show the code that creates the pager?
charmi
(Chermi Ma)
3
<?php
/* @var $this SiteController */
$this->pageTitle=Yii::app()->name;
?>
<?php
Yii::app()->clientScript->registerScript('search',
"var ajaxUpdateTimeout;
var ajaxRequest;
$('input#q').keyup(function(){
ajaxRequest = $(this).serialize();
clearTimeout(ajaxUpdateTimeout);
ajaxUpdateTimeout = setTimeout(function () {
$.fn.yiiListView.update(
'ajaxListView',
{data: ajaxRequest}
);
},
5);
});
$('input#lan').change(function(){
ajaxRequest = $(this).serialize();
clearTimeout(ajaxUpdateTimeout);
ajaxUpdateTimeout = setTimeout(function () {
$.fn.yiiListView.update(
'ajaxListView',
{data: ajaxRequest}
);
},
5);
});
;"
);
$this->widget('zii.widgets.CListView', array(
'dataProvider'=>$dataProvider,
'itemsTagName' => 'table',
'itemsCssClass' => 'thread',
'itemView'=>'_view',
'template' => '{pager}{sorter}{items}{pager}',
'cssFile' => '/css/test.css',
'enableHistory' => true,
'id'=>'ajaxListView',
'pager'=>array(
'class'=>'CLinkPager',
'header'=>'',
'cssFile'=> '/css/test.css',
),
'sortableAttributes'=>array(
'title' => 'Titre',
'create_date'=>'Date',
)
))
?>
<br>
Pager fails when I am searching with a french word like président.
My search form is here
<?php
echo CHtml::beginForm(CHtml::normalizeUrl(array('site/index')), 'get', array('id'=>'filter-form'))
. CHtml::textField('q', (isset($_GET['q'])) ? $_GET['q'] : '', array('id'=>'q', 'size' => '20'))
. CHtml::dropDownList('lan', (isset($_GET['lan'])) ? $_GET['lan'] : 'AR+FR', array('AR+FR'=> 'Multi-langue', 'AR' => 'عربي', 'FR' => 'français'))
. CHtml::submitButton('Search', array('name'=>'','text'=>'Chercher', 'class'=>'button' ))
. CHtml::endForm() .'<br>';
?>
Thanks.