So, I had to stand up for my beloved bananas, and show how some piece of code failed to deal with them.
Said code would transform a banana into a lead surrogate inside a span tag, followed by a trail surrogate inside another span tag. For example purposes I wanted to paste the bad result in a comment. It looks like this in my browser:
That was when I discovered that using lone surrogates in comments doesn't work. That's fine-ish. Lone surrogates are invalid after all. But I lost my comment text without an opportunity to fix it!
I tried it again, and again, until I realised it was failing because of the surrogates. And then I realised that posting such comments would send me to the same page with the comment text in a URL query parameter, like https://stackoverflow.com/questions/15501534/search-and-replace-unicode-character?comment=%22%3Cspan%3E%ED%A0%BC%3C%2Fspan%3E%3Cspan%3E%ED%BD%8C%3C%2Fspan%3E%22
.
This is rather minor, but it would have been nicer if I had a popup saying "your comment is bad and you should feel bad" or something, instead of nuking my comment into the URL.
And I discovered that posting questions with lone surrogates doesn't quite work either :)