1
0
mirror of https://foundry.openuru.org/gitblit/r/CWE-ou-minkata.git synced 2025-07-18 19:29:09 +00:00

Merge pull request #362 from zrax/fix_unicode_chat

Fix Unicode characters in chat
This commit is contained in:
2013-12-09 19:16:34 -08:00

View File

@ -2162,11 +2162,13 @@ bool plPythonFileMod::MsgReceive(plMessage* msg)
}
plProfile_BeginTiming(PythonUpdate);
plStringBuffer<wchar_t> wMessage = pkimsg->GetString().ToWchar();
PyObject* uMessage = PyUnicode_FromWideChar(wMessage, wMessage.GetSize());
PyObject* retVal = PyObject_CallMethod(
fPyFunctionInstances[kfunc_RTChat],
(char*)fFunctionNames[kfunc_RTChat],
"Osl", player, pkimsg->GetString().c_str(),
pkimsg->GetFlags());
"OOl", player, uMessage, pkimsg->GetFlags());
Py_DECREF(uMessage);
if ( retVal == nil )
{
#ifndef PLASMA_EXTERNAL_RELEASE