Unicode encodings and string literals

Lubos Pintes lubos.pintes at gmail.com
Mon Oct 8 01:06:29 PDT 2012


Hi,
I am playing with samples from Petzold's Programming Windows converted 
by Andrej Mitrovic. Many thanks, Andrej. :-)
My question is about string conversion. There is a function in virtually 
every sample named "toUTF16z", which if I understand properly, converts 
string to UTF-16, so that they can be sent to various Windows API 
functions. But string literals, for example in MessageBox, are fine, no 
conversion is needed. I don't understand the magic, what is converted, 
and when?
If some variable was used e.g. "appName.toUTF16z", and not "Error".toUTF16z


More information about the Digitalmars-d-learn mailing list