1

We have a mail client that displays the folders of the mail account in a list. I am not sure, how to sort the folders when the user has "strange" folder names like emojis. This should not be underrated: many people user folders named like ☑️ or ✮ to give them a meaning. iOS is sorting a snowman ☃ before an A, but in php will put the snowman at the end of the list. The list is not sortable manually.

  • Seems like both should be sorting unicode the same. – paparazzo Oct 17 '17 at 17:58
  • Sorry, was not clear about that: sorting by codepoint does not sort in a natural way: "A" is 41, "a" us 61, so the small "a" will be displayed after all capital letters what gives kind of an unnatural feeling. – Tobias Oct 18 '17 at 8:24
2

Require at least some text
I think the best route would be to force the user to enter some text along with their emoji, then you can sort on the text and ignore the emoji. A folder named "☑️ Read Mail" would just be sorted by the R. This is the most logical way since that's how sentences with emojis are read. "☃ Christmas List" isn't read as "Snowman Christmas List", the emoji is ignored and you read "Christmas list" with the emoji as a decoration or addition.

Allow no supporting text, turn emoji to text
If you insist on allowing users to add emoji only names, to sort things you have to put them into the same bucket. Sorting fruit with cars doesn't make sense, text and Emojis are different things and thus don't mix well.

I propose turning the Emoji's into text so that they can be treated as equals and sorted more easily. Fortunately, Emojis are standardized under Unicode specifications:

See: https://unicode.org/emoji/charts/full-emoji-list.html.

You can choose either "short name" or the Unicode "code", but the important part is it will be consistent. Your snowman 'U+2603' would come before your checkbox 'U+2611' every time.

However, this does lead to all of your lists that start with Emojis to be right in the middle of 'U'/'V' so I suggest dropping the 'U+' (which will likely help you when you sanitize input anyway) which would then leave only numbers and all of your emojis at the beginning like iOS does.

  • Requiring the user to use at least some text ist a good idea! Thanks. – Tobias Oct 18 '17 at 8:19

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.