Closed nai-kon closed 12 months ago
You probably need to pass the correct encoding name to the get_ports()
method with the encoding
keyword argument:
https://spotlightkid.github.io/python-rtmidi/rtmidi.html#rtmidi.MidiIn.get_ports
Or pass None
as the encoding and get raw byte strings back.
get_ports("utf-8")
returned a correct port name. Thank you!
Hello. If midi port name contains multi-byte characters, Japanese in my case, get_ports() returns garbled text. Here is samples with multi-byte character "日本語" which means "Japanese".
On Windows 10, python-rtmidi 1.5.6, Python 3.11.5
original port name
result
On MacOS Sonoma on M1 Mac, python-rtmidi 1.5.6, Python 3.11.5
original port name
result
Thanks.