)]}' { "commit": "64a89adaa16461bd58730c1408b30aa7244b4f66", "tree": "6be6a0aeb8ffdfd10ea8fba84b239981657e6979", "parents": [ "3a07505a397c9d31cde6c2812b3800227442f7c0" ], "author": { "name": "Karel Zak", "email": "kzak@redhat.com", "time": "Thu May 06 16:35:50 2021 +0200" }, "committer": { "name": "Karel Zak", "email": "kzak@redhat.com", "time": "Thu May 06 16:35:50 2021 +0200" }, "message": "lib/jsonwrt: don\u0027t use ctype.h for ASCII chars\n\ntolower() does not work \"as expected\" for tr_TR.UTF-8 (Turkish).\nFortunately, we need to convert only objects and variables names in\nJSON output, and this is always old good ASCII.\n\nAnyway, for more details:\n\n\t$ cat a.c\n\t#include \u003cctype.h\u003e\n\t#include \u003cstdio.h\u003e\n\t#include \u003clocale.h\u003e\n\n\tint main(void)\n\t{\n\t\tint in, out;\n\n\t\tsetlocale(LC_ALL, \"\");\n\n\t\tin \u003d\u0027I\u0027;\n\t\tout \u003d tolower(in);\n\n\t\tprintf(\"%1$c [%1$d] --\u003e %2$c [%2$d]\\n\", in, out);\n\t\treturn 0;\n\t}\n\n\t$ make a\n\tcc a.c -o a\n\n\t$ LANG\u003den_US.utf8 ./a\n\tI [73] --\u003e i [105]\n\n\t$ LANG\u003dtr_TR.UTF-8 ./a\n\tI [73] --\u003e I [73]\n\nFixes: https://github.com/karelzak/util-linux/issues/1302\nSigned-off-by: Karel Zak \u003ckzak@redhat.com\u003e\n", "tree_diff": [ { "type": "modify", "old_id": "92d64f74645b78e3d80f0b66961706bbbc166fd4", "old_mode": 33188, "old_path": "lib/jsonwrt.c", "new_id": "f2003e80836b36f5000a4e1474e267de2596d1d4", "new_mode": 33188, "new_path": "lib/jsonwrt.c" } ] }