arirusso/ffi-coremidi — pull request #3 by taiansu (2013-12-11 17:50:47+00:00)
Title: fix device name for different language & extract the method

UniMIDI stop with RuntimeError.new("CFStringGetCString") on my laptop which set the language as 「Traditional Chinese」, but works on my office english iMac. Turns out that UniMIDI crash because we have some multiple byte character in our device name.

According to the [Apple Document](https://developer.apple.com/library/mac/documentation/CoreFoundation/Reference/CFStringRef/Reference/reference.html#//apple_ref/c/func/CFStringGetCString), `CFStringGetCString` need one more byte of bufferSize for the `NUL` terminator.

I extract the method to another module for returns proper name to UniMIDI also.