Re: [dav-dev] Problem with OfficeXP and Accented characters

On Wed, Feb 13, 2002 at 09:31:37PM +0100, Julian Reschke wrote:
>...
> > From: dav-dev-admin@lyra.org [mailto:dav-dev-admin@lyra.org]On Behalf Of
> > Peter Gillis
> > Sent: Wednesday, February 13, 2002 8:46 PM
>...
> > I am having a problem with Microsoft Web Folders after the client installs
> > Office XP on their machine and file names with accented characters are
> > involved.  Our server has been working in the past with earlier
> > implementations of Web Folders without a problem, however, when the client
> > machine is upgraded to Office XP, a document that was accessible
> > previously
> > is now not found.  I have tracked the problem down to the fact that Web
> > Folders is encoding the URI value a second time before sending
> > the request,
> > which then causes it not to be found on our server.  For example:
> >
> > In the folder listing we send back the following property:
> >
> > <href>/dav/webdav/%E8%E2temp%C9.xls</href>
> 
> Isn't this wrong in the first place? My understanding is that you should
> send URL-encoded UTF-8.

Nope.

The filename is in an "original character set". That is then encoded into
octets for the URL. That transformation is not specified anywhere. Ideally,
it is "original -> UTF-8", but nobody says it must be. In fact, I would say
it should match whatever encoding was used for the Request-URI (but that is
not specified/defined in the request, so you're out of luck again).

Once you have octets, then you perform the URL-escaping (using '%xx').

After that, you need to transform the URL into the character set of the
response body. That is usually UTF-8, but it is possible to have the XML in
a different character set (provided it is specified on the Content-Type
response header).

Finally, you must XML-escape the UTF-8 characters of the URL you're
inserting (e.g. translate '&' to '&amp;') so that you can embed the UTF-8
content into the XML response.


A long time ago, I captured this as a start of a technical FAQ. See:
    http://www.webdav.org/other/techfaq.html

Specifically, the second section.

Cheers,
-g

-- 
Greg Stein, http://www.lyra.org/

Received on Tuesday, 19 February 2002 21:51:22 UTC