Page 1 of 1

[SOLVED]Problems with non-english chars in usernames when using last_modified_by

Posted: Sat Aug 04, 2007 8:17 am
by thomassi
Hi

I'm running cmsmadesimple 1.0.8 on a Debian 4.0:

zensonic@www:~$ uname -a
Linux www 2.6.18.1 #17 PREEMPT Wed Jun 27 18:25:00 CEST 2007 i686 GNU/Linux

with mysql:

zensonic@www:~$ mysql -V
mysql  Ver 14.12 Distrib 5.0.41, for pc-linux-gnu (i486) using readline 5.2

Standard install with a few modules (news and cmsmailer). Works fine (thanks for a excelent system!), except when using last_modified_by tag. The username works fine as long as I use english chars. The moment i use the danish chars Æ,Ø,Å, æ,ø,å I get garbled output. This is clearly a utf8 problem.

Can any of you wizards give your opinion as to why this happends? and what the proper fix and/or cause might be?

Thanks in advance.

Thomas S. Iversen, Copenhagen, denmark.

Re: Problems with non-english chars in usernames when using last_modified_by tag

Posted: Sat Aug 04, 2007 10:44 am
by thomassi
thomassi wrote: Hi

I'm running cmsmadesimple 1.0.8 on a Debian 4.0:
Just did a fresh install of cmsmadesimple 1.1 on the same box. Same problem :-(

http://elmtest3.groenbakken.dk/

Gives

Page last modified Saturday 04-Aug-07 12:43:04 CEST by Thomas Sandø Iversen

where it should be

Page last modified Saturday 04-Aug-07 12:43:04 CEST by Thomas Sandø Iversen

Re: Problems with non-english chars in usernames when using last_modified_by tag

Posted: Sat Aug 04, 2007 11:14 am
by thomassi
thomassi wrote:
thomassi wrote: Hi

I'm running cmsmadesimple 1.0.8 on a Debian 4.0:
Just did a fresh install of cmsmadesimple 1.1 on the same box. Same problem :-(

http://elmtest3.groenbakken.dk/

Gives

Page last modified Saturday 04-Aug-07 12:43:04 CEST by Thomas Sandø Iversen

where it should be

Page last modified Saturday 04-Aug-07 12:43:04 CEST by Thomas Sandø Iversen

Turns out to be due the smarty function itself:

return htmlentities($thisuser->firstname ." ". $thisuser->lastname);

Should read

return cms_htmlentities($thisuser->firstname ." ". $thisuser->lastname);

as the data in the database is infact utf-8 but htmlentities tries to escape it.

Re: [SOLVED]Problems with non-english chars in usernames when using last_modifie

Posted: Sun Aug 05, 2007 3:41 pm
by tsw
thanks, this just got into svn and will get into 1.1.1