Corinna Vinschen wrote: > > They can't work on multibyte strings. This is evident from the fact that > > strncasecmp gets one integer as argument, not two integers. > > Good point. > > With standard functions, one really should convert MB string to wide > char and call wcscasecmp, etc.
Nope, wide characters are the wrong approach to the problem [1]. Nowadays, ISO C 23 has standardized on char32_t as the portable Unicode character type. [2] They have left the corresponding functions "as an exercise to the reader", though. Gnulib and GNU libunistring fill this gap. See the columns "multibyte strings" and "32-bit wide character strings" in [3]. Bruno [1] https://www.gnu.org/software/gnulib/manual/html_node/The-wchar_005ft-type.html [2] https://www.gnu.org/software/gnulib/manual/html_node/The-char32_005ft-type.html [3] https://www.gnu.org/software/gnulib/manual/html_node/Comparison-of-string-APIs.html -- Problem reports: https://cygwin.com/problems.html FAQ: https://cygwin.com/faq/ Documentation: https://cygwin.com/docs.html Unsubscribe info: https://cygwin.com/ml/#unsubscribe-simple