يتم استبدال المسافة غير القابلة للكسر والمسافة الضيقة غير القابلة للكسر بمسافة

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)

جولة سريعة جدًا على جوجل أخبرتني أن هذا ليس صحيحًا. أم أنني أساء فهم ما تعنيه “مفصولة”؟ ← علامة الاستفهام هذه ليست مفصولة، على حد علمي.

وهذه القاعدة النحوية، مثل عدم فصل الآلاف، تنطبق على كل اللغات (الغربية). مثل أنه لا ينبغي أن يكون هناك شيء كهذا أيضًا :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 (مسافة). (للأسف الكتاب ليس مجانيًا لذلك ليس لدي رابط تشعبي له).
  • ويكيبيديا الفرنسية تقول: « 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)