Support » Requests and Feedback » [Req] better accents conversion in permalinks

  • I have a post entitled “Je déteste Paris” (note the accent)
    The resulting permalink is /2004/05/06/je-dteste-paris/ which doesnt make sense. Accent letters (not sure how to call them) should be converted into “non accent” letters, instead of being simply removed. /je-deteste-paris/ is perfectly understandable.
    So, “é” should be converted into “e”, “à” into “a”, and so on (I can provide a full list if necessary)
    Thanks

Viewing 5 replies - 1 through 5 (of 5 total)
  • This problem seems to be fixed in 1.2b. (?)
    In previous versions, I used to put this function inside my my-hacks.php file:

    function removeaccents($string) {
    return strtr($string, "ŠšŸÀ�ÂÃÄÅÆÇÈÉÊËÌ�Î�ÑÒÓ�ÕÖÙÚÛÜ�àáâãäåæçèéêëìíîïñòóôõöùúûüý", "SsYAAAAAAACEEEEIIIINOOOOOUUUUYaaaaaaaceeeeiiiinooooouuuuy");
    }

    And in /wp-includes/functions.php add this line in function satinize_title:

    $title = removeaccents($title);

    after

    $title = preg_replace('/&.+;/', '', $title); // kill entities

    This worked for me. Hope it helps. If not, post again.

    WP 1.2b has the same issue… You can use the same procedure above. You will find the function sanitize_title inside /wp-includes/functions-formatting.php

    Thread Starter Ozh

    (@ozh)

    great, thanks 🙂

    I’d really like to see this built-in on WP. Any chance?

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘[Req] better accents conversion in permalinks’ is closed to new replies.