Force device name to UTF-8 in legacy Mac OS X target.
We expect these strings to be UTF-8 when reported to the app, and I've got
a device here that's coming up with Unicode characters in it.
This already uses UTF-8 in the Mac OS X 10.5+ target, this was just a leftover
from the cut-and-pasted HUD Utilities code.
--- a/macosx_hidutilities.c Fri Jul 08 23:39:43 2011 -0700
+++ b/macosx_hidutilities.c Fri Jul 08 23:44:26 2011 -0700
@@ -581,7 +581,9 @@
refCF = CFDictionaryGetValue (usbProperties, CFSTR("USB Product Name"));
if (refCF)
{
- if (!CFStringGetCString (refCF, pDevice->product, 256, CFStringGetSystemEncoding ()))
+ // ryan forced this to UTF-8.
+ //if (!CFStringGetCString (refCF, pDevice->product, 256, CFStringGetSystemEncoding ()))
+ if (!CFStringGetCString (refCF, pDevice->product, 256, kCFStringEncodingUTF8))
HIDReportError ("CFStringGetCString error retrieving pDevice->product.");
}