Consenti emoji direttamente dopo una lettera cinese

If we post two pictograms consecutively, one pictogram is not displayed as shown in the picture below.

Is there a solution?

25

like this?
:bowing_man: :two_hearts:
* note the space between the colons
text :bowing_man: :two_hearts:

3 Mi Piace

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.

1 Mi Piace

You’re saying your keyboard doesn’t have a space bar?

2 Mi Piace

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?

1 Mi Piace

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​:small_airplane: which I guess is fine for you.

2 Mi Piace

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::space_invader::japanese_goblin:
こんにちは:smiley::space_invader::japanese_goblin:

1 Mi Piace

Salve. È mai stata implementata una correzione per questo?

Non credo che un’espressione regolare sia ciò che desideri in questo caso. (Come al solito.¹) Controllare se il carattere fa parte dei Ideogrammi Unificati CJK e possibilmente di alcuni blocchi correlati sembra più probabile che funzioni.


¹ “Alcune persone, quando si trovano di fronte a un problema, pensano: ‘Sai cosa? Userò le espressioni regolari.’ Ora hanno due problemi.” —Jamie Zawinski, http://regex.info/blog/2006-09-15/247

1 Mi Piace

Credo che sia stato risolto

È stato implementato come impostazione del sito enable inline emoji translation. Consente l’uso di 你好:smile: senza cercare di identificare i singoli caratteri CJK, ed è abilitato di default per le località cinese, giapponese e coreana.

Sei sicuro che dipenda dalla lingua/impostazioni locali (locale)? Quelle dell’autore o del lettore?

Spero che non sia così, perché per motivi miei uso il locale en_US.UTF-8, anche se non mi trovo negli Stati Uniti, non ho mai parlato o scritto in inglese americano e, quando digito おはよ御座います :slight_smile:, non sto nemmeno digitando in inglese.

Posso dire che nell’editor l’emoji sopra mi sembra corretta, e potrò dirti tra un attimo se viene visualizzata correttamente quando leggo il messaggio pubblicato.

(Sì, leggendo con en_US.UTF-8, sembra comunque andare bene. Immagino che in realtà non dipenda dal locale, anche se immagino anche che il problema sia stato risolto correttamente. Sono curioso di sapere esattamente come l’hai risolto, anche se non abbastanza da chiederti di fare un lavoro serio per scoprire se ciò creerebbe qualche difficoltà.)

Esistono impostazioni del sito per i forum che vengono adattate in base al valore selezionato nell’impostazione del sito locale predefinito. Non dipendono dalle preferenze dei lettori o degli autori, ma aiutano l’amministratore a configurare un forum per una lingua specifica. Puoi leggere di più a riguardo qui: Locale-specific defaults for site settings (`locale_default`)

Gli amministratori possono comunque configurare tutte queste impostazioni come desiderano. Quindi, un amministratore di un sito in cui il locale predefinito è l’inglese può comunque consentire titoli e post più brevi o l’uso di più caratteri nei nomi utente. Cambia solo il valore predefinito dell’impostazione che potrebbe avere più senso. Quindi, anche in un forum in cui il locale predefinito è l’inglese, l’amministratore può configurare l’impostazione del sito enable_inline_emoji_translation in modo che non sia necessario uno spazio.

1 Mi Piace