I looked a bit around and found a peace of code with which I was able to create a plugin.
<?php
/*
Plugin Name: UTF-8 usernames
Description: This plugin enables utf-8 characters in usernames. Mbstring must be enabled in the php.ini.
*/
function sanitize_user_mbstring( $raw_username, $username, $strict = false ) {
$raw_username = $username;
$username = strip_tags($username);
// Kill octets
$username = preg_replace(‘|%([a-fA-F0-9][a-fA-F0-9])|’, ”, $username);
$username = preg_replace(‘/&.+?;/’, ”, $username); // Kill entities
// Usage of ‘mb_ereg_replace’ instead of ‘preg_replace’ to preserve accents.
if ( $strict )
$username = mb_ereg_replace(‘|[^a-z0-9 _.-@]|i’, ”, $username);
return apply_filters(‘sanitize_user_mbstring’, $username, $raw_username, $strict);
}
add_action(‘sanitize_user’, ‘sanitize_user_mbstring’, 0, 3);
?>
Unfortunately it doesn’t work properly. When it displays correctly in bbpress it doesn’t in wordpress and reverse. I don’t have access to the php.ini. Could it be, that the thing with “mbstring” is the problem?