From 864601c41faeec6dea78baf6c14f15c3ba164486 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Thu, 20 Apr 2023 11:42:18 +0300 Subject: Telegram: fix for Unicode file names --- protocols/JabberG/src/jabber_iq_handlers.cpp | 1 + protocols/JabberG/src/jabber_thread.cpp | 1 + protocols/Telegram/src/utils.cpp | 1 + 3 files changed, 3 insertions(+) (limited to 'protocols') diff --git a/protocols/JabberG/src/jabber_iq_handlers.cpp b/protocols/JabberG/src/jabber_iq_handlers.cpp index 2c3b25b90c..2b21589caa 100644 --- a/protocols/JabberG/src/jabber_iq_handlers.cpp +++ b/protocols/JabberG/src/jabber_iq_handlers.cpp @@ -321,6 +321,7 @@ bool CJabberProto::OnIqRequestOOB(const TiXmlElement*, CJabberIqInfo *pInfo) str2 = ft->httpPath; PROTORECVFILE pre = {}; + pre.dwFlags = PRFF_UTF; pre.timestamp = time(0); pre.descr.a = desc; pre.files.a = &str2; diff --git a/protocols/JabberG/src/jabber_thread.cpp b/protocols/JabberG/src/jabber_thread.cpp index 5e4fae32b9..5ee69b908e 100644 --- a/protocols/JabberG/src/jabber_thread.cpp +++ b/protocols/JabberG/src/jabber_thread.cpp @@ -1342,6 +1342,7 @@ void CJabberProto::OnProcessMessage(const TiXmlElement *node, ThreadData *info) ft->std.szCurrentFile.w = mir_utf8decodeW(szName); PROTORECVFILE pre = {}; + pre.dwFlags = PRFF_UTF; pre.fileCount = 1; pre.timestamp = time(0); pre.files.a = &pszName; diff --git a/protocols/Telegram/src/utils.cpp b/protocols/Telegram/src/utils.cpp index 0884188c16..ef2636563f 100644 --- a/protocols/Telegram/src/utils.cpp +++ b/protocols/Telegram/src/utils.cpp @@ -248,6 +248,7 @@ CMStringA CTelegramProto::GetMessageText(TG_USER *pUser, TD::MessageContent *pBo auto *pszFileName = pDoc->document_->file_name_.c_str(); PROTORECVFILE pre = {}; + pre.dwFlags = PRFF_UTF; pre.fileCount = 1; pre.timestamp = time(0); pre.files.a = &pszFileName; -- cgit v1.2.3