From ccc379ac30775d5b73698b83875a35fc1bfa56d0 Mon Sep 17 00:00:00 2001 From: Steve Brokenshire Date: Wed, 17 Jan 2018 22:49:01 +0000 Subject: [PATCH] frmActivityMgr: UTF-8 support for adding/editing contacts implemented --- source/actmgr/frmActivityMgr.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/source/actmgr/frmActivityMgr.cpp b/source/actmgr/frmActivityMgr.cpp index 17fb6ee..be5f40a 100644 --- a/source/actmgr/frmActivityMgr.cpp +++ b/source/actmgr/frmActivityMgr.cpp @@ -496,7 +496,7 @@ void frmActivityMgr::ProcessTasksThread() #endif COServerResponse AddContactResponse = ConnObjectIter->second->AddContact(StringURLIter->second.ToStdString(), - StringDataIter->second.ToStdString()); + std::string(StringDataIter->second.ToUTF8())); if (AddContactResponse.RequestResult != COREQUEST_OK){ iter->second = 2; @@ -821,7 +821,7 @@ void frmActivityMgr::ProcessTasksThread() // Upload the data to the server. COServerResponse EditContactResponse = ConnObjectIter->second->EditContact(StringURLIter->second.ToStdString(), - StringDataIter->second.ToStdString()); + std::string(StringDataIter->second.ToUTF8())); if (EditContactResponse.RequestResult != COREQUEST_OK){ iter->second = 2; @@ -1781,7 +1781,7 @@ void frmActivityMgr::ProcessTasksThread() // Decided to use client version. - COServerResponse EditContactResponse = ConnObjectIter->second->EditContact(vCardAdd[vi].ToStdString(), ClientData.WriteString().ToStdString()); + COServerResponse EditContactResponse = ConnObjectIter->second->EditContact(vCardAdd[vi].ToStdString(), std::string(ClientData.WriteString().ToUTF8())); if (EditContactResponse.RequestResult != COREQUEST_OK){ iter->second = 2; @@ -1830,7 +1830,7 @@ void frmActivityMgr::ProcessTasksThread() // Upload the data to the server. - COServerResponse AddContactResponse = ConnObjectIter->second->AddContact(vCardAdd[vi].ToStdString(), TaskData.ToStdString()); + COServerResponse AddContactResponse = ConnObjectIter->second->AddContact(vCardAdd[vi].ToStdString(), std::string(TaskData.ToUTF8())); if (AddContactResponse.RequestResult != COREQUEST_OK){ iter->second = 2; @@ -1923,7 +1923,7 @@ void frmActivityMgr::ProcessTasksThread() // Decided to use client version. - COServerResponse EditContactResponse = ConnObjectIter->second->EditContact(vCardAdd[vi].ToStdString(), ClientData.WriteString().ToStdString()); + COServerResponse EditContactResponse = ConnObjectIter->second->EditContact(vCardAdd[vi].ToStdString(), std::string(ClientData.WriteString().ToUTF8())); if (EditContactResponse.RequestResult != COREQUEST_OK){ iter->second = 2; @@ -1972,7 +1972,7 @@ void frmActivityMgr::ProcessTasksThread() // Upload the data to the server. - COServerResponse AddContactResponse = ConnObjectIter->second->AddContact(vCardAdd[vi].ToStdString(), TaskData.ToStdString()); + COServerResponse AddContactResponse = ConnObjectIter->second->AddContact(vCardAdd[vi].ToStdString(), std::string(TaskData.ToUTF8())); if (AddContactResponse.RequestResult != COREQUEST_OK){ iter->second = 2; -- 2.39.5