satish wrote:

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" );



I might not understand too much of your problem, but I suspect this piece of code does not do what you expect it to: First you convert your string into a byte array encoded as "ISO-8859-1". Then you make a new string out of it, claiming the bytes in your array encode your characters as "gb2312" which is wrong. They encode it as "ISO-8859-1". So your bytes might get misinterpreted.


Remember: Strings do not need and do not have any encoding. An encoding is only needed when you encode your characters in bytes.

Oliver



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



Reply via email to