zsh-workers
 help / color / mirror / code / Atom feed
From: Bart Schaefer <schaefer@brasslantern.com>
To: "Jason C. Kwan" <jasonckwan@yahoo.com>
Cc: "zsh-workers@zsh.org" <zsh-workers@zsh.org>
Subject: Re: bug report : printf %.1s outputting more than 1 character
Date: Wed, 15 Mar 2023 08:31:39 -0700	[thread overview]
Message-ID: <CAH+w=7ZsHMF_x=O3iE_dqtyaV7FpVK7Sgurf2=5=hbC=fSCLdw@mail.gmail.com> (raw)
In-Reply-To: <478761809.298180.1678856216911@mail.yahoo.com>

On Tue, Mar 14, 2023 at 9:56 PM Jason C. Kwan <jasonckwan@yahoo.com> 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".


  reply	other threads:[~2023-03-15 15:32 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <1621619253.265114.1678847919086.ref@mail.yahoo.com>
2023-03-15  2:38 ` Jason C. Kwan
2023-03-15  3:46   ` Bart Schaefer
2023-03-15  4:56     ` Jason C. Kwan
2023-03-15 15:31       ` Bart Schaefer [this message]
2023-03-15 15:50         ` Roman Perepelitsa
2023-03-18 16:56         ` Peter Stephenson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAH+w=7ZsHMF_x=O3iE_dqtyaV7FpVK7Sgurf2=5=hbC=fSCLdw@mail.gmail.com' \
    --to=schaefer@brasslantern.com \
    --cc=jasonckwan@yahoo.com \
    --cc=zsh-workers@zsh.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).