views:

575

answers:

4

In French, typography requires that we use narrow non-breaking space (U+202F) at various places (“Comme ça !”).

Apparently every browser on windows fails to support that and they all display a weird character instead. This works on most browsers on Mac OS X as well as Linux.

Does anyone know how to make Windows browsers render it correctly?

(I’m assuming it’s a Windows bug rather than a browser bug since Firefox and Safari both support it as long as it’s not on Windows).

+1  A: 

Why not just  ?

Gumbo
That’s exactly what I am doing but on Windows it does not render correctly.
FroMage
The font you are using has probably no glyph for this character.
Gumbo
Do you know any Windows font which is supposed to have it? A quick glance into the Character Picker reveals that this character is not in most lists.
FroMage
No, sorry. But Windows has probably some Unicode fonts too.
Gumbo
+1  A: 

You could do this, but it's not ideal.

<span style="font-size:50%;"> </span>
Rich
I could, but I’m assuming there has to be a way to make Windows render it correctly… Perhaps it’s a font issue…
FroMage
+2  A: 

I've done a bit more digging, and it does seem like a font problem. FileFormatInfo is very useful for dealing with Unicode issues in general, and it includes a page listing the fonts that support this particular character. There is even a Flash tool (click inside the blue box on the page listing the supported fonts to get to it - I can't make a correct URL for some reason) that lists all your locally installed fonts and shows this character for each one.

Rich
OK this is definitely helpful. The flash application displays a lot of squares, empty or full, which means I suppose that my fonts do not support it. Since this is a default XP install I assume XP doesn't support it by default.Now trying to download some Vista fonts…
FroMage
I've just visited the Flash page on a French-locale Vista installation, and the only font that seems vaguely 'normal' which supports this character (ie there is no box showing) is "Microsoft Sans Serif".
Rich
+4  A: 
Verdy_p
Not only is your answer helpful (if a bit long), it also seems quite educated and well justified. Thanks for your help. It does make our life miserable in the business of localising web sites, since messages that used to be plain-text may now become markup and thus need to skip the escaping part.Do you have any idea then why both FireFox and Safari browsers, which do support   on both Linux and Max OS X, do not on Windows? Is it just that the Linux and Max OS X fonts have that symbol while Windows fonts do not? Which would not be a problem if the browser implemented the fall-back?
FroMage
Linux and Mac OSX versions are probably using a text rendering library (or OS service) that implement the fallback when the font does not have the character. The browsers then just use these API or libraries.Given that Windows does not implement this font fallback in its text rendering APIs (GDI, GDI+...) the browsers using it fails to display the character.I know that Firefox uses its own internal fallbacks for some characters, but many of those are quite poor. But I see no reason why a browser would not implement the fallbacks itself for whitespaces.
Verdy_p
Note that Safari does not display U+202F on Windows, but Google Chrome does display it (even of both browsers are using WebKit which should be using the same text rendering libraries): Chrome is then implementing the fallback outside of Webkit, or it uses a patched version of Webkit.
Verdy_p
Note that French uses non-breaking spaces, when presenting numbers: the normal <i>fine</i> is used as a separator for groups of digits.But, also in English, for aligning numbers in tables, the <i>figure space</i> is used to replace missing digits, and the <i>punctuation space</i> is used to replace the decimal separator (dot in English, but comma in French, which may be a bit larger, most probably like a <i>fine</i>. These two spaces are also non-breaking, but may still be enlarged in the case of full justification (of intercharacter gaps), like digits and dots.
Verdy_p
The figure space and dot space have no use in HTML, it's simpler to make them the correct width by using a zero digit or a dot/comma punctuation within a span with CSS's "display:hidden" or "color:transparent", and then to align the tables normally. These two spaces are then only for typographs (when handling documents with precomputed page layout)
Verdy_p