summaryrefslogtreecommitdiffstats
path: root/src/mbyte.c
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2004-09-06 17:44:46 +0000
committerBram Moolenaar <Bram@vim.org>2004-09-06 17:44:46 +0000
commit15d0a8c77dad867b69822e2fd8f9f6bbcf765c48 (patch)
treee84faedc007f9c2b81b9056a400dccade2b947e5 /src/mbyte.c
parentd4755bb0e04fca334675f1503bd6474b017a9bba (diff)
updated for version 7.0015v7.0015
Diffstat (limited to 'src/mbyte.c')
-rw-r--r--src/mbyte.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/mbyte.c b/src/mbyte.c
index 407f6674b6..a71fb51746 100644
--- a/src/mbyte.c
+++ b/src/mbyte.c
@@ -426,6 +426,9 @@ mb_init()
vimconv_T vimconv;
char_u *p;
#endif
+#ifdef WIN32
+ int prev_enc_utf8 = enc_utf8;
+#endif
if (p_enc == NULL)
{
@@ -684,6 +687,17 @@ codepage_invalid:
enc_utf8 ? "utf-8" : (char *)p_enc);
#endif
+#ifdef WIN32
+ /* When changing 'encoding' while starting up, then convert the command
+ * line arguments from the active codepage to 'encoding'. */
+ if (starting != 0)
+ {
+ extern void fix_arg_enc(void);
+
+ fix_arg_enc();
+ }
+#endif
+
#ifdef FEAT_AUTOCMD
/* Fire an autocommand to let people do custom font setup. This must be
* after Vim has been setup for the new encoding. */