diff options
Diffstat (limited to 'meta2/proto.cpp')
-rw-r--r-- | meta2/proto.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/meta2/proto.cpp b/meta2/proto.cpp index a147bc6..8cf504a 100644 --- a/meta2/proto.cpp +++ b/meta2/proto.cpp @@ -169,11 +169,11 @@ int ProtoSendMessage(WPARAM wParam, LPARAM lParam) { strncpy(szServiceName, PSS_MESSAGE "W", sizeof(szServiceName));
}
// subcontact does not support utf - convert to old ascii/wide format
- if((flags & PREF_UTF) && !(CallContactService(hSendTo, PS_GETCAPS, PFLAGNUM_4, 0) & PF4_IMSENDUTF)) {
+ if((flags & PREF_UTF) && (proto == 0 || !(CallProtoService(proto, PS_GETCAPS, PFLAGNUM_4, 0) & PF4_IMSENDUTF))) {
ccs->wParam &= ~PREF_UTF;
ccs->wParam |= PREF_UNICODE;
wchar_t *unicode = mir_utf8decodeW(message);
- char *ascii = mir_u2a(unicode);
+ char *ascii = mir_u2a_cp(unicode, codepage);
char *buff = new char[strlen(ascii) + 1 + (wcslen(unicode) + 1) * sizeof(wchar_t)];
strcpy(buff, ascii);
@@ -403,7 +403,7 @@ int WindowEvent(WPARAM wParam, LPARAM lParam) { void RegisterProto() {
PROTOCOLDESCRIPTOR pd = {0};
- pd.cbSize = sizeof(pd);
+ pd.cbSize = PROTOCOLDESCRIPTOR_V3_SIZE; //sizeof(pd);
pd.szName = MODULE;
pd.type = PROTOTYPE_PROTOCOL;
CallService(MS_PROTO_REGISTERMODULE,0,(LPARAM)&pd);
|