diff --git a/src/converter.cpp b/src/converter.cpp index 5ee947e..1905d8c 100644 --- a/src/converter.cpp +++ b/src/converter.cpp @@ -777,20 +777,20 @@ void copyImageFromFLC (const std::filesystem::path& fileName, const std::filesys if (file == nullptr) { - throw InstallException ("FLC-File '" + fileName.string() + "' not found" + TEXT_FILE_LF); + throw InstallException ("FLC-File '" + fileName.u8string() + "' not found" + TEXT_FILE_LF); } animation = FLI_Open (file, &error); if (error != 0) { - throw InstallException ("FLC-File '" + fileName.string() + "' may be corrupted" + TEXT_FILE_LF); + throw InstallException ("FLC-File '" + fileName.u8string() + "' may be corrupted" + TEXT_FILE_LF); } error = FLI_NextFrame (animation); if (error != 0) { FLI_Close (animation); - throw InstallException ("FLC-File '" + fileName.string() + "' may be corrupted" + TEXT_FILE_LF); + throw InstallException ("FLC-File '" + fileName.u8string() + "' may be corrupted" + TEXT_FILE_LF); } savePCX (animation->surface, dst); diff --git a/src/file.cpp b/src/file.cpp index 27f09e1..3241213 100644 --- a/src/file.cpp +++ b/src/file.cpp @@ -70,7 +70,7 @@ SDL_RWops* openFile (const std::filesystem::path& path, const char* mode) return file; } - throw InstallException ("Couldn't open file '" + (dir / fileName).string() + "' or '" + lowerCaseFileName + "'" + TEXT_FILE_LF); + throw InstallException ("Couldn't open file '" + (dir / fileName).u8string() + "' or '" + lowerCaseFileName + "'" + TEXT_FILE_LF); return nullptr; } @@ -92,7 +92,7 @@ void copyFile (const std::filesystem::path& source, const std::filesystem::path& } else { - throw InstallException ("Couldn't copy file '" + source.string() + "' to '" + dest.string() + "'" + TEXT_FILE_LF); + throw InstallException ("Couldn't copy file '" + source.u8string() + "' to '" + dest.u8string() + "'" + TEXT_FILE_LF); } } END_INSTALL_FILE (dest); diff --git a/src/pcx.cpp b/src/pcx.cpp index d8a3907..c2a9775 100644 --- a/src/pcx.cpp +++ b/src/pcx.cpp @@ -237,7 +237,7 @@ SDL_Surface* loadPCX (const std::filesystem::path& name) if (file == nullptr) { - throw InstallException (std::string ("Couldn't open file ") + name.string() + TEXT_FILE_LF); + throw InstallException (std::string ("Couldn't open file ") + name.u8string() + TEXT_FILE_LF); } //load data diff --git a/src/resinstaller.cpp b/src/resinstaller.cpp index 6abb342..60469e2 100644 --- a/src/resinstaller.cpp +++ b/src/resinstaller.cpp @@ -4463,6 +4463,7 @@ int main (int argc, char* argv[]) sVoicePath = sMAXPath; writeLog ("Language is not available"); } + writeLog ("Voice path: " + sVoicePath.u8string() + TEXT_FILE_LF); } // ask the user, which language to install else diff --git a/src/resinstaller.h b/src/resinstaller.h index 8d8b346..1d1873a 100644 --- a/src/resinstaller.h +++ b/src/resinstaller.h @@ -60,18 +60,18 @@ void trimSpaces (std::string& str, const std::locale& loc = std::locale()); void trimQuotes (std::string& str); -// makes all necessary actions after a successfull -// or unsuccessfull attempt to install a file +// makes all necessary actions after a successful +// or unsuccessful attempt to install a file #define END_INSTALL_FILE(file) \ catch (const InstallException& e) \ { \ - writeLog ("Error while installing file '" + std::filesystem::path(file).string() + "'" + TEXT_FILE_LF + e.message); \ + writeLog ("Error while installing file '" + std::filesystem::path (file).u8string() + "'" + TEXT_FILE_LF + e.message); \ iErrors++; \ wasError = true; \ } \ catch (const std::exception& e) \ { \ - writeLog ("Error while installing file '" + std::filesystem::path (file).string() + "'" + TEXT_FILE_LF + e.what() + TEXT_FILE_LF); \ + writeLog ("Error while installing file '" + std::filesystem::path (file).u8string() + "'" + TEXT_FILE_LF + e.what() + TEXT_FILE_LF); \ iErrors++; \ wasError = true; \ } \ diff --git a/src/wave.cpp b/src/wave.cpp index 2c92596..588e63d 100644 --- a/src/wave.cpp +++ b/src/wave.cpp @@ -98,7 +98,7 @@ int loadWAV (const std::filesystem::path& src, cWaveFile& waveFile) if (SDL_LoadWAV_RW (file, 0, &waveFile.spec, &waveFile.buffer, &waveFile.length) == nullptr) { SDL_RWclose (file); - throw InstallException ("File '" + src.string() + "' may be corrupted" + TEXT_FILE_LF); + throw InstallException ("File '" + src.u8string() + "' may be corrupted" + TEXT_FILE_LF); } //load smpl chunk readSmplChunk (file, waveFile);