I read a german text from an sqlite database with C++, (the text looks good with the database viewer). But when I display it in a dialog with SetDlgItemText the text looks like this (see the picture).
CString strWarning(pStmt->GetColumnCString(nCol));
SetDlgItemText(IDC_WARNING_MESSAGE, strWarning);
Your string looks like it's encoded as UTF-8, which Windows doesn't handle.
You'll need to convert it to UTF-16 and ensure that you're calling the wide version of
SetDlgItemText
, either by changing your project's character set option toUse Unicode Character Set
or specifyingSetDlgItemTextW
.You can convert your string from UTF-8 to UTF-16 with the MultiByteToWideChar function.