If on windows, use the windows UTF conversion functions due to the fact that the existing utf code is meant for 32bit wide characters, while the windows conversion functions will properly handle 16bit wide characters.