Support » Requests and Feedback » Can’t use Latvian letters in User names?!

  • I made all database explicitly UTF-8. But still as soon as I replace Talivaldis with proper Latvian letters Tālivaldis, I get T?livaldis. Why WordPress doens’t display second letter properly? When I look in the MySQL database, there 2nd character is saved and displayed properly, the problem is with the WordPress. And also in the web page it is displayed with the question mark instead of ā letter. HELP!

Viewing 5 replies - 1 through 5 (of 5 total)
  • Moderator Samuel Wood (Otto)

    (@otto42) Admin

    What is the database charset set to in your wp-config.php file?

    What is the database charset/collation set to when you look at the actual MySQL database?

    See how they don’t match? You might want to change them all to UTF8.

    Thread Starter Guntis


    There’s nothing in wp-config.php file regarding charsets. In the end of the wp-settings.php I’ve added lines:

    mysql_query(“SET CHARACTER SET utf8”);
    mysql_query(“SET NAMES utf8”);

    which force UTF-8 connection with the database. I already wrote that all database is UTF-8 (utf8_unicode_ci). User name is properly saved in the database with Latvian characters. In phpMyAdmin I can see it in the wp-usermeta table (nickname and first_name fields). The problem is that those characters in the user names are not displayed by the WordPress properly (in the Admin/Users page and in the main page where the article authors are displayed). If I post anything in Latvian, it’s displayed properly, but user names are not. Why?

    I have experienced so the Hungarian accented characters have disappeared from user names in WP 2.7.
    (For e.g. Béla becomes Bla now.)
    All in the previous versions these accented names were OK.
    I think this is a v.2.7 related bug.

    Thread Starter Guntis


    Actually I had problem also in the previous version, just before the upgrade. And in the latest version (2.7) the same problem.

    By the wat, I can’t understand why WordPress is creating database with the Swedish charset as default. I always have to dump database to sql file, change charset info to utf8, then import it back. And those three lines at the end of the wp-settings.php file also are not added, so if I forget to add them after each update manually, I get Latvian text unreadable. If WordPress is going to Unicode, is it hard to make correct database charset setup and establish utf-8 connection with the database? 3 lines of code and it’s done…

    I have tried all plugins switched off, and Gears reload, but these didn’t do any change in the names.

    Unfortunately when I have checked the database, the names are there also without accented letters. A strange conversion happened.
    Maybe the webhost provider upgraded the MySQL version, and this is a side effect? I do not know.

    At present:
    Server version: 5.0.67-community
    MySQL client version: 5.0.67
    phpMyAdmin –

    I manually have overwritten the names in the phpMyAdmin (in the users, and usermeta fields). There were only 2 names affected, and now everything seems to be OK with the names.
    Of course this is just a temporary bugfixing.

    Unfortunately I am not a programmer, and even I don’t know how to submit a bug report to Trac.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Can’t use Latvian letters in User names?!’ is closed to new replies.