Hello, On 2018-02-18 01:46, Peter Da Silva wrote:
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:
You have supplied examples which are exchanged with each other and are confirming ``unsuprisingness'':
LANG=en_US.UTF-8
Ok - so your native environment locale is ``UTF-8''.
% cat localized.c
Why that program is named ``localized'' if...
[...] int main() { wprintf (L"'%4ls'\n", L"äöü");
... you are using "C" locale for LC_CTYPE? Behavior entirely unsurprising: there is no conversion from L"äöü" using "C" LC_CTYPE.
[...] % cat delocalized.c
Why that program is named ``delocalized'' if...
[...] setlocale(LC_ALL, "");
... you are using native environment locale (``UTF-8'') for LC_CTYPE? Behavior entirely unsurprising: there is conversion from L"äöü" using "UTF-8" LC_CTYPE.
-- best regards Cezary H. Noweta _______________________________________________ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users