we need to write a function which can check whether a string is valid UTF8 or not. A client sends data (which is supposed to be UTF8) and on the server side, we want to confirm that sent data is really UTF8.
The client is BREW (mobile platform) application and server is written on windows desktop (windows's API).
Is there any API in windows that can help to determine the validity of a UTF8 string?
I have seen something like MultiByteToWideChar()
which convert UTF8 to wide character (2 bytes), and if we use this function and it fails, it means that passed string doesn't have UTF8 character/characters.