Espacio de no separación y espacio de no separación estrecho se reemplazan por espacio

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 Me gusta

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

3 Me gusta

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 Me gusta

+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 Me gusta

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

1 me gusta

¿Qué opinas @j.jaffeux y @zogstrip?

Y U+202F espacio de no separación estrecho también.
El carácter de pre-puntuación de aspecto más natural, como en las imprentas francesas.

Es nuestro limpiador de texto:

Creo que esto se hizo para evitar una forma de “griefing” trivial en la que las personas realizan ediciones en las publicaciones que no cambian nada y la gente se rasca la cabeza para decir… ¿qué ha cambiado?

3 Me gusta

Sí, eso es lo que recuerdo también. No me importaría eliminar este método mornalize_whitespaces siempre que tengamos una mejor manera de hacer/mostrar las diferencias cuando se utilizan tales “caracteres” para hacer griefing.

3 Me gusta

¿Se puede implementar mornalize_whitespaces con una nueva configuración (activada por defecto) que lo solicite? Entonces, un administrador local podría optar por no participar en esta función cuando, para su uso, el griefing sea menos un problema que la tipografía.

1 me gusta

Una búsqueda rápida en Google me dijo que eso no es cierto. ¿O estoy entendiendo mal lo que significa separado? ← Esa pregunta no está separada, hasta donde yo sé.

Y esa regla gramatical, como no dividir miles, se aplica a todos los idiomas (occidentales). Como tampoco debería haber algo así :wink:

Me gustaría ver qué fuentes te dijeron que los franceses “pegan” la palabra y la puntuación.

Aquí hay algunas fuentes que dicen que la puntuación (?, !, :, no . ni ,) debe estar separada de la palabra a su izquierda, como: « ¿Cómo estás? »

  • https://jacques-andre.fr/faqtypo/lessons.pdf página 32 es un libro gratuito sobre tipografía francesa
  • En el « Lexique des règles typographiques en usage à l’Imprimerie nationale » (Glosario de reglas tipográficas utilizadas por la Imprenta Nacional), en la página 149 vemos: « espace fine insécable ? espace juistifiante » así que no dicen que se use un U+00A0 (ESPACIO DE NO SEPARACIÓN) sino un U+202F (ESPACIO ESTRECHO DE NO SEPARACIÓN) (que no sé cómo escribir en mi teclado, pero aun así no es un U+0020 (ESPACIO). (Lamentablemente el libro no es gratuito, así que no tengo un hipervínculo a él).
  • Wikipedia en francés dice: « 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. » (En Francia, es costumbre colocar un espacio fino de no separación antes del signo de interrogación, o un espacio de no separación si no se dispone del fino).
2 Me gusta

Un estudio/libro de trabajo para principiantes que creen que pueden aprender francés :wink: Debería volver… , No sé cómo se dice en inglés, pero algo así como escuela nocturna comunitaria para adultos — una forma de pasar el tiempo libre y aprender algo nuevo — y tomar una foto de ese texto.

Pero me corrijo. Tú lo sabes con seguridad mejor que yo nunca,

1 me gusta