haxe-strings is a library I have been using to do UTF8. I think it is a high quality Haxe library.
I also worked on a UTF8 to old style OEM char set conversion for display on Windows in a Cmd.exe text style window. The UTF8_To_OEM.hx file is a part of the forGL project.
There are several other files in the same project that use various haxe-strings API calls if you want to see some examples.
forGL on Windows now uses ansicon.exe to support Escape sequences to move text cursor and Color the text. Some of the Escape sequence support is also from haxe-strings.
Unicode has Many web sources that give explanations. Here is my first search result:
UTF8 allows direct support for the old style ASCII character set which are the characters used by nearly all of the well known programming languages (like all the Haxe target languages). Also UTF8 has a multi byte (variable number of bytes) way to represent characters from languages around the world having several Thousands of characters by using up to 4 bytes to encode a given character. Haxe-strings also provides an API to easily move through multi byte UTF as well. Because forGL is a programming language / IDE having built in UTF8 support was required which haxe-strings does nicely.
Hope this helps!