On 5/26/23 3:44 AM, Grisha Levit wrote:
If expanding a \u (or \U) escape sequence fails, Bash replaces the
input escape sequence with a newly generated one:
$ LC_ALL=C printf %b \\U80
\u0080
Bash normalizes to a consistent result across printf/echo/$''.
Since this new sequence may by longer than the input, it can cause an
overflow in printf:
Thanks, this should use the same logic as ansicstr(), since it ends up
calling the same translation functions.
Chet
--
``The lyf so short, the craft so long to lerne.'' - Chaucer
``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, UTech, CWRU c...@case.edu http://tiswww.cwru.edu/~chet/