From 9de7eaca48475e8e5c7f04b72451983ace0ccee5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20P=C3=B6sel?= Date: Mon, 1 Jun 2015 20:23:52 +0000 Subject: MinecraftDynmap: Fix codepage for chat strings git-svn-id: http://svn.miranda-ng.org/main/trunk@13964 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- protocols/MinecraftDynmap/src/chat.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'protocols/MinecraftDynmap/src') diff --git a/protocols/MinecraftDynmap/src/chat.cpp b/protocols/MinecraftDynmap/src/chat.cpp index c4cd050f77..cd29adbb0e 100644 --- a/protocols/MinecraftDynmap/src/chat.cpp +++ b/protocols/MinecraftDynmap/src/chat.cpp @@ -27,8 +27,8 @@ void MinecraftDynmapProto::UpdateChat(const char *name, const char *message, con std::string smessage = message; utils::text::replace_all(&smessage, "%", "%%"); - ptrT tmessage(mir_a2t(smessage.c_str())); - ptrT tname(mir_a2t(name)); + ptrT tmessage(mir_a2t_cp(smessage.c_str(), CP_UTF8)); + ptrT tname(mir_a2t_cp(name, CP_UTF8)); GCDEST gcd = { m_szModuleName, m_tszUserName, GC_EVENT_MESSAGE }; GCEVENT gce = { sizeof(gce), &gcd }; @@ -88,7 +88,7 @@ int MinecraftDynmapProto::OnChatEvent(WPARAM, LPARAM lParam) void MinecraftDynmapProto::AddChatContact(const char *name) { - ptrT tname(mir_a2t(name)); + ptrT tname(mir_a2t_cp(name, CP_UTF8)); GCDEST gcd = { m_szModuleName, m_tszUserName, GC_EVENT_JOIN }; GCEVENT gce = { sizeof(gce), &gcd }; @@ -108,7 +108,7 @@ void MinecraftDynmapProto::AddChatContact(const char *name) void MinecraftDynmapProto::DeleteChatContact(const char *name) { - ptrT tname(mir_a2t(name)); + ptrT tname(mir_a2t_cp(name, CP_UTF8)); GCDEST gcd = { m_szModuleName, m_tszUserName, GC_EVENT_PART }; GCEVENT gce = { sizeof(gce), &gcd }; @@ -123,7 +123,7 @@ void MinecraftDynmapProto::DeleteChatContact(const char *name) INT_PTR MinecraftDynmapProto::OnJoinChat(WPARAM,LPARAM suppress) { - ptrT tszTitle(mir_a2t(m_title.c_str())); + ptrT tszTitle(mir_a2t_cp(m_title.c_str(), CP_UTF8)); // Create the group chat session GCSESSION gcw = {sizeof(gcw)}; @@ -155,7 +155,7 @@ INT_PTR MinecraftDynmapProto::OnJoinChat(WPARAM,LPARAM suppress) void MinecraftDynmapProto::SetTopic(const char *topic) { - ptrT ttopic(mir_a2t(topic)); + ptrT ttopic(mir_a2t_cp(topic, CP_UTF8)); GCDEST gcd = { m_szModuleName, m_tszUserName, GC_EVENT_TOPIC }; GCEVENT gce = { sizeof(gce), &gcd }; -- cgit v1.2.3