MFC : How to check if a character input is unicode?

Check the length of the string and size in bytes If both are equal then it ASCII If size in bytes is larger than length of the string, then it contains UNICODE characters I remember using Len() and LenB() functions in VS6 for the same GoodLUCK!

Check the length of the string and size in bytes. If both are equal then it ASCII. If size in bytes is larger than length of the string, then it contains UNICODE characters.

I remember using Len() and LenB() functions in VS6 for the same... GoodLUCK!

Microsoft supplies the API IsTextUnicode. Some of its bugs are famous.

I figured using regex to check each character input if it's unicode or not is easier... :).

Any character you input is Unicode, because Unicode covers all code pages supported by Windows, and more. You can call IsWindowUnicode and if the result is true, and you retrieve the text with GetWindowTextW (or GetWindowText and UNICODE is defined), then the result is stored in a Unicode string (wchar_t or WCHART, same thing). Otherwise you retrieve the result in a char array and it is encoded in the system code page (also improperly called "ANSI code page").

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