Support » Everything else WordPress » Table: wp_posts, column post_name not unicode.

  • Hey chaps,
    Im experiencing a bug I believe.

    Im using Danish letters æøå ÆØÅ.

    While entrys to the database table “wp_posts” column “post_title” and “post_content” are being written correctly with æøå, the column “post_name” are not.. eg:

    post_title: “Vedtægter”
    post_name: “vedt%c3%a6gter”

    This is a problem when I use wp_list_pages() and the permalink is the taking the “post_name” for href, this results in pages not found.

    A snippet of settings:

      define('DB_CHARSET', 'utf8');
      define('DB_COLLATE', '');
      define ('WPLANG', 'da_DK');

    Im running XAMPP on Vista 64 bit, and this is my development pc. I do however not consider it to be an OS or Apache issue.

    what to do, anyone with similar issues?

Viewing 2 replies - 1 through 2 (of 2 total)
  • Im digging around, finding others with similar problem.
    Aparently post_name is also called SLUG…

    And *sigh* I realise its sanitize_title() that makes a laugh at our language.

    what to do.. what to do…

    btw.. I dumped a code snippet from a plugin called “transliterado” into my functions.php … this dosent give me æøå letters, but atleast I dont get 404

    // ----   SLUG Permalink æøå   --- //
    $translate_language = array(
    	'da' => array(
    		'NOMO' => 'Dansk, Norsk',
    		'da_aeoeaa' => 'æ, ø, å → ae, oe, aa'
    $translate_system = array();
    function sanitize_title_dk($title)
    	global $translate_language, $translate_system;
    	if (!mb_check_encoding($title, 'ASCII'))
          foreach (array_keys($translate_language) as $language)
    		  $choise = 'da';
              switch ($choise)
                case 'da':
        		$translate_system[] = array
    	  foreach ($translate_system as $system)
    	  	$title = strtr($title, $system);
    	return $title;
    add_filter('sanitize_title', 'sanitize_title_dk', 0);
    // ----   SLUG Permalink æøå   END //

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Table: wp_posts, column post_name not unicode.’ is closed to new replies.