Page 1 of 1

[SOLVED]News Module - Problem with Title field Encoding in ver. 1.5.3 CMSMS

Posted: Wed Mar 25, 2009 9:15 pm
by webboy33
I noticed it in the new 1.5.3 version.
When i do a new article news, the title is on cirylic language \i use UTF-8 anywhere i can\.
On the front end, when the page is loaded, the news articles titles on left "short" news side are showing normal, except the mouse over comment, which is coming like this : �а��и по повод нови� �ай�

When i click on the article and it is loaded on the right content page side, the title become in the "wrong" way:
�а��и по повод нови� �ай�

I converted all module news templates in UTF-8. And the problem is still up.

Someone to know wich file exactly is the encoding problem with the title?

Re: News Module - Problem with Title field Encoding in ver. 1.5.3 CMSMS

Posted: Thu Mar 26, 2009 6:56 am
by Sonya
The problem is the core function in CMSMS /lib/smarty/plugins/modifier.escape.php

Code: Select all

function smarty_modifier_escape($string, $esc_type = 'html', $char_set = 'ISO-8859-1')
If you use utf-8 you have to change the function to

Code: Select all

function smarty_modifier_escape($string, $esc_type = 'html', $char_set = 'utf-8')
or use full modifier in the news template

Code: Select all

{$entry->title|escape:'html':'utf-8'}

Re: News Module - Problem with Title field Encoding in ver. 1.5.3 CMSMS

Posted: Thu Mar 26, 2009 7:49 am
by webboy33
Спосибо, Соня!  :-*
Меня из Болгария.
You are very deep in CMSMS, i am impressed!
I just wake up this morning with the thought to change back in 1.5.2 version. But when i read your post now, you make my day sunny :).

Re: [SOLVED]News Module - Problem with Title field Encoding in ver. 1.5.3 CMSMS

Posted: Sat Jun 27, 2009 10:55 am
by spiriralph
U can use {news lang='ru-RU'}