[Bug 232374] /bin/sh can not handle ja_JP.eucJP character code

bugzilla-noreply at freebsd.org bugzilla-noreply at freebsd.org
Fri Oct 26 02:53:58 UTC 2018


https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=232374

--- Comment #1 from Kouichi Hirabayashi <kh at mogami.com> ---
As a cause of /bin/sh collapse in ja.JP.eucJP environment,
there seems to be two problem as below.

1) /usr/src/bin/sh 

  The control characters (CTLENDVAR, CTLBACKQ, CTLARI, CTLENDARI,
  CTLQUOTEMARK defined in parser.h) matches the second byte of
  many EUC KANJI characters. Therefore, lexical syntax analysis
  fails.

2) /usr/src/bin/libedit

  The following two functions do not consider ja.JP.eucJP environment.
    chartype.c: ct_conv_cbuff_resize()
    read.c: read_char()

Since /bin/sh is one of the basic programs of Unix, if it rejects
all character codes except UTF-8, it should display warning such as
"Can not be used in eucJP environment" when it started.  At present
it exits normally with EUC Kanji code input or key input such as
Alt-A, Alt-B, ...

Does the same problem occur in ko_KR.eucKR or zh_CN.eucCN environment?

-- 
You are receiving this mail because:
You are the assignee for the bug.


More information about the freebsd-bugs mailing list