"Jacek Caban" <jack(a)itma.pwr.wroc.pl> wrote:
> @@ -310,15 +335,24 @@ static void intern_atoms(void)
> names = HeapAlloc( GetProcessHeap(), 0, count * sizeof(*names) );
> atoms = HeapAlloc( GetProcessHeap(), 0, count * sizeof(*atoms) );
>
> - for (format = ClipFormats, i = 0; format; format = format->NextFormat)
> - if (!format->drvData) names[i++] = format->Name;
> + for (format = ClipFormats, i = 0; format; format = format->NextFormat) {
> + if (!format->drvData) {
> + len = WideCharToMultiByte(CP_ACP, 0, format->Name, -1, NULL, -1, 0, 0);
> + names[i] = HeapAlloc(GetProcessHeap(), 0, len*sizeof(WCHAR));
> + WideCharToMultiByte(CP_ACP, 0, format->Name, -1, names[i++], len, 0, 0);
You have to use CP_UNIXCP to convert unicode strings in order to pass
them to the X11/unix system (here and everywhere else).
--
Dmitry.