If we post two pictograms consecutively, one pictogram is not displayed as shown in the picture below.
Is there a solution?
![]()
If we post two pictograms consecutively, one pictogram is not displayed as shown in the picture below.
Is there a solution?
![]()
like this?
:bowing_man: :two_hearts:
* note the space between the colons
text
![]()
Yes!
I understood that two emoticons will be displayed if space is entered.
However, in my web site, when I put two emoji characters, the space does not come in automatically.
This is an error caused by a difference in notation between languages.
While English puts a space between words, on the other hand, Japanese and Chinese do not put space between words.
You’re saying your keyboard doesn’t have a space bar?
No it is not
As a premise, Japanese and Chinese do not put spaces between words.
So pictograms are inserted consecutively after the word without inserting a space.
Then, in discourse pictograms are not displayed correctly, text is displayed instead.
So instead of the ASCII space character, you have only the “full width space” character and Discourse is not interpreting that as a “space”.
Or users are conflating words and emojis and entering them as though they were the same.
I imagine recognition of the full-width space could be coded in. But educating members to treat words and emojis as different things might not be so easy.
Maybe if the auto-complete emoji picker automatically added a space before the first and after the last colons?
I understand this problem and we may look at adding some sort of setting for Chinese. The problem is it is fairly expensive to figure out if a letter is in Chinese as it is a massive regular expression and we do not want to carry all this code.
What I would be open here for is a “mode” where we do not do a “is letter” check prior to emojis which we can enable in Chinese sites so you can butt up emojis against letters. But this change would be global so test:small_airplane: would render as test
which I guess is fine for you.
In my opinion, if discorse automatically puts a space before an emoticon, problems will be solved in all Chinese, Korean and Japanese.
Initially, this problem arises because Japanese and Chinese people insert pictograms without putting a space at the end of the sentence or in the middle of the sentence.
This is because it is based on the language notation that it creates sentences without spaces, so there is no choice.
There is no need to let the program decide whether it is Chinese or not. Would not it be okay for the program to judge only whether or not there is space before emoji?
![]()
![]()
![]()
こんにちは:smiley:![]()
![]()
Hola. ¿Se implementó alguna solución para esto?
No creo que una expresión regular sea lo que necesitas aquí. (Como suele pasar.¹) Parece más probable que funcione comprobar si el carácter pertenece a los Ideogramas Unificados CJK y posiblemente a algunos bloques relacionados.
¹ “Algunas personas, cuando se enfrentan a un problema, piensan: ‘Ya sé, usaré expresiones regulares’. Ahora tienen dos problemas.” —Jamie Zawinski, http://regex.info/blog/2006-09-15/247
Creo que ya está corregido
Esto se implementó como la configuración del sitio enable inline emoji translation (habilitar traducción de emojis en línea). Permite usar 你好:smile: sin intentar identificar caracteres CJK individuales, y está habilitada por defecto para las localizaciones de chino, japonés y coreano.
¿Estás seguro de que depende del idioma y región (locale)? ¿Del escritor o del lector?
En realidad, espero que no sea así, porque, por ciertas razones, uso el locale en_US.UTF-8, aunque no estoy en EE. UU., nunca he hablado ni escrito en inglés estadounidense y, cuando escribo おはよ御座います
, ni siquiera estoy escribiendo en inglés.
Puedo decir que, en el editor, el emoji anterior me parece correcto, y podré decirte en un momento si se muestra bien cuando lo lea publicado.
(Sí, al leerlo con en_US.UTF-8, sigue viéndose bien. Supongo que, en realidad, no depende del locale, aunque también supongo que el problema está correctamente resuelto. Me pregunto cómo lo resolviste exactamente, aunque no lo suficiente como para hacerte realizar un trabajo serio para averiguar si causaría alguna dificultad.)
Existen configuraciones del sitio para los foros que se ajustan según el valor seleccionado en la configuración del sitio default locale (locale predeterminado). No dependen de las preferencias de los lectores o escritores, sino que ayudan al administrador a configurar un foro para un idioma específico. Puedes leer más sobre esto aquí: Locale-specific defaults for site settings (`locale_default`)
Los administradores aún pueden configurar todas esas opciones como deseen. Por ejemplo, un administrador de un sitio donde la locale predeterminada es el inglés aún puede permitir títulos y publicaciones más cortos o el uso de más caracteres en los nombres de usuario. Solo cambia el valor predeterminado de la configuración que tiene más sentido. Así, incluso en un foro donde la locale predeterminada es el inglés, el administrador puede configurar la opción del sitio enable_inline_emoji_translation para que no sea necesario dejar espacios.