mirror of
https://https.git.savannah.gnu.org/git/bash.git
synced 2026-07-16 08:30:49 +02:00
fix for read builtin and invalid multibyte characters followed by the delimiter; updated formatted documentation; new bash.pot file with updated strings; updated translations
This commit is contained in:
@@ -38,6 +38,25 @@ xyz
|
||||
a = xyz
|
||||
a = -xyz 123-
|
||||
a = abc
|
||||
<A>
|
||||
<$'B\315'>
|
||||
<$'C\226'>
|
||||
<A>
|
||||
<$'B\315'>
|
||||
<$'C\226'>
|
||||
<winter>
|
||||
<spring>
|
||||
<$'summer\200apple\200banana\200cherry'>
|
||||
<automn>
|
||||
<winter>
|
||||
<$'spring\375'>
|
||||
<summer>
|
||||
<automn>
|
||||
<winter>
|
||||
<$'spring\375'>
|
||||
<$'\277summer'>
|
||||
<$'\277'>
|
||||
<automn>
|
||||
timeout 1: ok
|
||||
unset or null 1
|
||||
timeout 2: ok
|
||||
|
||||
@@ -34,4 +34,24 @@ echo abcd | {
|
||||
echo a = $a
|
||||
}
|
||||
|
||||
# incomplete and invalid multibyte characters followed by the delimiter
|
||||
printf 'A\0B\315\0C\226\0' | while IFS= read -rd '' f; do printf '<%q>\n' "$f"; done
|
||||
printf 'A\nB\315\nC\226\n' | while IFS= read -r f; do printf '<%q>\n' "$f"; done
|
||||
|
||||
printf '%b\0' winter spring 'summer\0200apple\0200banana\0200cherry' automn |
|
||||
while IFS= read -rd "" season; do LC_ALL=C printf "<%q>\n" "$season"; done
|
||||
|
||||
printf '%b\200' winter 'spring\0375' summer automn |
|
||||
while IFS= read -rd $'\200' season; do LC_ALL=C printf "<%q>\n" "$season"; done
|
||||
|
||||
: ${TMPDIR:=/tmp}
|
||||
INFILE=$TMPDIR/read-in-$$
|
||||
printf '%b\243' winter 'spring\0375' '\0277summer' '\0277' automn > $INFILE
|
||||
|
||||
LANG=zh_HK.big5hkscs
|
||||
while IFS= read -rd $'\243' season; do
|
||||
LC_ALL=C printf "<%q>\n" "$season"
|
||||
done < $INFILE
|
||||
|
||||
rm -f $INFILE
|
||||
exit 0
|
||||
|
||||
Reference in New Issue
Block a user