On Sun, 26 Feb 2012, Julian RĂ¼ger wrote:
OK, I think I finally found out what's going on here:
in waveform.c waveOutGetErrorTextA() calls WideCharToMultiByte(CP_ACP,.... with the ANSI codepage. When I change that to CP_UTF8, it works as expected.
Is this fix OK, or does that break anything? Should I send a patch?
waveOutGetErrorTextA() is correct. As its name indicates it's supposed to return an ANSI string.
So I think it's the test that should be performing the apprpriate conversion (assuming we really care) but I can't remember the details right now. In particular I'm not sure if using CP_UNIXCP would be appropriate here. It might depend on the API used to write to stdout.
And starting from a Unicode string would be much much better too... (in particular for languages like Japanese, etc.)