Forum OpenACS Development: util_text_to_url ideas

Collapse
Posted by Dave Bauer on
I had occasion to make some changes to util_text_to_utl for a client. One change was to preserve case when making the URL. I added a switch to allow this.

Another thing we looked at was the extended character changes for German, French, and Danish characters. To fullu support internationalized URLs I think we need to support the unicode characters and URLencode them, so that is another area to look into.

So two questions: is preserve-case a generally useful feature to add to util_text_to_url

and: should be look further into supporting URLs with unicode characters in them? This probably requires a toolkit-wide way to make sure that urls inside A tags are urlencoded correctly and only once.

Collapse
2: Re: util_text_to_url ideas (response to 1)
Posted by Matthias Melcher on
First all all, urls are much too long anyway, see https://openacs.org/bugtracker/openacs/bug?bug_number=997 and #9 in http://www.useit.com/alertbox/20021223.html , and have redundant parts. So there must be some way to specify or shorter one, explicitly (if this shorter name cannot be assigned for all longer titles as class and forum titles, anyway, leading to at least state-of-the-art breadcrumbtrails and navigation pane).
Compared to these severe usability problems, character set problems are minor, IMO.
Collapse
3: Re: util_text_to_url ideas (response to 1)
Posted by Dave Bauer on
Totally avoiding the URLs are too long debate... :)

I am just trying to operate on the priciple of least surprise, so that as little as possible is changed when a user enters a URL for an item, or when one is generated from a title.

Collapse
4: Re: util_text_to_url ideas (response to 3)
Posted by Tilmann Singer on
I don't like mixed case urls from an aesthetic point of view, but I don't see why it would do any harm as an option to util_text_to_url.

Regarding url-encoding unicode characters - I'm not sure if that is a good idea, wouldn't that mean we get ugly urls like /foo/h%63%81lich/, whereas the current hack for german characters would make that a /foo/haesslich/ ? I think that would defeat the purpose of util_text_to_url.

Collapse
5: Re: util_text_to_url ideas (response to 4)
Posted by Alfred Werner on
So mixed case stays - for germanic languages we have a good working solution - do we need to worry about this in non-latinate alphabets?
Collapse
6: Re: util_text_to_url ideas (response to 5)
Posted by Andrei Popov on
If the target is full i18n, then yes.

I, for one, am still very sceptical of (utility) these URLs in all the various languages (and IIRC, they currently work only in MSIE with a 3rd party plugin).  Note that English (and for that matter latin alphabet) is not my native language.