commit 52ec92dd0ba0df110408c4624405dd9d5be9a6ba parent b803ca61487dcb6a9d03d0f30889b463cb17b67f Author: Mike Oliphant <oliphant@nostatic.org> Date: Mon, 17 Apr 2023 18:25:09 -0700 Handle utf8 characters in IR path (#201) Diffstat:
M | NeuralAmpModeler/NeuralAmpModeler.cpp | | | 3 | ++- |
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/NeuralAmpModeler/NeuralAmpModeler.cpp b/NeuralAmpModeler/NeuralAmpModeler.cpp @@ -741,7 +741,8 @@ dsp::wav::LoadReturnCode NeuralAmpModeler::_GetIR(const WDL_String& irPath) dsp::wav::LoadReturnCode wavState = dsp::wav::LoadReturnCode::ERROR_OTHER; try { - this->mStagedIR = std::make_unique<dsp::ImpulseResponse>(irPath.Get(), sampleRate); + auto irPathU8 = std::filesystem::u8path(irPath.Get()); + this->mStagedIR = std::make_unique<dsp::ImpulseResponse>(irPathU8.string().c_str(), sampleRate); wavState = this->mStagedIR->GetWavState(); } catch (std::exception& e)