-
Notifications
You must be signed in to change notification settings - Fork 31
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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>
- Loading branch information
Showing
3 changed files
with
21 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters