# Emoji not recognized after cyrillic symbols

**URL:** <https://meta.discourse.org/t/emoji-not-recognized-after-cyrillic-symbols/72091>\
**Category:** Support\
**Created:** [2017年十月15日 03:22 UTC](https://meta.discourse.org/t/emoji-not-recognized-after-cyrillic-symbols/72091 "2017-10-15T03:22:14Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![meglio](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/meglio/32/71444_2.png) [@meglio](https://meta.discourse.org/u/meglio)\
**Post date:** [2017年十月15日 03:22 UTC](https://meta.discourse.org/t/emoji-not-recognized-after-cyrillic-symbols/72091/1 "2017-10-15T03:22:14Z")

</div>

Example:

```
Всегда можно уделить время туристу:slight_smile:

```

Renders as:

> Всегда можно уделить время туристу:slight\_smile:

Here, there is no space between the emoji code and the Russian word preceeding it.

Compare to English:

> there’s always time to spend with a visitor:slightly\_frowning\_face:

Looks like it’s not recognized after latin words either.

Is thins a bug or by design?

---

<div class="post-metadata">

**Author:** ![codinghorror](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/codinghorror/32/110067_2.png) [@codinghorror](https://meta.discourse.org/u/codinghorror)\
**Post date:** [2017年十月15日 03:24 UTC](https://meta.discourse.org/t/emoji-not-recognized-after-cyrillic-symbols/72091/2 "2017-10-15T03:24:55Z")

</div>

Space is required in all languages for that to work.

---

<div class="post-metadata">

**Author:** ![meglio](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/meglio/32/71444_2.png) [@meglio](https://meta.discourse.org/u/meglio)\
**Post date:** [2017年十月15日 03:26 UTC](https://meta.discourse.org/t/emoji-not-recognized-after-cyrillic-symbols/72091/3 "2017-10-15T03:26:08Z")

</div>

Hm why? Plenty of people keep inserting smiles with no space. Requiring a space is not intuitive.

Is it fixable by changing a regex?

---

<div class="post-metadata">

**Author:** ![schungx](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/schungx/32/70989_2.png) [@schungx](https://meta.discourse.org/u/schungx)\
**Post date:** [2017年十月15日 08:30 UTC](https://meta.discourse.org/t/emoji-not-recognized-after-cyrillic-symbols/72091/4 "2017-10-15T08:30:59Z")

</div>

My suggestion is to have the emoji picker inserts spaces. Either around or just before.

I have a huge problem with this also. It is worse because many of my users are Chinese and Chinese does t use spaces.

---

<div class="post-metadata">

**Author:** ![zogstrip](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/zogstrip/32/512781_2.png) [@zogstrip](https://meta.discourse.org/u/zogstrip)\
**Post date:** [2017年十月16日 09:54 UTC](https://meta.discourse.org/t/emoji-not-recognized-after-cyrillic-symbols/72091/5 "2017-10-16T09:54:43Z")

</div>

> [@meglio](#):
>
> Hm why?

Because otherwise, links like

```
https://www.discourse.org

```

would become

```
https:confused:/www.discourse.org

```

---

<div class="post-metadata">

**Author:** ![meglio](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/meglio/32/71444_2.png) [@meglio](https://meta.discourse.org/u/meglio)\
**Post date:** [2017年十月16日 10:41 UTC](https://meta.discourse.org/t/emoji-not-recognized-after-cyrillic-symbols/72091/6 "2017-10-16T10:41:15Z")

</div>

May we allow the no-space syntax for **named emojis only**?

So, only `:confused:` will work with no spaces, but not `://`

---

<div class="post-metadata">

**Author:** ![schungx](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/schungx/32/70989_2.png) [@schungx](https://meta.discourse.org/u/schungx)\
**Post date:** [2017年十月16日 15:06 UTC](https://meta.discourse.org/t/emoji-not-recognized-after-cyrillic-symbols/72091/7 "2017-10-16T15:06:51Z")

</div>

No, @meglio, what @zogstrip mean is that:

`:/` as well as `:confused:` both map to 😕

Emoji’s start off as simple text-based combos like `:-)`, `:-o` etc.

You have to be an old dog like myself to remember the times when we used text-based emoji’s on Unix talk.

So, there are a large number of combinations starting with a colon that may map into an emoji, but shouldn’t if it is not separated by a space (for example, the `:/` above, when attached to `http`, should obviously mean `http://` instead of an emoji). Without this space rule, the MarkDown processor has no way to tell if there should be an emoji or not.

So, my suggestion remain: automatically add a space in front (or both in front and after) the emoji, _when chosen by the emoji picker_.

Or, alternatively, modify the emoji processor to only recognize fully-spelt emoji names in non-space applications. For example: `:/` is only recognized with a space before, but `:confused:` is always recognized wherever it is.

---

<div class="post-metadata">

**Author:** ![meglio](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/meglio/32/71444_2.png) [@meglio](https://meta.discourse.org/u/meglio)\
**Post date:** [2017年十月16日 15:21 UTC](https://meta.discourse.org/t/emoji-not-recognized-after-cyrillic-symbols/72091/8 "2017-10-16T15:21:59Z")

</div>

> [@schungx](#):
>
> Or, alternatively, modify the emoji processor to only recognize fully-spelt emoji names in non-space applications. For example: 😕 is only recognized with a space before, but 😕 is always recognized wherever it is.

That’s exactly what I meant:

> [@meglio](#):
>
> May we allow the no-space syntax for named emojis only?
> 
> So, only `:confused:` will work with no spaces, but not `://`

And because lots of emojis are inserted from the Emoji Dialog, there will be fully spelled versions used.

---

<div class="post-metadata">

**Author:** ![schungx](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/schungx/32/70989_2.png) [@schungx](https://meta.discourse.org/u/schungx)\
**Post date:** [2017年十月16日 15:43 UTC](https://meta.discourse.org/t/emoji-not-recognized-after-cyrillic-symbols/72091/9 "2017-10-16T15:43:40Z")

</div>

Modifying the MarkDown processor may be a bit hairy…

My suggestion of adding a space in front of an emoji chosen from the emoji picker dialog requires simply changing one single line. MarkDown is mostly not space conscious, so adding an extra space in most places will do nothing to it.

---

<div class="post-metadata">

**Author:** ![meglio](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/meglio/32/71444_2.png) [@meglio](https://meta.discourse.org/u/meglio)\
**Post date:** [2017年十月16日 23:57 UTC](https://meta.discourse.org/t/emoji-not-recognized-after-cyrillic-symbols/72091/10 "2017-10-16T23:57:45Z")

</div>

> [@schungx](#):
>
> MarkDown is mostly not space conscious, so adding an extra space in most places will do nothing to it.

Yes, one-liner solution to add an extra-space sounds reasonable. It will also make sense to only add it if it’s not there yet.

---

<div class="post-metadata">

**Author:** ![meglio](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/meglio/32/71444_2.png) [@meglio](https://meta.discourse.org/u/meglio)\
**Post date:** [2017年十一月24日 13:37 UTC](https://meta.discourse.org/t/emoji-not-recognized-after-cyrillic-symbols/72091/11 "2017-11-24T13:37:03Z")

</div>

Btw, this is still a huge issue for us. Note how the Russian message in the image below spoiled with English emoji codes.

 ![image](https://global.discourse-cdn.com/meta/original/3X/f/2/f2188b08df303cf6814192b78bda8538377fa0bf.jpg)

I now have to fix it manually (and ask my mods to do so), and it takes so much time, every single day.

---

<div class="post-metadata">

**Author:** ![gerhard](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/gerhard/32/119479_2.png) [@gerhard](https://meta.discourse.org/u/gerhard)\
**Post date:** [2017年十一月24日 14:13 UTC](https://meta.discourse.org/t/emoji-not-recognized-after-cyrillic-symbols/72091/12 "2017-11-24T14:13:16Z")

</div>

I think we can make two changes to make this a little bit easier to use:

- Emoji selector should insert a leading ~~and trailing~~ whitespace when it inserts an emoji.
- Replacing of Unicode emojis should work even when there are no surrounding whitespaces.  
So, `Hello🙂world` should work the same as `Hello 🙂 world` and use the correct Emoji image from Discourse 🙂.

---

<div class="post-metadata">

**Author:** ![nixie](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/nixie/32/82174_2.png) [@nixie](https://meta.discourse.org/u/nixie)\
**Post date:** [2017年十一月24日 14:18 UTC](https://meta.discourse.org/t/emoji-not-recognized-after-cyrillic-symbols/72091/13 "2017-11-24T14:18:42Z")

</div>

> [@gerhard](#):
>
> Emoji selector should insert a leading and trailing whitespace when it inserts an emoji.

I like this.  
This happens a lot in my discourse site. My users forget to add a white-space before inserting emoji’s. I’m guessing its because they are not used to that - because in other platforms like whatsapp etc. its somehow taken care automatically.

@gerhard  
Is it going to be a quick fix at Discourse end?  
Or do you think this can be accomplished using CSS too?

---

<div class="post-metadata">

**Author:** ![j.jaffeux](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/j.jaffeux/32/60297_2.png) [@j.jaffeux](https://meta.discourse.org/u/j.jaffeux)\
**Post date:** [2017年十一月24日 14:39 UTC](https://meta.discourse.org/t/emoji-not-recognized-after-cyrillic-symbols/72091/14 "2017-11-24T14:39:46Z")

</div>

We can’t do the trailing one because of diversity level modifier `:woman:t4:` it would break the flow of selecting `:woman:` and then typing `t` to display the menu.

---

<div class="post-metadata">

**Author:** ![schungx](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/schungx/32/70989_2.png) [@schungx](https://meta.discourse.org/u/schungx)\
**Post date:** [2017年十一月24日 15:13 UTC](https://meta.discourse.org/t/emoji-not-recognized-after-cyrillic-symbols/72091/15 "2017-11-24T15:13:15Z")

</div>

The trailing space is not needed. What’s critical is the leading space.

---

<div class="post-metadata">

**Author:** ![gerhard](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/gerhard/32/119479_2.png) [@gerhard](https://meta.discourse.org/u/gerhard)\
**Post date:** [2019年四月23日 14:54 UTC](https://meta.discourse.org/t/emoji-not-recognized-after-cyrillic-symbols/72091/17 "2019-04-23T14:54:36Z")

</div>

> [@gerhard](#):
>
> - Emoji selector should insert a leading ~~and trailing~~ whitespace when it inserts an emoji.
> - Replacing of Unicode emojis should work even when there are no surrounding whitespaces.  
> So, `Hello🙂world` should work the same as `Hello 🙂 world` and use the correct Emoji image from Discourse 🙂.

Hey @venarius,  
is this something you’d like to improve given that you spent a lot of time fixing various Emoji issues lately?

---

<div class="post-metadata">

**Author:** ![venarius](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/venarius/32/133142_2.png) [@venarius](https://meta.discourse.org/u/venarius)\
**Post date:** [2019年四月23日 15:21 UTC](https://meta.discourse.org/t/emoji-not-recognized-after-cyrillic-symbols/72091/18 "2019-04-23T15:21:01Z")

</div>

I will look into it 🙂 Thanks for tagging!

---

<div class="post-metadata">

**Author:** ![venarius](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/venarius/32/133142_2.png) [@venarius](https://meta.discourse.org/u/venarius)\
**Post date:** [2019年四月24日 15:03 UTC](https://meta.discourse.org/t/emoji-not-recognized-after-cyrillic-symbols/72091/19 "2019-04-24T15:03:41Z")

</div>

Opened a PR 🙂

[https://github.com/discourse/discourse/pull/7429](https://github.com/discourse/discourse/pull/7429)

Regarding

> [@gerhard](#):
>
> Replacing of Unicode emojis should work even when there are no surrounding whitespaces.

As far as I recognized it, this got added with the `enable_inline_emoji_translations` site setting. I noticed that `emojiEscape` and `emojiUnescape` didn’t support that site setting so I added it 🙂

---

<div class="post-metadata">

**Author:** ![gerhard](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/gerhard/32/119479_2.png) [@gerhard](https://meta.discourse.org/u/gerhard)\
**Post date:** [2019年十二月3日 19:42 UTC](https://meta.discourse.org/t/emoji-not-recognized-after-cyrillic-symbols/72091/23 "2019-12-03T19:42:05Z")

</div>

我接手了 @venarius 的工作并做了一些改进。最重要的变更包括：

- 修复：通过表情选择器插入时自动添加前导空格
- 修复：在主题标题中尊重 `enable_inline_emoji_translation` 设置

> <https://github.com/discourse/discourse/pull/8453>
>
> This replaces PR https://github.com/discourse/discourse/pull/7429
> See also http…s://meta.discourse.org/t/emoji-not-recognized-after-cyrillic-symbols/72091
> 
> \* FIX: Prepends whitespace when inserting via emoji picker
> \* FIX: Respect \`enable\_inline\_emoji\_translation\` setting in titles
> \* DEV: Reenable Emoji Picker tests
> 
> @jjaffeux Is it okay to reenable the emoji picker tests? I fixed them and they work in my dev environment, but I saw that you disabled them due to timeout errors this summer.

---

<div class="post-metadata">

**Author:** ![system](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/system/32/443519_2.png) [@system](https://meta.discourse.org/u/system)\
**Post date:** [2023年九月8日 23:17 UTC](https://meta.discourse.org/t/emoji-not-recognized-after-cyrillic-symbols/72091/24 "2023-09-08T23:17:10Z")

</div>



[下一頁](https://meta.discourse.org/t/emoji-not-recognized-after-cyrillic-symbols/72091.md?page=2)
