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

For questions and problems with the CMS core. This board is NOT for any 3rd party modules, addons, PHP scripts or anything NOT distributed with the CMS made simple package itself.
Locked
thomassi

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

Post 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.
Last edited by thomassi on Sat Aug 04, 2007 11:14 am, edited 1 time in total.
thomassi

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

Post 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
thomassi

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

Post 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.
tsw
Power Poster
Power Poster
Posts: 1408
Joined: Tue Dec 13, 2005 10:50 pm

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

Post by tsw »

thanks, this just got into svn and will get into 1.1.1
Locked

Return to “CMSMS Core”