diff options
-rw-r--r-- | backends/text-to-speech/windows/windows-text-to-speech.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/backends/text-to-speech/windows/windows-text-to-speech.cpp b/backends/text-to-speech/windows/windows-text-to-speech.cpp index 32087f5ccb..c646b9b3b3 100644 --- a/backends/text-to-speech/windows/windows-text-to-speech.cpp +++ b/backends/text-to-speech/windows/windows-text-to-speech.cpp @@ -32,6 +32,7 @@ #include <sapi.h> #include "backends/text-to-speech/windows/sphelper-scummvm.h" #include "backends/platform/sdl/win32/win32_wrapper.h" +#include "backends/platform/sdl/win32/codepage.h" #include "backends/text-to-speech/windows/windows-text-to-speech.h" @@ -113,7 +114,7 @@ bool WindowsTextToSpeechManager::say(Common::String str, Common::String charset) Common::String pitch= Common::String::format("<pitch absmiddle=\"%d\">", _ttsState->_pitch / 10); str.replace((uint32)0, 0, pitch); - WCHAR *strW = Win32::ansiToUnicode(str.c_str()); + WCHAR *strW = Win32::ansiToUnicode(str.c_str(), Win32::getCodePageId(charset)); bool result = _voice->Speak(strW, SPF_ASYNC | SPF_PURGEBEFORESPEAK, NULL) != S_OK; free(strW); _speechState = SPEAKING; |