On Thu, 22 Dec 2005, Elliotte Harold wrote: >However all three strings are defined in the USB 2.0 spec to be UTF-16 >little endian encoded.
That doesn't mean anything for USB 1.1 devices though... >The USB 1.1 spec isn't as explicit but I believe >it's effectively the same in practice. Maybe. I don't have the same confidence in all USB device manufacturers that you seem to :-) >Since all conforming Java VMs are required to support the UTF-16 >big-endian and little-endian encodings is there any real chance this >exception might be thrown? maybe in J2ME somewhere? If you are using the latest Sun package you should be fine, or really any Java package since 1.3. Should is the keyword of course. You can do this instead: byte[] b = aUsbDevice.getUsbStringDescriptor(1).bString(); String s = new String(b, 0, b.length, "UTF-16LE"); or String s = new String(b, "UTF-16LE"); although those String constructors both throw UnsupportedEncodingException too so you don't really gain anything, except being able to explicitly use UTF-16LE decoding. -- Dan Streetman [EMAIL PROTECTED] --------------------- 186,272 miles per second: It isn't just a good idea, it's the law! ------------------------------------------------------- This SF.net email is sponsored by: Splunk Inc. Do you grep through log files for problems? Stop! Download the new AJAX search engine that makes searching your log files as easy as surfing the web. DOWNLOAD SPLUNK! http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click _______________________________________________ javax-usb-devel mailing list javax-usb-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/javax-usb-devel