Support » Fixing WordPress » problems with 3.1 – permalink – norwegian character

  • My permalink structure is like this: /%postname%/

    When a title contains the characters å or æ, they are transformed til a and ae. Great.
    When I use an ø it is NOT transformed, causing all kinds of problems.

    I hoped this bug would be fixed by 3.1, but I need a workaround.

    Anybody?

    \fred M

Viewing 2 replies - 1 through 2 (of 2 total)
  • chasba

    (@chasba)

    I am also looking for an answer to this problem.

    If I try to add f.ex. ‘blåbærsyltetøy‘ to the title, I get ‘blabaersyltetøy‘ in return. I was hoping to see either ‘blaabaersyltetoey‘ or ‘blåbærsyltetøy‘.

    Hopefully someone will be able to help us with this. Thanks.

    I had the same problem, and after a lot of testing I came up with a method to rewrite Ø and ø to O and o in post titles and permalinks. I don’t know how to make a plugin out of this, so as for now, we have to edit the core files.

    1. Open wp-includes/formatting.php and scroll to line 655 (approx).

    2. After all the decompositions, and between $string = strtr($string, $chars); and } else {, paste the following:

    // Fix ø and Ø
    		$chars['o-in'] = array('Ø','ø');
    		$chars['o-out'] = array('O','o');
    		$string = str_replace($chars['o-in'],$chars['o-out'],$string);

    3. Make sure you save the file as utf-8.

    Hope this helps!

    (I am using WP 3.1.1)

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘problems with 3.1 – permalink – norwegian character’ is closed to new replies.