dimis283
(Dimis283)
1
I have problem with greek characters and chtml-CActiveForm classess.
For example I write
<?php echo $form->labelEx($model,utf8_encode('τιτλε')); ?>
and there is ���������� -if I write
echo 'τιτλε'
is ok.
I use xampp 1.7.2.I also write chtml::encode().
What is wrong?
outrage
(Site Sense Web)
2
I haven’t tried this myself but was wondering if you’re trying to encode a string that is already UTF-8?
A simple function like this may help:
function fixEncoding($x){
if(mb_detect_encoding($x)=='UTF-8'){
return $x;
}else{
return utf8_encode($x);
}
}
imp489
(Imp489)
3
hi,
can you solve your problem
if yes,please say how?
thanks
you can also use utf-8 meta tag in page head section, i think this resolve your issues.
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
you can also read this article for more details: