User:Gro-Tsen/Note on non-breaking space

From Wikipedia, the free encyclopedia

Note on non-breaking space[edit]

Essentially all current versions of the Mozilla web browser (including the Firefox derivative) have a bug, described here, which causes all non-breaking spaces to be replaced by ordinary spaces in a Wikipedia article whenever the article is edited by such a browser, even outside of the edit's scope. This is often disastrous, as most users are not even aware of the problem (indeed, many are not even aware of the unbreakable space's existence); and there is no known workaround (except to use a different browser): unfortunately, the Mozilla Foundation has stubbornly refused to do anything about this bug (see also comments here). You can detect this bug's existence by opening a page containing non-breaking spaces (here's one: " "), making no changes at all and checking, using the "Show changes" button, whether Wikipedia indicates changes: if there are some, your browser is at fault.

Writing   instead of directly inserting a non-breaking space should work, but actually doesn't, because stupid robots attempt to systematically replace this sequence by the character it represents, hence making it vulnerable to the aforementioned bug (and also invisible to editors).

Please help me increase awareness to this problem by mentioning the bug wherever possible. Do not hesitate to edit this page to make it clearer, indicate workarounds or affected browsers, etc., and possibly, after a time, moving it to the "Wikipedia" namespace. Be careful, though, not to remove the non-breaking space by falling victim to the bug itself!

Further notes[edit]

Width and use as indentation[edit]

Sumoku notes (updated comment):

This problem is related to a more general one in Mozilla browsers. They simply do not deal with non-breaking spaces as Internet Explorer does. If, in HTML, one indents by using multiple non-breaking spaces (  ), the resulting indentations vary all over the place in Firefox, whereas in IE they stay perfectly aligned. I formerly declared this to be a bug in Firefox; hence the response that follows. Gro-Tsen's advice, here below, helps to overcome the problem in part, but for some reason the narrow non-breaking space he provides is not at all narrow, and is, indeed, rather wider than an en-space ( ). The problem may be resolved, however, by the use of ().

Gro-Tsen notes:

I disagree that this is a Mozilla bug, however. On the contrary, my reading of the Unicode standard is that U+00A0 NO-BREAK SPACE is just a non-breaking variant of U+0020 SPACE, so its width should vary (and you should not use it for indentation, rather for places where you want normal spacing but unbreakable, for example when writing the answer is 42). If you want a fixed-width space, you should use things like U+2003 EM SPACE (this one has a special entity in HTML:  ) or U+202F NARROW NO-BREAK SPACE (this one is just   in HTML). It is true that the Standard is very unclear on the issue of which spaces are breakable (for example, is U+2005 FOUR-PER-EM SPACE breakable or is it not?) and also of which are fixed width. --Gro-Tsen 18:37, 15 July 2007 (UTC)