Why does toUTF16z only work with UTF8 encoding?

Andrej Mitrovic none at none.none
Sun May 8 19:08:13 PDT 2011


toUTF16 can take a char[], wchar[] or dchar[].

But toUTF16z can only take a char[]. Why?

I'm storing some text as dchar[] internally and have to pass it to WinAPI Unicode functions which expect null-terminated UTF16 strings. But toUTF16z only works with char[] for some reason.


More information about the Digitalmars-d-learn mailing list