flipswitchingmonkey / FlexASIO_GUI

Simple configuration GUI for FlexASIO
MIT License
336 stars 26 forks source link

Fix non-Latin characters in device names #25

Closed vasilevp closed 2 years ago

vasilevp commented 2 years ago

Should fix #22

The original fix might have worked for some extended Latin names, but it completely breaks down for non-Latin alphabets. I think I've identified the issue which is that the strings we get from PortAudio are UTF-8, but are passed to .NET as if they were ASCII, hence they get mangled by the runtime.

On my end, I've successfully tested this with and without the UTF-8 support included with Windows 11. But please verify this on your machine, as I've seen you mention different results in the original issue.

I've attached screenshots highlighting the difference.

Screenshot comparison without UTF-8 support ![изображение](https://user-images.githubusercontent.com/1939685/144754697-f2a81d9e-0a2a-4e0b-9373-615907e9c678.png)
Screenshot comparison with UTF-8 support (Win11 Beta feature) ![изображение](https://user-images.githubusercontent.com/1939685/144754860-0b8f07a3-7113-47ab-b15f-a01080015896.png)
flipswitchingmonkey commented 2 years ago

Merged and hopefully fixed. Thanks.

Streametch commented 2 years ago

Issue gone, thank you!