Illegal character encoding

Found a bug? Tell us!!
Post Reply
mila
Posts: 1
Joined: Sun Jan 14, 2007 4:23 am

Illegal character encoding

Post 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.
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Re: Illegal character encoding

Post 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
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
Post Reply