Hi,

Attached patch fixes an encoding problem when vimrun.exe is not found.
The warning message should be converted to UTF-16 and MessageBoxW
should be used.

Regards,
Ken Takata

-- 
-- 
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

--- 
You received this message because you are subscribed to the Google Groups 
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.
# HG changeset patch
# Parent  a62492725a6f1ad5d9d9eea696ac1663928735ba

diff --git a/src/os_win32.c b/src/os_win32.c
--- a/src/os_win32.c
+++ b/src/os_win32.c
@@ -4739,12 +4739,22 @@ mch_call_shell(
 #if defined(FEAT_GUI_W32)
 		if (need_vimrun_warning)
 		{
-		    MessageBox(NULL,
-			    _("VIMRUN.EXE not found in your $PATH.\n"
+		    char *msg = _("VIMRUN.EXE not found in your $PATH.\n"
 				"External commands will not pause after completion.\n"
-				"See  :help win32-vimrun  for more information."),
-			    _("Vim Warning"),
-			    MB_ICONWARNING);
+				"See  :help win32-vimrun  for more information.");
+		    char *title = _("Vim Warning");
+# ifdef FEAT_MBYTE
+		    if (enc_codepage >= 0 && (int)GetACP() != enc_codepage)
+		    {
+			WCHAR *wmsg = enc_to_utf16((char_u *)msg, NULL);
+			WCHAR *wtitle = enc_to_utf16((char_u *)title, NULL);
+			if (wmsg != NULL && wtitle != NULL)
+			    MessageBoxW(NULL, wmsg, wtitle, MB_ICONWARNING);
+			vim_free(wmsg);
+			vim_free(wtitle);
+		    } else
+# endif
+			MessageBox(NULL, msg, title, MB_ICONWARNING);
 		    need_vimrun_warning = FALSE;
 		}
 		if (!s_dont_use_vimrun && p_stmp)

Raspunde prin e-mail lui