From d31ffb676a57966248581926366d5eff6dee2ae7 Mon Sep 17 00:00:00 2001 From: Jaromir Wysoglad Date: Thu, 18 Jul 2019 14:01:04 -0700 Subject: TTS: Implement conversion to unicode in say on win --- backends/text-to-speech/windows/windows-text-to-speech.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'backends/text-to-speech') 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 #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("", _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; -- cgit v1.2.3