Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: bug report : printf %.1s outputting more than 1 character



On Tue, Mar 14, 2023 at 9:56 PM Jason C. Kwan <jasonckwan@xxxxxxxxx> wrote:
>
> does the following ( below the "====" line ) behavior look even reasonable at all, regardless of your spec ? Because what the spec ends up doing is treating the rest of the input string as 1 byte and printing everything out, even though there are valid code points further down the input string.

I'm not the resident expert on multibyte character sets, so I'm just
reporting the situation and waiting for e.g. PWS to respond.  However,
as far as my understanding of the multibyte library goes, once you've
"desynchronized" the input by encountering an invalid byte, you're not
guaranteed that anything further that you see can be correctly
interpreted as a code point.  I agree that it's not ideal to just dump
everything else "raw".




Messages sorted by: Reverse Date, Date, Thread, Author