I discovered something very bizarre in Windows XP webfolders.  As I
mentioned before, for the case of uploading a file, (PutMethod()) I
could not figure out what character encoding windows was using for the
filename.  However for the case of making a new folder (which is
MkcolMethod() followed by MoveMethod()) I figured out what it was
doing.  And it is very strange indeed!  In
AbstractMultistatusResponseMethod.parseRequest() the desturi is obtained
by:

destinationUri = req.getHeader("Destination");

I added debug code to display the destinationUri as follows:

byte[] bytestr = destinationUri.getBytes( "ISO-8859-1" );
String debugstr = new String( bytestr, 0, bytestr.length, "gb2312" );

Then I looked at my logfile in a browser.

"debugstr" _ONLY_ showed up correctly when the browser encoding was set
to UTF-8.

Could anybody explain to me what the heck all this means?  I extracted
the bytes as "ISO-8859-1", then I created a new string using "gb2312",
but it only displays correctly as UTF-8!!  I really don't understand
this.

Satish

On Tue, 2003-07-22 at 20:21, Michael Plomer wrote:
> Hello Peder,
> Hello all,
> 
> I have the same problem. From what I've learned, the problem is
> that the server uses a platform-specific encoding while IE uses
> UTF-8 or something... a solution has been proposed on this list
> a while ago that involved setting the parameter
> 
> org.apache.slide.urlEncoding=UTF-8
> 
> in the slide.properties of the servlet. However, I found that it
> didn't work for me or at least doesn't work with slide 1.0.16.
> It would appear that the parameter in question is never used in
> the source code. So maybe modification of the server side boils
> down to making it use UTF-8 by default?
> 
> I'm using the Slide WebDAV Client lib which also uses UTF-8 by
> default for url encoding. I modified the client lib to use the
> same encoding that my server uses (Cp1252) which seems to have
> solved the problem for all methods derived from HttpMethodBase
> (like mkcol) but doesn't work for methods derived from
> XMLResponseBase (like move). Which makes sense somehow, only
> my knowledge of webdav doesn't stretch far enough to say exactly
> why... :)
> 
> That's for my 2 ct on this, maybe someone with more insight cold
> shed some light on what I'm doing wrong?
> 
> Thanks in advance!
> 
> Regards,
> Michael
> 
> -------/ Michael Plomer    /--/ stud. Hilfskraft CONCERT  /----
> ------/ Fraunhofer IPSI   /--/ Kooperationskomponenten   /-----
> -----/ Darmstadt/Germany /--/ eMail: [EMAIL PROTECTED] /------
> 
> >>-----Urspr�ngliche Nachricht-----
> >>Von: Peder Nordvaller 
> >>[mailto:[EMAIL PROTECTED] 
> >>Gesendet: Dienstag, 22. Juli 2003 13:34
> >>An: Slide Users Mailing List
> >>Betreff: ���
> >>
> >>
> >>Hello, have anyone had any success in making the WebDAV 
> >>servlet using slide
> >>compatible with chars such as the swedish ���? Using internet 
> >>explorer to
> >>open the servlet as a web folder, I can create folders and 
> >>such with those
> >>chars, but when I try to change directory to that directory, 
> >>the url is
> >>translated from "���" to "%E5%E4%F6". How can I avoid/fix 
> >>this? Do I have to
> >>rewrite the slide webdav servlet to actually name them with 
> >>%E5 etc but
> >>display the real chars when listing contents of a dir or is 
> >>there an easier
> >>solution?
> >>
> >>Sincerely, Peder
> >>
> >>
> >>
> >>---------------------------------------------------------------------
> >>To unsubscribe, e-mail: [EMAIL PROTECTED]
> >>For additional commands, e-mail: [EMAIL PROTECTED]
> >>
> >>
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 


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

Reply via email to