Damjan Jovanovic damjan.jov@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.