Proposed solution for 3613609: lsort -nocase does not sort non-ASCII correctly
Slight improvement: if cs = "\xC0\x80" and ct = "\x00", loop would continue after NUL-byte, this should not happen.
Improved tests.
Fixed the weird edge case.
[3613609]: Replace strcasecmp() with UTF-8-aware version.
silence compiler warning