Thursday, January 24, 2008

Work-Around for Mail's NBSP Bug

A poster in the Apple forums has pointed out that appears to have a strange bug: There is no way to input U+00A0/NBSP "No-Break Space". When you try to do this, either via the keyboard (Alt/Opt + space) or the Character Palette or via copy/paste, only an ordinary Space (U+0020) is produced in the text.

This is a problem because French text, for example, should ideally have an NBSP before certain punctuation, especially ! and ?. Using ordinary spaces means that these marks can get separated from the text they belong to at line endings, which is very ugly.

A possible work-around is use U+202F "Narrow No-Break Space" instead, which does accept for input. Unfortunately I don't think any standard keyboard layouts have this character, so you have create a custom layout or input it from the Character Palette or via similar means. Also it could cause problems if the other end is using software that doesn't understand Unicode or fonts that don't handle 202F correctly.

The best tool for making a custom layout is Ukelele.

No comments: