From: Junio C Hamano Date: Thu, 31 Jan 2019 21:35:57 GMT Subject: Re: Broken interactive rebase text after some UTF-8 characters Message-ID: In-Reply-To: <2cbb5818-643d-bafd-6721-91e0d291a5fd@talktalk.net> Phillip Wood writes: >> Are we misusing C formats? > > The C standard and POSIX both say that the * refers to the maximum > number of bytes to print but it looks like it is being treated as the > maximum number of characters on OpenIndiana. > > Johannes - Perhaps we should change it to use fwrite() unless printf() > gets fixed and we're sure no other operating systems are affected? Avoid such a rewrite, as "%*.s" that takes (int, char *) are used in many other places in our codebase, if you can.