turn off UTF-8 mode upon entering POSIX mode, for J�rg

This commit is contained in:
tg
2017-08-07 20:49:42 +00:00
parent c203e7c5b2
commit 1854fb9b3d
2 changed files with 15 additions and 6 deletions

7
misc.c
View File

@@ -32,7 +32,7 @@
#include <grp.h>
#endif
__RCSID("$MirOS: src/bin/mksh/misc.c,v 1.277 2017/05/05 22:53:30 tg Exp $");
__RCSID("$MirOS: src/bin/mksh/misc.c,v 1.278 2017/08/07 20:49:41 tg Exp $");
#define KSH_CHVT_FLAG
#ifdef MKSH_SMALL
@@ -271,6 +271,11 @@ change_flag(enum sh_flag f, int what, bool newset)
} else if ((f == FPOSIX || f == FSH) && newval) {
/* Turning on -o posix or -o sh? */
Flag(FBRACEEXPAND) = 0;
/* Turning on -o posix? */
if (f == POSIX) {
/* C locale required for compliance */
UTFMODE = 0;
}
} else if (f == FTALKING) {
/* Changing interactive flag? */
if ((what == OF_CMDLINE || what == OF_SET) && procpid == kshpid)