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

Michael B. Allen miallen at eskimo.com
Sun Jan 19 19:42:11 EST 2003

On Sat, 18 Jan 2003 03:45:54 -0800
Conrad Minshall <conrad at apple.com> wrote:

> At 12:53 AM -0600 1/17/03, Christopher R. Hertel wrote:
> >On Fri, Jan 17, 2003 at 12:22:08AM -0500, Allen, Michael B (RSCH) wrote:
> >:
> >>  > This is the Unicode issue.  URLs must handle full Unicode in order to deal
> >>  > with this stuff.  It is a problem, but it's not specific to the SMB URL.
> >>  >
> >>  Yes, it does seem to be coming down to Unicode. But it is specific 
> >>to the SMB URL.
> >>  RFC 2396 does not appear to address Unicode. You cannot have 
> >>Unicode HTTP URLs
> >>  for example. Thus the problem.
> >
> >HTTP URLs are just one example.  Still, "You cannot have Unicode HTTP
> >URLs"...  That's why it's *not* specific to the SMB URL.  People may post
> >all sorts of files on a web server.  If the filename is in cyrillic
> >then...well, same problem even if it's accessed via HTTP.  It's a general
> >URL issue.  URLs *should* support Unicode... but they don't.
> Question: aren't some Microsoft sites already using unicode in their 
> urls?  I'll bet NB system names, sharepoints, and paths are all 

I would think many servers would have to support Unicode in some
way. UTF-8 URLs would provide good support for european scripts.

> happening in UCS2 and non-roman code pages.  In Japan for instance. 
> The jcifs perspective is of interest to me for my client "design" ;)

If you're writing a client then there's one thing I learned from jCIFS
that I think everyone writing a client should consider. That is the idea
of putting a prepared response object in a table key'd by mid/pid, and
sending the request. Then when you get an incoming smb you lookup the
response object by mid, populate it and had it back to the caller. The
purpose is that this permits asyncronous IO on each socket of course. The
jCIFS code actually makes this look harder than it is mainly because
if the fact that we have to have a thread for each transport. In
C/Objective-C it would be really elegant and simple.

A  program should be written to model the concepts of the task it
performs rather than the physical world or a process because this
maximizes  the  potential  for it to be applied to tasks that are
conceptually  similar and, more important, to tasks that have not
yet been conceived. 

More information about the jcifs mailing list