Superfluosity of [ill-placed and not quite] zero-width spaces

by Michael S. Kaplan, published on 2011/06/11 07:01 -04:00, original URI:

Today's blog will start with a digression.

I got an HTC Arrive from Sprint to replace my troubled Palm Pre (which was itself a replacement for a broken LG). On the whole the Arrive is okay, though there are four problems with it:

This third problem is the one that is relevant to today's blog; everything else is, as I suggested at the very beginning of the blog, a digression.

It all started when I happened to notice an @ reply to me from @DrPizza (you may know him as Peter Bright) from over a month ago:

Then when I looked at those links, I saw there were several other @ replies from Peter from several days prior to that:


Okay, so it looks like I basically blew off Peter Bright. I guess the @IE account did too (I couldn't find a response from them, at least).

Sorry about that Peter!

Anyway he also gave some more explicit instructions in case I wasn't sure how to to test the result easily:

Yep, that's easier than what I would have done (built a small HTML page to repro it).

Okay so if you look at the Zero-width space Wikipedia page:

and follow the steps:

you will see a result slightly stranger than what Peter was suggesting:

What the hell is it doing?

Let's sretch the page back out to see what happens:

Okay, at least is consistent.

I guess it is somehow related to strange behavior with U+200b, aka ZERO WIDTH SPACE.

But it is not as simple as putting a full space in where a ZWSP was sitting -- the "space" is inserted between the character after the ZWSP and the character after that.

Internet Explorer lets you select just this space and if you paste it somewhere else you can verify it is a U+200b.

This doesn't happen in Notepad, or WordPad, or Word. Or in FireFox for that matter.

A pure IE issue, I guess.

And I could only repro it with Consolas (no other font I tried had the problem). And IE.

Your guess is as good as mine as to whose fault it is, though I'll ping my favorite folks from IE and MS Typography to see if they can explain what's going on here.

And from now on, now that I know I'm not being gently told when someone @ replies me without spamming me with additional text messages, I'll check periodically for responses.

You know, so I don't blow off people whose columns I enjoy reading next time....

Mike Dimmick on 13 Jun 2011 3:33 AM:

IE9 renders the zero-width spaces as spaces, but in the correct place - both in IE 9 standards mode and in IE 8 standards mode. The F12 Developer Tools window's HTML pane still renders correctly.

It's not particular to Consolas, the same problem happens with Courier New, Lucida Console and Lucida Sans Typewriter.

go to newer or older post, or back to index or month or day