On 2018-02-17, at 17:36, Richard Hipp <d...@sqlite.org> 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".
Printf's handling of unicode is inconsistent in other ways, too. I suspect that there's still undefined behavior floating around in there too. Even wprintf isn't entirely unsurprising: % env ... LANG=en_US.UTF-8 ... % cat localized.c #include <stdio.h> #include <wchar.h> int main() { wprintf (L"'%4ls'\n", L"äöü"); } % cc localized.c % ./a.out ' ???' % cat delocalized.c #include <stdio.h> #include <wchar.h> #include <locale.h> int main() { setlocale(LC_ALL, ""); wprintf (L"'%4ls'\n", L"äöü"); } % cc delocalized.c % ./a.out ' äöü' % uname -a Darwin Stonehenge.local 16.7.0 Darwin Kernel Version 16.7.0: Thu Jan 11 22:59:40 PST 2018; root:xnu-3789.73.8~1/RELEASE_X86_64 x86_64 _______________________________________________ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users