Right now, if there are extended unicode characters (i.e. Japanese) in the name of a MIDI device, portmidi just returns a blank string (""). In Mac OS X 10.7, the names of the default MIDI devices are now localized, so that means for all Mac OS X systems in Japanese, Chinese, Greek, Korean, etc. the MIDI names will all be blank. The attached patch fixes this by using the Mac OS X CFString API to fetch a full UTF-8 version of the name.