ノーブレークスペースとナローノーブレークスペースがスペースに置き換えられます

Would it be possible to allow no-break space (NBSP, U+00A0) and even narrow no-break space (NNBSP, U+202F) in the posts?

Currently they are replaced by normal space (SP, U+0020) by Discourse (even in code fragments), thus breaking French number display when text is wrapping.

In French, there should be an NNBSP at least, before punctuation like !?;:», after punctuation like «–—, and between groups of three digits in big numbers.

Here is an example of broken display per French standards:

image

2 400 000 and 28 800 should not be cut in their half like this, they should stay on the same line.

I think when a text includes NBSP or NNBSP, it is not a typo, not an unintentional mistake.

「いいね!」 3

Are there HTML entities for these?   for example works like so:       ← spaces

「いいね!」 3

Let’s try   for NARROW NO-BREAK SPACE thousands separator 80 000 test 80 000 test 80 000 test 80 000 test 80 000 80 000 test 80 000 test 80 000 80 000 test 80 000 test 80 000 test 80 000 test 80 000 test 80 000 test 80 000 test 80 000 80 000 test 80 000 test 80 000 test 80 000 test 80 000.

Then it works indeed!
I edited my post on the other forum and now the numbers are displayed good.
There is no named HTML entity but I can use the unicode code like this. :slight_smile::+1:
Thanks for the work-around, @codinghorror.

「いいね!」 2

+1 on this, in French, we use a non-breaking space before our :, !, ? as they are spaced from the previous word and we don’t want them to land on the next line.

Current behavior of replacing non-breaking spaces with spaces:

Screenshot 2021-11-04 at 11-18-55 Jolie admin Flask - Entraide - AFPy

By keeping the non-breaking space, there is no longer the “lone semicolon”:

Screenshot 2021-11-04 at 11-19-43 Jolie admin Flask - Entraide - AFPy

I don’t think there’s a need for an HTML escape sequence for those characters, just like there’s no need for an HTML escape sequence for any other non-ASCII characters: pages are given to the browser encoded in UTF-8, and non-breaking spaces, like all other characters, have a UTF-8 representation, for example:

→, √, ½, ñ, Ł, …

(In other words, why does Discourse allow most Unicode sequences but not non-breaking spaces?)

「いいね!」 4

Yes, I fully agree.
I can never remember the   syntax for NARROW NO-BREAK SPACE. :confused:

「いいね!」 1

@j.jaffeux@zogstrip さん、どう思われますか?

そして U+202Fナローノーブレークスペースも。フランス語の印刷物のように、最も自然に見える句読点の前の文字。

これは、テキストクリーナーです。

これは、人々が投稿を編集しても何も変わらず、人々が「…何が変わったのか?」と首をかしげるような、些細な荒らし行為を防ぐために行われたのだと思います。

「いいね!」 3

ええ、私もそう記憶しています。そのような「文字」を使って荒らし行為が行われた場合に、より良い差分表示の方法があれば、この mornalize_whitespaces メソッドを削除しても構いません。

「いいね!」 3

新しい設定(デフォルトでオン)で mornalize_whitespaces を実現できますか?そうすれば、ローカル管理者は、タイポグラフィよりもグリーフィングの方が問題にならない場合に、この機能を選択解除できますか?

「いいね!」 1

Googleで軽く検索したところ、それは事実ではないとわかりました。それとも、「スペースで区切られている」の意味を誤解しているのでしょうか? ← この疑問符はスペースで区切られていないはずです。

そして、その文法規則は、数値を区切る場合と同様に、すべての(西洋の)言語に適用されます。例えば、このようなものも存在しないはずです :wink:

フランス語で「単語と句読点を「貼り付ける」」と述べている情報源を教えていただけますか?

以下は、句読点(「?」、「!」、「:」、「.」や「,」ではない)は、単語の左側にスペースを空けるべきであると述べている情報源です。例:「« Comment vas-tu ? »」

  • https://jacques-andre.fr/faqtypo/lessons.pdf 32ページ(フランスのタイポグラフィに関する無料書籍)
  • 「Lexique des règles typographiques en usage à l’Imprimerie nationale」(国立印刷局で使用されるタイポグラフィ規則の用語集)の149ページには、「espace fine insécable ? espace juistifiante」と記載されており、U+00A0(ノーブレークスペース)ではなく、U+202F(ナローノーブレークスペース)を使用するように指示されています(キーボードで入力する方法はわかりませんが、U+0020(スペース)ではありません)。(残念ながら書籍は無料ではないため、ハイパーリンクはありません)。
  • フランス語版Wikipediaには、「En France, il est d’usage de placer une espace fine insécable avant le point d’interrogation, ou une espace insécable si la fine n’est pas disponible.」(フランスでは、疑問符の前に細いノーブレークスペースを配置するのが慣習であり、細いスペースが利用できない場合はノーブレークスペースを配置します。)と記載されています。
「いいね!」 2

フランス語を学べると思っている初心者向けの教材/ワークブックです :wink: 戻るべきですね…, 英語で何と言うのか分かりませんが、大人向けのコミュニティの夜間学校のようなものです — 余暇を過ごし、新しいことを学ぶ方法 — そしてそのテキストの写真を撮ります。

しかし、訂正します。あなたは私よりも確実にこのことを知っています。

「いいね!」 1