summaryrefslogtreecommitdiff
path: root/nohtml/filter.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'nohtml/filter.cpp')
-rw-r--r--nohtml/filter.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/nohtml/filter.cpp b/nohtml/filter.cpp
index 4e7839c..951140b 100644
--- a/nohtml/filter.cpp
+++ b/nohtml/filter.cpp
@@ -58,7 +58,7 @@ int FilterSendMessage(WPARAM wParam, LPARAM lParam) {
html_msg = smsg;
buf=(char *)malloc(wcslen(html_msg)*3+3);
- WideCharToMultiByte( CP_ACP, 0,html_msg, -1,buf,wcslen(html_msg)+1, NULL, NULL);
+ WideCharToMultiByte( codepage, 0,html_msg, -1,buf,wcslen(html_msg)+1, NULL, NULL);
memcpy(&buf[strlen(buf)+1],html_msg,lstrlen(buf)*2+2);
delete[] html_msg;
} else {
@@ -124,8 +124,8 @@ int FilterRecvMessage(WPARAM wParam, LPARAM lParam) {
//delete[] pre->szMessage; not necessary - done in server.cpp
buf=(char *)malloc(wcslen(st_wbuf)*3+3);
- WideCharToMultiByte( CP_ACP, 0,st_wbuf, -1,buf,wcslen(st_wbuf)+1, NULL, NULL);
- memcpy(&buf[strlen(buf)+1],st_wbuf,lstrlen(buf)*2+2);
+ WideCharToMultiByte(CP_UTF8, 0, st_wbuf, -1,buf,wcslen(st_wbuf)+1, NULL, NULL);
+ memcpy(&buf[strlen(buf)+1], st_wbuf, lstrlen(buf)*2+2);
delete[] st_wbuf;
pre->szMessage = buf;
} else if(pre->flags & PREF_UNICODE) {
@@ -148,7 +148,7 @@ int FilterRecvMessage(WPARAM wParam, LPARAM lParam) {
}
//delete[] pre->szMessage; not necessary - done in server.cpp
buf=(char *)malloc(wcslen(st_wbuf)*3+3);
- WideCharToMultiByte( CP_ACP, 0,st_wbuf, -1,buf,wcslen(st_wbuf)+1, NULL, NULL);
+ WideCharToMultiByte(codepage, 0, st_wbuf, -1,buf,wcslen(st_wbuf)+1, NULL, NULL);
memcpy(&buf[strlen(buf)+1],st_wbuf,lstrlen(buf)*2+2);
delete[] st_wbuf;
pre->szMessage = buf;