W3C home > Mailing lists > Public > w3c-dist-auth@w3.org > January to March 2001

UTF-8 Encoding Question

From: John Glavin <john@riverfrontsoftware.com>
Date: Wed, 28 Feb 2001 15:52:37 -0800
Message-ID: <001001c0a1e1$8761eff0$0c77b2d1@win2k>
To: <w3c-dist-auth@w3.org>
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 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 2 June 2009 18:43:55 GMT