Username completition broken for names with accents like Régis

Hello,

In my forum, people have real names with all different kind of accents. I tried to use the username completition launched by typing @ to mention a user while writing a response and found that I could not find users by their name if the name contains an é.

You can test it on your own. Try to find @zogstrip by typing @ followed by for Régis. The actual username lookup is https://meta.discourse.org/u/search/users?term=r&topic_id=65888&include_groups=true. Note that all characters from the e with accent on are stripped off from the search query.

3 Likes

I assume it is a similar issue for Chinese @fantasticfears ? Do you want to take sorting this out?

4 Likes

Sure, I’ll take a look into this.

4 Likes

In Europe, we have quite a few countries with numerous non-ASCII first and lastnames: Máté,
Zétény, Márton, Clémence, Léonie, Aïcha, etc.

So if for instance our German and English speaking forum users try to find or tag those people without having these accents on their keyboard, one might believe the database is incomplete. They just don’t appear if you type the first few letters.

tl;dr: Having this working is really important for regions with more heterogeneous character sets.

Rails should have some helpers therefore:

1.9.3p392 :001 > require "i18n"
 => true
1.9.3p392 :002 > I18n.transliterate("Hé les mecs!")
 => "He les mecs!"
1 Like

Any news? :slightly_smiling_face:

Should be close. Once some code is swept, it will come to alive :slight_smile:

4 Likes

Related commit:

https://github.com/discourse/discourse/pull/4974

2 Likes

I found a related topic:

The bug can still be reproduced. Régis cannot be tagged if you know not his lastname or his username @zogstrip. :frowning:

This works now. @eviltrout fixed it recently :+1:

image

And the request is

https://meta.discourse.org/u/search/users?term=r%C3%A9gis&topic_id=65934&include_mentionable_groups=true
5 Likes