Re: read -N and UTF-8 characters

2017-04-08 Thread Chet Ramey
On 4/6/17 10:15 AM, Stephane Chazelas wrote: > Using "read -N" on text containing multi-byte characters > produces incorrect result. Thanks for the report. This will be fixed in the next devel branch push. -- ``The lyf so short, the craft so long to lerne.'' - Chaucer ``Ars lon

read -N and UTF-8 characters

2017-04-06 Thread Stephane Chazelas
Using "read -N" on text containing multi-byte characters produces incorrect result. On Debian amd64 with the latest code from git: $ locale charmap UTF-8 $ printf '\ue9VWXYZ' | ./bash -c 'IFS= read -rN4 a; printf %s "$a"' | hd c3 58 a9 56 57|.X.VW| 00