add Win32 API Unicode converter, other small changes

Qt Example: add file.close() (consistency between GTK example)
RagePhoto: saveFile() checks for good(), more data() -> c_str()
This commit is contained in:
Syping 2021-11-06 20:17:28 +01:00
parent 85ab850895
commit 05890541dc
6 changed files with 122 additions and 21 deletions

View file

@ -59,5 +59,8 @@ int main(int argc, char *argv[])
};
std::wstring_convert<std::codecvt_utf8_utf16<char16_t>,char16_t> convert;
std::string photoString = convert.to_bytes(reinterpret_cast<char16_t*>(photoHeader));
if (convert.converted() == 0) {
return -1;
}
return strcmp(photoString.c_str(), "PHOTO - 02/01/17 08:42:44");
}