Re: [v3 PATCH] winex11.drv: import X11's "text/html" as "HTML Format"
Damjan Jovanovic <damjan.jov(a)gmail.com> writes:
+static char *standardize_text_html( const char *data, size_t size ) +{ + char *textHtml = NULL; + + /* Firefox uses UTF-16LE with byte order mark. Convert to UTF-8 without the BOM. */ + if (size >= 2 && ((BYTE*)data)[0] == 0xff && ((BYTE*)data)[1] == 0xfe) + { + INT textHtmlSize = WideCharToMultiByte(CP_UTF8, 0, (LPCWSTR)&data[2], (size-2)/2, NULL, 0, NULL, NULL); + textHtml = HeapAlloc(GetProcessHeap(), 0, textHtmlSize); + if (textHtml) + WideCharToMultiByte(CP_UTF8, 0, (LPCWSTR)&data[2], (size-2)/2, textHtml, textHtmlSize, NULL, NULL); + else + ERR("out of memory\n"); + } + return textHtml;
It seems to me that you should still import it even if it's not in Firefox format. -- Alexandre Julliard julliard(a)winehq.org
participants (1)
-
Alexandre Julliard