summaryrefslogtreecommitdiff
path: root/protocols/IcqOscarJ
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2012-09-27 14:35:51 +0000
committerGeorge Hazan <george.hazan@gmail.com>2012-09-27 14:35:51 +0000
commit93b1c035da40df23e3eef4a1efd10dfe9c451375 (patch)
tree0a12592b9a7b5f76a1614ebf72e5cdef8827ec4c /protocols/IcqOscarJ
parentb6bd986a22906775c3f2c6e18ad67ca602298869 (diff)
fix for the file description's encoding (ICQ file receiving)
git-svn-id: http://svn.miranda-ng.org/main/trunk@1683 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/IcqOscarJ')
-rw-r--r--protocols/IcqOscarJ/icq_filerequests.cpp8
-rw-r--r--protocols/IcqOscarJ/oscar_filetransfer.cpp5
2 files changed, 6 insertions, 7 deletions
diff --git a/protocols/IcqOscarJ/icq_filerequests.cpp b/protocols/IcqOscarJ/icq_filerequests.cpp
index 7560f613e5..d85de72580 100644
--- a/protocols/IcqOscarJ/icq_filerequests.cpp
+++ b/protocols/IcqOscarJ/icq_filerequests.cpp
@@ -159,8 +159,8 @@ void CIcqProto::handleFileRequest(PBYTE buf, WORD wLen, DWORD dwUin, DWORD dwCoo
// Initialize a filetransfer struct
filetransfer *ft = CreateFileTransfer(hContact, dwUin, nVersion);
ft->dwCookie = dwCookie;
- ft->szFilename = ansi_to_utf8(pszFileName);
- ft->szDescription = ansi_to_utf8(pszDescription);
+ ft->szFilename = mir_strdup(pszFileName);
+ ft->szDescription = 0;
ft->fileId = -1;
ft->dwTotalSize = dwFileSize;
ft->pMessage.dwMsgID1 = dwID1;
@@ -169,13 +169,13 @@ void CIcqProto::handleFileRequest(PBYTE buf, WORD wLen, DWORD dwUin, DWORD dwCoo
ft->bEmptyDesc = bEmptyDesc;
// Send chain event
- TCHAR* ptszFileName = mir_a2t(pszFileName);
+ TCHAR* ptszFileName = mir_utf8decodeT(pszFileName);
PROTORECVFILET pre = {0};
pre.flags = PREF_TCHAR;
pre.fileCount = 1;
pre.timestamp = time(NULL);
- pre.tszDescription = mir_a2t(pszDescription);
+ pre.tszDescription = mir_utf8decodeT(pszDescription);
pre.ptszFiles = &ptszFileName;
pre.lParam = (LPARAM)ft;
diff --git a/protocols/IcqOscarJ/oscar_filetransfer.cpp b/protocols/IcqOscarJ/oscar_filetransfer.cpp
index a1f516d363..9630abc070 100644
--- a/protocols/IcqOscarJ/oscar_filetransfer.cpp
+++ b/protocols/IcqOscarJ/oscar_filetransfer.cpp
@@ -557,7 +557,6 @@ void CIcqProto::handleRecvServMsgOFT(BYTE *buf, WORD wLen, DWORD dwUin, char *sz
HANDLE hContact = HContactFromUID(dwUin, szUID, &bAdded);
ft->hContact = hContact;
- ft->szDescription = pszDescription;
ft->fileId = -1;
// Send chain event
@@ -566,13 +565,13 @@ void CIcqProto::handleRecvServMsgOFT(BYTE *buf, WORD wLen, DWORD dwUin, char *sz
strcpy(szBlob + sizeof(DWORD), pszFileName);
strcpy(szBlob + sizeof(DWORD) + strlennull(pszFileName) + 1, pszDescription);
- TCHAR* ptszFileName = mir_a2t(pszFileName);
+ TCHAR* ptszFileName = mir_utf8decodeT(pszFileName);
PROTORECVFILET pre = {0};
pre.flags = PREF_TCHAR;
pre.fileCount = 1;
pre.timestamp = time(NULL);
- pre.tszDescription = mir_a2t(pszDescription);
+ pre.tszDescription = mir_utf8decodeT(pszDescription);
pre.ptszFiles = &ptszFileName;
pre.lParam = (LPARAM)ft;