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:![]()
![]()
お邪魔します。この問題に対する修正は実装されましたか?
ここで正規表現を使うのは適切ではないと思います。(いつものことですが。¹)CJK統合漢字ブロック、および関連するいくつかのブロックのいずれかに文字が含まれているかを確認する方が、うまくいく可能性が高いようです。
¹ 「ある問題に直面したとき、一部の人は『そうだ、正規表現を使おう』と考えます。すると、彼らには二つの問題が生まれます。」—ジェイミー・ザウィンスキー, http://regex.info/blog/2006-09-15/247
修正されたと思います。
これはサイト設定の enable inline emoji translation として実装されました。これにより、個々のCJK文字を識別しようとすることなく 你好:smile: が許可され、中国語、日本語、韓国語のロケールではデフォルトで有効になっています。
ロケールの依存関係に確信は持てますか?著者のロケールでしょうか、それとも読者のロケールでしょうか?
事情があり、私はロケール en_US.UTF-8 を使用していますが、米国在住ではなく、米国の英語を話したり書いたりした経験もありません。また、おはよ御座います
と入力しているときは、そもそも英語を入力しているわけではありません。
エディタ上では、上記の絵文字は問題なく表示されているように見えます。投稿された状態での読み込み時に正しくレンダリングされるかどうかは、すぐに確認してご報告できます。
(はい、en_US.UTF-8 で読み込んだ際も問題なく表示されました。実際にはロケールに依存していないと推測しますが、問題が適切に解決済みであるとも推測しています。ただし、具体的にどのように解決したのかには興味があります。ただし、あなたが多大な労力を費やして調査し、それが何らかの困難を招くかどうかを調べるほどではありません。)
default locale(デフォルトロケール)のサイト設定で選択された値に応じて調整される、フォーラム用のサイト設定があります。これらは読者や投稿者の設定に依存するものではなく、管理者が特定の言語向けにフォーラムを設定するのを支援するものです。詳細については、こちらをご参照ください:Locale-specific defaults for site settings (`locale_default`)
管理者は依然としてこれらの設定を自由にカスタマイズできます。例えば、デフォルトロケールが英語のサイト管理者でも、タイトルや投稿の文字数を短く設定したり、ユーザー名に使用できる文字数を増やしたりすることが可能です。変更されるのは、最も適切なデフォルト値のみです。したがって、デフォルトロケールが英語のフォーラムでも、管理者は enable_inline_emoji_translation のサイト設定を調整し、スペースを不要にすることができます。