Ahh yes, BASE32 or BASE64 is a good idea.
Also, dilettante, you're right. I didn't think about control characters. Therefore, it'd be better if we added &h20 to get things off of them. The ChrW() would become:
I've never messed with it that much in VB6, but here's a link to a BASE64 encode/decode routine. I'm sure there are others, and I'd certainly test well before using any of these, but this would solve the problem of ucase/lcase and non-allowed characters. Using this, you could go back to the &h0 to &HFFFF range.Code:ChrW(Int(CDbl(Rnd()) * CDbl(&HD7E0)) + &h20)
EDIT1: Again, Donar, you haven't shown us a problem with Collections. What you have illustrated is that Collection keys are truly treated as strings of Unicode characters (and not just as bits). Therefore, we must be somewhat careful when constructing these strings to be used as keys.




Reply With Quote