SlimStat throws warning for mb_convert_encoding

4 views
Skip to first unread message

r.wet...@gmail.com

unread,
Feb 23, 2006, 3:06:27 PM2/23/06
to SlimStat
Hi,

On a fresh install of slimstat, I receive several warning messages
stating "Warning: mb_convert_encoding(): Illegal character encoding
specified in /srv/www/vhosts/xxx/slimstat/_functions.php on line 553"

The offending line is:
return mb_convert_encoding( strftime( "%H:%M", $_dt ), "UTF-8", "BIG-5"
);

Is it safe to use time_label() from version 0.9 to get rid of those
warnings?

Regards,

Robert

Matthew Price

unread,
Feb 26, 2006, 7:36:09 PM2/26/06
to SlimStat
Same thing is happening to me. I just redownloading everything and
started with a refresh database. Still no luck.

Anyone have any ideas?

Matthew Price

unread,
Feb 26, 2006, 8:17:37 PM2/26/06
to SlimStat
Actually, mine is reporting lines 526 and 528, but tey say roughly the
same thing.

skoggy

unread,
Mar 2, 2006, 3:58:09 PM3/2/06
to SlimStat
Fatal error: Call to undefined function mb_convert_encoding() in
...mypath...\slimstat\_functions.php on line 542

This is shown at my Slimstat page where there should be stats. The
navbar and other slimstat content is shown.

No errors during installation.

//skoggy

Stephen Wettone

unread,
Mar 2, 2006, 4:32:06 PM3/2/06
to slim...@googlegroups.com

Yes, you can use time_label() from version 0.9 of SlimStat to get rid
of those warnings. It's otherwise identical and will be compatible.
If you don't have a copy of it, it's still here:

http://wettone.com/code/download/slimstat-0.9-no-country.zip

Alternatively, you can edit it to remove the calls to
mb_convert_encoding() and it will work fine. So lines like this:

return mb_convert_encoding( strftime( "%H:%M", $_dt ), "UTF-8",
"BIG-5" );

should look like this:

return strftime( "%H:%M", $_dt );

They were added to handle conversion of the Chinese characters, and
if you're not using Chinese then you won't notice the difference. I'm
clearly going to have to re-jig things so that the character
conversion is done in a more sensible place.

Cheers, and sorry for the delay in replying.


Stephen

skoggy

unread,
Mar 2, 2006, 5:45:52 PM3/2/06
to SlimStat
Works! :) I´m not a coder in any sence so it took me some time to
figure things out but I made it. That means that almost anyone could...

Thanks!

Reply all
Reply to author
Forward
0 new messages