Umlaut Translation in SEF URLs

Found a bug? Tell us!!
Post Reply
mo
Regular
Posts: 40
Joined: Sun Jan 27, 2008 11:33 pm
Contact:

Umlaut Translation in SEF URLs

Post by mo »

I'm not sure if this is considered to be a bug, but it definitely looks ugly that upper-case umlauts are translated into uppercase SEF URLs.

Example:

"Überregionales" turns into "UEberregionales" in the article URL, while it really should be "Ueberregionales".
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Re: Umlaut Translation in SEF URLs

Post by garvinhicking »

Hi!

And if you write "ÜBERREGIONALES" you would get "UeBERREGIONALES". Which one looks uglier? ;)

What I try to say: In either variant you have a problem. Detecting if the next character is upper- or lowercase has a definite performance impact and requires ugly callback regular expression calls.

I personally favor to stick with the current approach...other opinions?

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/
mo
Regular
Posts: 40
Joined: Sun Jan 27, 2008 11:33 pm
Contact:

Post by mo »

I don't see why it should be so much of a performance issue; don't you have to do it one time only?

How flexible is the URL parser? Is it possible that a plugin allows the author to specify the URL (at least the title part) individually for each article?

Not sure if anyone actually uses all-uppercase titles for articles, so personally I'd vote for Ü to Ue without looking at the neighbor characters.
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Post by garvinhicking »

Hi!
mo wrote:I don't see why it should be so much of a performance issue; don't you have to do it one time only?
No, the permalinks are often generated on the fly again and again, not fetched from the database. That depends if you use %id% in your URL or not.
How flexible is the URL parser? Is it possible that a plugin allows the author to specify the URL (at least the title part) individually for each article?
Yes, there's the plugin serendipity_event_custom_permalinks (from spartacus) where you can specify additional permalinks to your entry. You cannot edit the hardcoded permalink, but specify a second permalink that is used as the preference.
Not sure if anyone actually uses all-uppercase titles for articles, so personally I'd vote for Ü to Ue without looking at the neighbor characters.
It's been "Ue" in the serendiptiy versions of the past 5 years without anyone complaining. So chances are, people might get annoyed if we actually change it? ;)

If you want to manually patch it, you can have a look at include/functions_permalinks.inc.php, top of the file serendipity_makefilename(). Jsut change "UE" with "Ue" and so forth.

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/
mo
Regular
Posts: 40
Joined: Sun Jan 27, 2008 11:33 pm
Contact:

Post by mo »

Thanks, that's good enough for me. :D
Post Reply