In C++ on Windows how do you convert an xml character reference of the form &#xhhhh;
to a utf-16 little endian string?
I'm thinking if the hhhh part is 4 characters or less, then it's 2 bytes, which fit into one utf-16 character. But, this wiki page has a table of character references and some near the bottom are 5 digit hex numbers which won't fit into two bytes. How can they be converted to utf-16?
I'm wondering if the MultiByteToWideChar function is capable of doing the job.
My understanding of how a code point that's bigger than 2 bytes gets converted to utf-16 is lacking! (Or for that matter I'm not too sure how a code point that's bigger than 1 byte get's converted to utf-8, but that's another question).
Thanks.