On Mon, Feb 19, 2018 at 3:21 AM, Cezary H. Noweta <c...@poczta.onet.pl> wrote:
> Hello, > > On 2018-02-18 00:36, Richard Hipp wrote: > >> The current behavior of the printf() function in SQLite, goofy though >> it may be, exactly mirrors the behavior of the printf() C function in >> the standard library in this regard. >> > > So I'm not sure whether or not this is something that ought to be "fixed". >> > > For the sake of sanity, such exception would be considered. I.e. > ``length'' specification could mean number of ``multibyte characters'' -- > not ``characters''. A C programmer has a chance to put all his buffer, > especially that there are no special provisions on multibyte characters in > the buffer (i.e. it must not begin nor end with an initial shift state): > for ( i = 0; len > i; i += 5 ) printf("%-5.5s", &s[i]); -- a bit non-sense > but illustrates the problem. > > On the other hand, SQLite's SQL has no access to memory buffers. In such > case, the C standard handles the situation (look at the end of ``s'' > conversion specifier together with ``l'' flag): ``In no case is a partial > multibyte character written.''. > > Is there somebody who things about a byte content of buffers, when he is > writing a software at a SQL level? everyone dealing with padding/precision using printf() ? > > > -- best regards > > Cezary H. Noweta > _______________________________________________ > sqlite-users mailing list > sqlite-users@mailinglists.sqlite.org > http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users > _______________________________________________ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users