On Sat, 11 Jan 2003, Roger Lindsjo wrote: >I'm not to fond of setting the variable storage type (not variable type) >in front of the methods. Hungarian notation at least tells what type of >value the variable holds. But I see your point of following the PSecs >notation.
My feeling is, as long as the names (besides the storage type prefix) are the same as what's in the USB spec, I don't care too much what the prefix is. I originally started changing the names because many of them didn't match the USB spec at all, e.g. bConfigurationValue() used to be getConfigNum()... Anyone else prefer get<field> instead of b<field>, w<field>, etc...? >> -Added bString to StringDescriptor, and getString throws >> UnsupportedEncodingException. The bString is just the raw byte[], >> which the StringDescriptor should have. The actual String though, has >> to be translated and it's possible the JVM doesn't have the encoding >> to translate it. > >This issue is still foggy to me. Does anyone here have the 2 books >referenced at page 205 in the usb spec? ("The Unicode Standard, Worldwide >Character Encoding, Version 1.0 Volume 1 & 2" The Unicode Consortium, >Addison-Wesley Publishing Company.) Section 9.6.5 in the USB specs only >says UNICODE encodings, but to me this gives a whole range of possible >encodings. And there is no way (that I can see) to find out which encoding >is used. I'm guessing UTF-8 is used, but I do not know. I believe it's UTF-16 Little-Endian. In the StringDescriptor RI implementation, I try to use several encoding that are usually present, and default to ASCII (only if the string is pure 8-bit, i.e. no high bytes are non-zero). From what I could find in Java documentation, the best (only?) encodings to use are: "UnicodeLittleUnmarked", "UnicodeLittle", and "UTF-16LE". For more platforms and JVMs, that should work, but it's possible none of those are present, maybe for J9 or something. J9 is crazy. -- 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: SourceForge Enterprise Edition + IBM + LinuxWorld = Something 2 See! http://www.vasoftware.com _______________________________________________ javax-usb-devel mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/javax-usb-devel