Michael Smith wrote:
Oliver Zeigermann wrote:

Jacob Lund wrote:

No file is created by the filestore!

German letters and danish letters works fine for me too - and they are also supported by the codepage.

To avoid these problems, why not save the files in escaped UTF-8 codes - that way wee always know that is will work?!?



Hmmm. Escaped? Like URL encoded? This might blow up the length quite a bit. As I know of file systems having at most 255 characters per path (like the ones both of us use) this may be undesirable for the default application. What about adding a switch for this and make it configurable?



It's a slightly more complex problem than this, and needs a solution in at least two places:
1) Filenames that aren't allowed
a) 'High' unicode characters, etc. These should be escaped somehow.
b) Disallowed characters in the low part - for example, windows
doesn't permit several characters such as colons and slashes.
This is _and must remain_ platform specific - which is painful.
These should get escaped too.

URLEncoder does this for us. As far as I remember it uses 7 bit ASCII without any special characters. The rest is encoded in %xx. So, when it is UTF-8 what you put into it, I do not think we have a problem with this any more. The call might look like


path = URLEncoder.encode(path, "UTF-8");


  2) What to do if we fail anyway. We might not escape everything
     (i.e. we might just make a decision to disallow certain characters
     in filenames), or the escaped filename might exceed the maximum
     length allowed by the filesystem. In this case, we need to
     propogate some appropriate error up to the application (webdav)
     level, so we don't just give a 400.

That's right! Same thing with the relational database store. The problem is we only have ServiceAccessException, but we could nest others into it. How could this exception be handled in the WebDAV layer to generate a proper error message and code? I simply do no know...


Oliver


--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to