[jcifs] Creating file with hash ('#') in filename

Allen, Michael B (RSCH) Michael_B_Allen at ml.com
Mon Jan 20 10:19:54 EST 2003


> -----Original Message-----
> From:	Christopher R. Hertel [SMTP:crh at ubiqx.mn.org]
> 
> > Let's review what we agree on. The characters that are required to be
> > escaped in the SMB URL for RFC2396 conformance are:
> > 
> >           ' |#%^`{}'
> > 
> > and non-ASCII characters. However because SMB path names support
> > Unicode, how these characters would be escaped is not clear. If each
> > character was converted to a UTF-8 multibyte sequence and each byte in
> > turn were escaped the frequency and appearence of these URLs would make
> > the process unreasonable and for many scripts (e.g. Cryllic) they would
> > be pathologically unusable.
> > 
> >         That's the problem. Right?
> 
> Yes.  Good summary, but I will add one more problem to the pile.
> (...which I think you were the one to point out.)
> 
> In order to escape the non-ASCII characters, there must be an agreed-upon
> encoding.  Consider this:  %12%AB
> Is that 0x12AB or 0xAB12?  In UCS2LE encoding, it would be the latter.
> How would the same value be represented in UTF-8?
> 
	No Chris. The actual encoding of an input string is totally irrelivant to URL
	escapes. URL escapes can only be ASCII. Internally you just have a sequence
	of UCS codes. I know exactly what you're trying to say but you're just off track
	on this. You should not be concerned with Unicode encodings, codepages,
	terminals, or anything like that.




More information about the jcifs mailing list