Page 1 of 1

Illegal character encoding

Posted: Sun Jan 14, 2007 4:53 am
by mila
Hi,
I installed Serendipity, choose czech language and native charset (windows-1250).
I got lots of "Warning: mb_strlen(): Unknown encoding "windows-1250" in ..." errors.
The reason is obvious, this encoding is not supported by mb_* functions. Serendipity now tests if mbstring extension is loaded but doesn't test support for concrete charset.

I updated file lang.inc.php line:
$mbstring = (extension_loaded('mbstring') ? 1 : 0);
to
$mbstring = ((extension_loaded('mbstring') and @mb_internal_encoding(LANG_CHARSET)) ? 1 : 0);
and everything seems ok.

Sorry if my post is stupid but I'm new to Serendipity and searching the forum returns 404.

Re: Illegal character encoding

Posted: Sun Jan 14, 2007 1:57 pm
by garvinhicking
Hi!

Thanks a lot! I committed your fix to our repository.

Sadly the URL in the box above is not yet corrected, but the search in the top header should work!

Best regards,
Garvin