Here you can see that when you convert from Wide to Narrow some symbols may be replaced by ?
. How to detect those cases when W2A conversion is applied on a string. Round trip conversion is a way, but not fast. I guess while converting W2A function should mark somehow that the conversion was not fully possible. How to get that information?
EDIT: For example in case of
int WideCharToMultiByte(
UINT CodePage,
DWORD dwFlags,
LPCWSTR lpWideCharStr,
int cchWideChar,
LPSTR lpMultiByteStr,
int cbMultiByte,
LPCSTR lpDefaultChar,
LPBOOL lpUsedDefaultChar
);
The last argument is telling what I need. What about W2A? How to detect the case?