*** main.c.orig Mon Sep 26 13:49:52 2005 --- main.c Sat Oct 08 12:00:18 2005 *************** *** 218,223 **** --- 218,229 ---- * work until set_init_1() has been called! */ setlocale(LC_ALL, ""); + # ifdef WIN32 + /* Apparently MS-Windows printf() may cause a crash when we give it + * 8-bit text while it's expecting text in the current locale. This + * call avoids that. */ + setlocale(LC_CTYPE, "C"); + # endif # ifdef FEAT_GETTEXT { *** ex_cmds2.c.orig Mon May 16 23:35:40 2005 --- ex_cmds2.c Sat Oct 08 11:51:54 2005 *************** *** 5656,5662 **** --- 5656,5670 ---- * FEAT_GETTEXT isn't defined, so that shell commands use this * value. */ if (what == LC_ALL) + { vim_setenv((char_u *)"LANG", name); + #ifdef WIN32 + /* Apparently MS-Windows printf() may cause a crash when + * we give it 8-bit text while it's expecting text in the + * current locale. This call avoids that. */ + setlocale(LC_CTYPE, "C"); + #endif + } if (what != LC_CTYPE) { char_u *mname;