All pastes #1903840 Raw Edit

anssi

public text v1 · immutable
#1903840 ·published 2010-07-19 18:16 UTC
rendered paste body
[?1049h[?1h=[?12;25h[?12l[?25h[?25l"test.patch" 25L, 822Cdiff --git a/xbmc/lib/libPython/xbmcmodule/PythonAddon.cpp b/xbmc/lib/libPython/xbmcmodule/PythonAddon.cpp
index 2ce46fb..30a942a 100644
--- a/xbmc/lib/libPython/xbmcmodule/PythonAddon.cpp
+++ b/xbmc/lib/libPython/xbmcmodule/PythonAddon.cpp
@@ -22,6 +22,7 @@
 #include "PythonAddon.h"
 #include "pyutil.h"
 #include "addons/AddonManager.h"
+#include "utils/CharsetConverter.h"
 #include "GUIDialogAddonSettings.h"

 #ifndef __GNUC__
@@ -102,9 +103,10 @@ namespace PYXBMC return NULL;
     };

-    CStdString label = self->pAddon->GetString(id);
+    CStdStringW label;
+    g_charsetConverter.utf8ToW(self->pAddon->GetString(id), label);

-    return PyUnicode_DecodeUTF8(label.c_str(), label.size(), "replace");
+    return Py_BuildValue((char*)"u", label.c_str());
   } PyDoc_STRVAR(getSetting__doc__,
~                                                                                                                                                                                                      ~                                                                                                                                                                                                      ~                                                                                                                                                                                                      ~                                                                                                                                                                                                      ~                                                                                                                                                                                                      ~                                                                                                                                                                                                      ~                                                                                                                                                                                                      ~                                                                                                                                                                                                      ~                                                                                                                                                                                                      ~                                                                                                                                                                                                      ~                                                                                                                                                                                                      ~                                                                                                                                                                                                      ~                                                                                                                                                                                                      ~                                                                                                                                                                                                      ~                                                                                                                                                                                                      ~                                                                                                                                                                                                      ~                                                                                                                                                                                                      ~                                                                                                                                                                                                      ~                                                                                                                                                                                                      ~                                                                                                                                                                                                      ~                                                                                                                                                                                                      ~                                                                                                                                                                                                      ~                                                                                                                                                                                                      ~                                                                                                                                                                                                      ~                                                                                                                                                                                                      ~                                                                                                                                                                                                      ~                                                                                                                                                                                                      ~                                                                                                                                                                                                      ~                                                                                                                                                                                                      ~                                                                                                                                                                                                      ~                                                                                                                                                                                                      ~                                                                                                                                                                                                      1,1Kaik[?12l[?25h[?25lKomento :quit<Enter> lopettaa Vimin1,1Kaik[?12l[?25h[?25l1,1Kaik[?12l[?25h[?25l2[?12l[?25h[?25l2,1Kaik[?12l[?25h[?25l3[?12l[?25h[?25l3,1Kaik[?12l[?25h[?25l4[?12l[?25h[?25l4,1Kaik[?12l[?25h[?25l5[?12l[?25h