]> git.sesse.net Git - vlc/commitdiff
unicode support msn plugin
authorKaarlo Raiha <kaarlo.raiha@tut.fi>
Sun, 29 Mar 2009 15:06:20 +0000 (18:06 +0300)
committerJean-Baptiste Kempf <jb@videolan.org>
Sun, 29 Mar 2009 19:24:05 +0000 (21:24 +0200)
Signed-off-by: Jean-Baptiste Kempf <jb@videolan.org>
modules/misc/notify/msn.c

index d38fcbf8c51703398e59cbe1d98b70601e881399..67951bc692b8abe2f7cfc9731bca921a6ed43516 100644 (file)
@@ -194,7 +194,9 @@ static int SendToMSN( const char *psz_msg )
 
     wchar_t buffer[MSN_MAX_LENGTH];
 
-    mbstowcs( buffer, psz_msg, MSN_MAX_LENGTH );
+    //mbstowcs( buffer, psz_msg, MSN_MAX_LENGTH );
+    int nLen = MultiByteToWideChar(CP_ACP, 0, psz_msg, -1, NULL, NULL);
+    MultiByteToWideChar(CP_ACP, 0, psz_msg, -1, &buffer, nLen);
 
     msndata.dwData = 0x547;
     msndata.lpData = &buffer;