mirror of
git://git.code.sf.net/p/cdesktopenv/code
synced 2025-03-09 15:50:02 +00:00
Fix expansion of multibyte character after $1 - $9, $?, etc (#102)
A multibyte character immediately following an expansion of a single-character name, e.g. $1 through $9, $?, $-, etc. was corrupted when in a UTF-8 locale, e.g.: $ set -- foo; echo "$1テスト" foo?スト Prior discussion: https://www.mail-archive.com/ast-users@lists.research.att.com/msg01060.html https://bugzilla.redhat.com/show_bug.cgi?id=1256495 src/cmd/ksh93/sh/macro.c: - Apply a Red Hat patch by Paulo Andrade that avoids calling fcmbget() if backtracking more than one byte might be required. src/cmd/ksh93/tests/basic.c: - Test "テスト" following expansion of "$1", "$?" and "$#". Co-authored-by: Martijn Dekker <martijn@inlv.org>
This commit is contained in:
parent
02a14ff9b7
commit
4144f404ae
3 changed files with 21 additions and 1 deletions
4
NEWS
4
NEWS
|
@ -8,6 +8,10 @@ Any uppercase BUG_* names are modernish shell bug IDs.
|
|||
- Fixed a bug that caused multidimensional associative arrays to be created
|
||||
with an extra array member.
|
||||
|
||||
- Fixed a bug that caused the expansions of positional parameters $1 - $9,
|
||||
as well as special parameters such as $? and $-, to corrupt any multibyte
|
||||
characters immediately following the expansion if a UTF-8 locale is active.
|
||||
|
||||
2020-07-29:
|
||||
|
||||
- On a ksh compiled to use fork(2) to run external commands, a bug has been
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue