Forum

Questions and discussions

url rewriting issue with accented characters

Script's setup and configuration

url rewriting issue with accented characters

Postby mlavant » Thu Jul 19, 2012 3:36 pm

Hello everybody,
I run my website in french and sometime I use accented characters in the photos titles. The rewriting mode is working fine, but the accented characters are removed from the url instead of beeing replaced with a non accented letter.
How can I fix this issue ?
Is there something to change in the .htaccess file rewriting rules ?

Thanks for your help
Mathieu Lavant
http://www.brut-de-pixel.com
mlavant
 
Posts: 10
Joined: Mon Jun 06, 2011 4:51 pm

Re: url rewriting issue with accented characters

Postby admin » Fri Jul 20, 2012 6:03 am

If you use version 12.06 you can modify the file:
/admin/function/functions.php

line 1107:

Code: Select all
function make_translit($stroka)


and add the accented characters there.
admin
Site Admin
 
Posts: 1458
Joined: Sun Mar 07, 2010 5:55 pm

Re: url rewriting issue with accented characters

Postby mlavant » Fri Jul 20, 2012 8:56 am

Thanks for this advice.
I have installed the 12.06 update and added a few lines in the make_translit() function :

$string_cirillic["é"]="e";
$string_cirillic["è"]="e";
$string_cirillic["ê"]="e";
$string_cirillic["à"]="a";
$string_cirillic["ô"]="o";
$string_cirillic["î"]="i";
$string_cirillic["ù"]="u";

Now it works fine.
Could I suggest you to add this change in the next update

Mathieu Lavant
http://www.brut-de-pixel.com
mlavant
 
Posts: 10
Joined: Mon Jun 06, 2011 4:51 pm

Re: url rewriting issue with accented characters

Postby admin » Fri Jul 20, 2012 12:54 pm

I've added your code to the script.
I think it will be better to add the letters in uppercase too.
admin
Site Admin
 
Posts: 1458
Joined: Sun Mar 07, 2010 5:55 pm

Re: url rewriting issue with accented characters

Postby PascalP » Wed Sep 19, 2012 3:40 am

French alphabet

Code: Select all
       $string_cirillic["À"]="A";
   $string_cirillic["à"]="a";
   $string_cirillic["Â"]="A";
   $string_cirillic["â"]="a";
   $string_cirillic["Æ"]="Ae";
   $string_cirillic["æ"]="ae";
   $string_cirillic["Ç"]="C";
   $string_cirillic["ç"]="c";
   $string_cirillic["É"]="E";
   $string_cirillic["é"]="e";
   $string_cirillic["È"]="E";
   $string_cirillic["è"]="e";
   $string_cirillic["Ê"]="E";
   $string_cirillic["ê"]="e";
   $string_cirillic["Ë"]="E";
   $string_cirillic["ë"]="e";
   $string_cirillic["Î"]="I";
   $string_cirillic["î"]="i";
   $string_cirillic["Ï"]="I";
   $string_cirillic["ï"]="i";
   $string_cirillic["Ô"]="O";
   $string_cirillic["ô"]="o";
   $string_cirillic["Œ"]="Oe";
   $string_cirillic["œ"]="oe";
   $string_cirillic["Ù"]="U";
   $string_cirillic["ù"]="u";
   $string_cirillic["Û"]="U";
   $string_cirillic["û"]="u";
   $string_cirillic["Ü"]="U";
   $string_cirillic["ü"]="u";
   $string_cirillic["Ÿ"]="Y";
   $string_cirillic["ÿ"]="y";
       
PascalP
 
Posts: 41
Joined: Thu Apr 22, 2010 4:42 pm
Location: Tours, France

Re: url rewriting issue with accented characters

Postby thynksheraze » Tue Oct 23, 2012 7:56 am

How do we resolve this issue for earlier versions? Please advise.
thynksheraze
 
Posts: 156
Joined: Wed Nov 24, 2010 1:04 am


Return to Configuration

Who is online

Users browsing this forum: No registered users and 5 guests

cron
  Photo Store Script

Professional php photo stock script and WordPress plug-in for photographers and video producers.

  Support
  CMSaccount Inc.