Special chars in titles - conversion plugin, maybe?

Random stuff about serendipity. Discussion, Questions, Paraphernalia.
Post Reply
KodrutZ
Regular
Posts: 17
Joined: Sun Dec 07, 2008 11:05 am
Location: Romania
Contact:

Special chars in titles - conversion plugin, maybe?

Post by KodrutZ »

Is there a conversion plugin for special chars in article names? For example, let's say that the article name is "Șăptică cu șoșoni" and, as my Serendipity works right now, the result would be a non-working link to the article, because the special chars would not be saved. I hope I made myself understood a bit... so what I want is a solution for the title to be converted to normal chars in URL - www.domain.com/saptica-cu-sosoni, something like that.
yellowled
Regular
Posts: 7111
Joined: Fri Jan 13, 2006 11:46 am
Location: Eutin, Germany
Contact:

Re: Special chars in titles - conversion plugin, maybe?

Post by yellowled »

KodrutZ wrote:For example, let's say that the article name is "Șăptică cu șoșoni" and, as my Serendipity works right now, the result would be a non-working link to the article, because the special chars would not be saved.
Can you give us a proper (live) example of how this does not work in your case?

I have never seen this in another language than German, but similar characters in an entry URL in German will be converted by the Serendipity core and kept in the entry title. If I understand you correctly, this does not work in Romanian?

YL
KodrutZ
Regular
Posts: 17
Joined: Sun Dec 07, 2008 11:05 am
Location: Romania
Contact:

Re: Special chars in titles - conversion plugin, maybe?

Post by KodrutZ »

http://www.nistorcodrut.com/archives/Un ... un-inceput - One of the special chars - "ș" has been deleted in the URL, strange enough since it converted î to i...
P.S. Seems I can't replicate what happened yesterday when the link to the post from the main page in my blog wasn't working at all...
LazyBadger
Regular
Posts: 176
Joined: Mon Aug 25, 2008 12:25 pm
Location: Russia
Contact:

Re: Special chars in titles - conversion plugin, maybe?

Post by LazyBadger »

KodrutZ wrote:Is there a conversion plugin for special chars in article names?
No, and it does not needed at all.

For any 8-bit language (which has chars outside enabled in URLs) language-file may and must have two arrays of chars:

Code: Select all

i18n_filename_from
and

Code: Select all

i18n_filename_to
, and pairs in arrays define transliteration rules. Wrong chars without rule will be skipped in final string, as you can see

BTW, serendipity_lang_ro.inc.php doesn't have these arrays in vanilla translation, but must
Quis custodiet ipsos custodes?
Post Reply