What's the simplest way to convert a Unicode codepoint into a UTF-8 byte sequence in C? The only way that springs to mind is using iconv
to map from the UTF-32LE codepage to UTF-8, but that seems like overkill.
Simplest way to convert unicode codepoint into UTF-8
c++unicodeutf-8
Best Solution
Unicode conversion is not a simple task. Using iconv doesn't seem like overkill at all to me. Perhaps there is a library version of iconv you can use to avoid make a system() call, if that's what you want to avoid.