[fixed] Two Bugs in s9y current svn

Found a bug? Tell us!!
Post Reply
Boris

[fixed] Two Bugs in s9y current svn

Post by Boris »

First of all: s9y 0.9 seems to be very great!


The first bug is located in include/plugin_internal.inc.php:
in the long switch-statement is a duplicate Entry for show_atom0.3 and none for show_atom1.0 with the result, that there's no Atom 1.0-Option in the configuration.

Second: The function serendipity_makeFilename in include/functions_permalinks.inc.php is not utf-8 ready. I always helped myself converting it manually in 0.8x, but now s9y supports utf-8 this function should do this too. :)
If not, all those special chars are not converted, but striped from the URLs.
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Re: Two Bugs in s9y current svn

Post by garvinhicking »

Wow, that's two great gotchas you reported there! I fixed the both (hopefully) in our SVN, can you try that?

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/
Boris

Re: Two Bugs in s9y current svn

Post by Boris »

Garvin,
garvinhicking wrote:Wow, that's two great gotchas you reported there! I fixed the both (hopefully) in our SVN, can you try that?
Works for me.

Next one: Special chars in monthnames aren't working with utf8 too. Instead of "März" I get M[box]z. (Note: System Locale is not utf8, so strftime returns a iso8859-1 date, which has to be converted)
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Re: Two Bugs in s9y current svn

Post by garvinhicking »

Boris, the date problem is a bit heavier to solve; you'll need to load a UTF-8 system locale.

It is hard to figure out whether an included locale is UTF-8 or not, and thus we can't easily convert from/to UTF-8 if we don't really know which charset the system locale has; so sadly this is a bit reliant on the server config.

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/
Boris

Re: Two Bugs in s9y current svn

Post by Boris »

garvinhicking wrote:we can't easily convert from/to UTF-8 if we don't really know which charset the system locale has
That makes sense.
garvinhicking wrote:so sadly this is a bit reliant on the server config
Is there an easy way to do this on a shared host? I tried using setlocale in the index.php, which returned the desired de_DE@euro.utf-8, but it did not have an effect on the problem.

EDIT: Stupid me! The locale is set by serendipity_config.inc.php later. And the first locales in lang/UTF-8/serendipity_lang_de.inc.php are non-utf-8.
So I'll change it there

Ok. (Hopefully) final Edit: de_DE@euro.utf-8 was the wrong approach, de_DE.utf-8 works. To think about it, @euro on utf-8 does not make any sense (to me), but sadly setlocale did not return false on using it.
Post Reply