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:
Chet Ramey
2025-04-22 10:39:43 -04:00
parent 482872ed8b
commit 7731dc5c4d
77 changed files with 19705 additions and 13848 deletions
+19
View File
@@ -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
+20
View File
@@ -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