[cryptopp-users] unicode file name

2023-06-09 Thread fa
Hello When I try to calculate the Hash of the file with Unicode characters, it shows the following errors: terminate called after throwing an instance of 'CryptoPP::FileStore::OpenErr' what(): FileStore: error opening file for reading: C:/é “/テキストファイル.txt I compiled Crypto++

Fwd: [cryptopp-users] unicode file name

2023-06-14 Thread fa
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 {

Fwd: [cryptopp-users] unicode file name

2023-07-07 Thread fa
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

Fwd: [cryptopp-users] unicode file name

2023-07-28 Thread fa
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

Fwd: [cryptopp-users] unicode file name

2023-06-15 Thread fa
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