I have a set of unicode codepoints stored as integers, and I'd like to encode these as UTF-8. If I understand correctly, UTF-8 is just an encoding for integers (the fact that it's used for unicode in particular isn't fundamental to UTF-8), so this should just be a matter of encoding an integer in the UTF-8 encoding. Is there a standard utility for doing this, and if not, is there an easy way of doing it manually?