From: Xiaofan C. <xia...@gm...> - 2010-10-09 00:34:10
|
On Sat, Oct 9, 2010 at 6:06 AM, Alan Ott <al...@si...> wrote: > Libusb reports strings as UTF-16. I thought you wanted UTF-8. It should > be easy enough to get UTF-16 on every platform, but in that case, the > hidraw version would have to convert to UTF-16 from UTF-8 (and a user of > that implementation could say, "just give me the UTF-8 so that it > doesn't have to be converted twice"). Of course, it's hard to argue > against supporting UTF-16, since it's the USB native encoding. > >> hidapi transforms the strings from char* to wchar_t* and I will have >> to do the reverse conversion in my code to have char* again. It looks >> stupid. >> >> > > What type of application is it where you need to have UTF-8 as a char* > (that won't accept wchar_t)? I'm mostly asking for my own curiosity > about what people are using HIDAPI for. > Just wondering if a convenience function would help, similar to libusb-1.0's libusb_get_string_descriptor_ascii() or other string related functions. http://libusb.sourceforge.net/api-1.0/group__desc.html -- Xiaofan |