UTF-8 Encoding Question

I have a Windows webdav client (WebDrive) and I am trying to add support for special characters in file names like "Umlaut ü".  Most DAV servers will return filenames in a PROPFIND request that are encoded in either UTF-8 or ISO-8859 (Latin).  This generally works fine, I can tell what character set is used and use the proper encoding scheme.

For example  IIS will return the file name Magnüs.txt  (note the 'ü' umlat) as 
href:  Magn%C3%BCs.txt      This is UTF-8 Encoding.

Another server may use ISO-8859 which will list it as
href: Magn%FCs.txt    Where %FC is hex for 252 the Umlat character.  This is also fine.

But I run into a problem with the mydocsonline.com DAV server which says it is using UTF-8 Encoding but returns the href as
href: Magn%FCs.txt      This is not UTF-8 encoded, because characters > 0x80 in UTF-8 will be encoded in a multibyte sequence.  This is normal ISO-8859 (Latin) Encoding.

In this case I am not sure what to do.  I use the Windows API call MultiByteToWideChar function but I need to tell it to use either UTF-8 or ANSI code pages.  For the mydocsonline server I need to use ANSI however they are telling me to use UTF-8 and using UTF-8 wont work. 

When I use Webfolders it works properly on the mydocsonline server and somehow knows to not use UTF-8 decoding.  Does anyone have any idea why it works or how I could really detect which code page to use ?

Thanks,
John Glavin
RiverFront Software
john@webdrive.com
http://www.webdrive.com

Received on Wednesday, 28 February 2001 18:43:33 UTC