Fwd: [cryptopp-users] unicode file name
Hi One Sini Thanks for your reply, but my problem is not related to file permission or insufficient privileges. No errors occurred when I do this operation with English characters, but errors occur when I use UTF-8 characters. I think the Cryptopp library has a problem with UTF-8 characters. -- You received this message because you are subscribed to the Google Groups "Crypto++ Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to cryptopp-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/cryptopp-users/b8630c42-0b17-47db--6dd49b1608bfn%40googlegroups.com.
Fwd: [cryptopp-users] unicode file name
Hi Jeffrey Walton Sorry I answered late. std::filesystem::path _path { std::filesystem::u8path(filePath.toStdString()) }; std::string _path_string { _path.u8string() }; std::ifstream m_file(_path_string, std::ios::in); FileSource f(m_file, true, new HashFilter(hash, new HexEncoder(new StringSink(digest; ERROR: terminate called after throwing an instance of 'CryptoPP::FileStore::ReadErr' what(): FileStore: error reading file -- You received this message because you are subscribed to the Google Groups "Crypto++ Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to cryptopp-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/cryptopp-users/cb4562d6-7ea9-4b7c-9a6f-c280421fffc1n%40googlegroups.com.
Fwd: [cryptopp-users] unicode file name
Thanks to Jeffrey Walton and coshvji cujmlqef I tried both of your methods but they both print the following errors: terminate called after throwing an instance of 'CryptoPP::FileStore::ReadErr' what(): FileStore: error reading file -- You received this message because you are subscribed to the Google Groups "Crypto++ Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to cryptopp-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/cryptopp-users/20894b9a-ff9e-411c-97dc-58899af3ed3en%40googlegroups.com.
Fwd: [cryptopp-users] unicode file name
I tried two methods: 1. void CryptoHashes::makeFileHash(const QString ) { FileSource f(filePath.toStdString().c_str(), true, new HashFilter(hash, new HexEncoder(new StringSink(digest; } 2. void CryptoHashes::makeFileHash(const QString ) { std::filesystem::path _path { std::filesystem::u8path(filePath.toStdString()) }; std::ifstream m_file(_path, std::ios::in); FileSource f(m_file, true, new HashFilter(hash, new HexEncoder(new StringSink(digest; } the only exception is that when I tried method 2, it always calculated hash of NULL, no matter which file I selected. -- You received this message because you are subscribed to the Google Groups "Crypto++ Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to cryptopp-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/cryptopp-users/64e26ccb-51e8-4741-8726-aa385a8501a8n%40googlegroups.com.