I wish there was a simple C routine, possibly table-driven, that converts a string of characters from UTF-8 to HTML entities. Also these.
This problem must have come up a million times. I bet it's out there. Do you know where it is?