I am trying to import some users from a phpBB forum and found an odd thing: in phpBB I have some users with weird characters in the username. Eg: Henriëtte .

The problem is that in Drupal I can't create 2 users with the username "Henriëtte" and "henriette". Apparently "Henriëtte" = "henriette" and this will give an warning saying that the username already exists.

Is there any way to import both usernames in Drupal? Thanks.


The database encoding is utf8_general_ci. Also, after further investigation the user_load_by_name() function is responsible for returning a valid user even if one letter is different (ë > e). Also, user_load_by_name will in the end use entity_load() to load the user object.

  • 1
    What sort of encoding is your database using? – Darvanen Mar 3 '15 at 11:47
  • utf8_general_ci – Marius Ilie Mar 3 '15 at 13:38
  • That was the problem. I changed it to utf8_bin and now it is working as expected – Marius Ilie Mar 4 '15 at 10:11
  • That's good news – Darvanen Mar 4 '15 at 10:54

Found the answer.

The encoding should be utf8_bin not utf8_general_ci

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.