diff options
author | George Hazan <george.hazan@gmail.com> | 2015-05-21 09:27:49 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2015-05-21 09:27:49 +0000 |
commit | 57263562642acaae5a938477e3f58d9118798a0f (patch) | |
tree | 26cf04c854c89d03700feadd9d9d75ce287f45ed /plugins/SecureIM/src/mmi.cpp | |
parent | e0dfb094e874c9492640f717edd05064873d5d28 (diff) |
atavism extincted
git-svn-id: http://svn.miranda-ng.org/main/trunk@13729 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/SecureIM/src/mmi.cpp')
-rw-r--r-- | plugins/SecureIM/src/mmi.cpp | 20 |
1 files changed, 2 insertions, 18 deletions
diff --git a/plugins/SecureIM/src/mmi.cpp b/plugins/SecureIM/src/mmi.cpp index 6f9875f604..45361fd5ad 100644 --- a/plugins/SecureIM/src/mmi.cpp +++ b/plugins/SecureIM/src/mmi.cpp @@ -105,24 +105,8 @@ void __fastcall safe_delete(void** p) // преобразуем текст из чистого UTF8 в формат миранды
LPSTR utf8_to_miranda(LPCSTR szUtfMsg, DWORD& flags)
{
- LPSTR szNewMsg;
- if (iCoreVersion < 0x00060000) {
- flags &= ~(PREF_UTF | PREF_UNICODE);
- LPWSTR wszMsg = exp->utf8decode(szUtfMsg);
- LPSTR szMsg = mir_u2a(wszMsg);
- flags |= PREF_UNICODE;
- int olen = (int)wcslen((LPWSTR)wszMsg) + 1;
- int nlen = olen*(sizeof(WCHAR) + 1);
- szNewMsg = (LPSTR)mir_alloc(nlen);
- memcpy(szNewMsg, szMsg, olen);
- memcpy(szNewMsg + olen, wszMsg, olen*sizeof(WCHAR));
- mir_free(szMsg);
- }
- else {
- flags &= ~PREF_UNICODE; flags |= PREF_UTF;
- szNewMsg = (LPSTR)mir_strdup(szUtfMsg);
- }
- return szNewMsg;
+ flags &= ~PREF_UNICODE; flags |= PREF_UTF;
+ return mir_strdup(szUtfMsg);
}
// преобразуем текст из формата миранды в чистый UTF8
|