On Fri, 10 Feb 2017 10:46:24 +0100 Dominique Devienne <ddevie...@gmail.com> wrote:
> Couldn't SQLite's built-in printf gain a thousand-separator formatting > argument, which doesn't need to be locale aware or could be even > explicit after the arg? ... > This is data meant to be viewed with any SQLite client, so kind of > "report". What you're really talking about here isn't a printf function in the SQLite C API, but the printing done by the sqlite3 shell. Glancing through that code, the shell retrieves all data as strings. Since SQLite doesn't maintain datatype information for columns, that's not surprising. Any standard printf implementation these days supports locale-specific thousands separators. If SQLite uses sprintf(3) under the hood to convert floating point values to strings in support of sqlite3_value_text, it could have access to that support. All it would need to do is call setlocale(3) in shell.c. --jkl _______________________________________________ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users