W3C home > Mailing lists > Public > public-webapps@w3.org > October to December 2009

Re: [FileAPI] File.name

From: Maciej Stachowiak <mjs@apple.com>
Date: Tue, 10 Nov 2009 17:39:46 -0800
Cc: WebApps WG <public-webapps@w3.org>
Message-id: <D49B7246-E690-4B21-AB77-A4F8B8126F92@apple.com>
To: Anne van Kesteren <annevk@opera.com>

On Nov 10, 2009, at 5:29 PM, Anne van Kesteren wrote:

> "The name of the file as a UTF8-encoded string." A DOMString is not  
> UTF-8-encoded. I think this should just say "Returns the filename".  
> It is not more complicated than that as far as I can tell.

There are some filesystems on (mostly legacy) Unix-like systems where  
filenames are stored in some other encoding than UTF-8, and in some  
cases the encoding is not even known. For example, in Japan there  
exist NFS fileservers where the filenames are encoded in Shift-JIS. In  
cases like that it's a little more complicated than "Return the  
filename" but it's probably ok to just leave it to the UA or the  
operating system to figure out how to deal. Interpreting it as UTF-8  
is likely to be a poor choice in such cases.

  - Maciej
Received on Wednesday, 11 November 2009 01:40:20 GMT

This archive was generated by hypermail 2.3.1 : Tuesday, 26 March 2013 18:49:35 GMT