How do I make a case insensitive compare between two Unicode characters or strings under Windows in C/C++?

My first thought is that you should lookup CompareStringEx with its parameters LOCALE_INVARIANT and NORM_IGNORECASE.

Whoops, you want to compare char32s. Ignore my post. My original answer For posterity: You can use _wcsicmp(const wchar_t *string1, const wchar_t *string2) or _mbsicmp(const unsigned char_t *string1, const unsigned char *string2) the former compares wide characters (usually UTF-16) and the latter compares multi-byte characters (usually UTF-8).

You need to set the code page using _setmbcp(int codepage).

Char32 is 32bit (UTF-32), wchar_t is 16 bits (UTF16-LE). – sorin Mar 8 '10 at 16:23 wchar_t is UCS-2 for all practical purposes. The widestring functions don't treat widestring as variable character length; that's the whole point of having them.

– Seva Alekseyev Mar 8 '10 at 18:58.

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions