hhctrl.ocx: Add support for the CHM code page.
diff --git a/dlls/hhctrl.ocx/help.c b/dlls/hhctrl.ocx/help.c
index 1726f05..ef41ec2 100644
--- a/dlls/hhctrl.ocx/help.c
+++ b/dlls/hhctrl.ocx/help.c
@@ -1793,7 +1793,7 @@
/*
* Decode a string containing HTML encoded characters into a unicode string.
*/
-WCHAR *decode_html(const char *html_fragment, int html_fragment_len)
+WCHAR *decode_html(const char *html_fragment, int html_fragment_len, UINT code_page)
{
const char *h = html_fragment;
char *amp, *sem, symbol, *tmp;
@@ -1850,9 +1850,9 @@
tmp_len += len;
tmp[tmp_len++] = 0; /* NULL-terminate the string */
- len = MultiByteToWideChar(CP_ACP, 0, tmp, tmp_len, NULL, 0);
+ len = MultiByteToWideChar(code_page, 0, tmp, tmp_len, NULL, 0);
unicode_text = heap_alloc(len*sizeof(WCHAR));
- MultiByteToWideChar(CP_ACP, 0, tmp, tmp_len, unicode_text, len);
+ MultiByteToWideChar(code_page, 0, tmp, tmp_len, unicode_text, len);
heap_free(tmp);
return unicode_text;
}