W3C home > Mailing lists > Public > public-webapps@w3.org > July to September 2009

Re: [File API] encoding parameter

From: Jonas Sicking <jonas@sicking.cc>
Date: Tue, 25 Aug 2009 03:29:41 -0700
Message-ID: <63df84f0908250329j4f70892bufc656c2ac8cbe5f6@mail.gmail.com>
To: Anne van Kesteren <annevk@opera.com>
Cc: WebApps WG <public-webapps@w3.org>
On Tue, Aug 25, 2009 at 2:50 AM, Anne van Kesteren<annevk@opera.com> wrote:
> I am wondering how the caller can guess the encoding better than the user agent. Why is that so? (Apologies if this was addressed before, if so I'd appreciate a pointer.)

One situation is the page asking the user. Imagine a HTML editor
implemented in a web page. The user can open HTML files using <input
type=file> which are then read and parsed using the File API. If the
user sees that the file has weird characters in it, the page provides
a drop-down containing a common set of languages. Once the user
selects a language the file is reread, reparsed and redisplayed.

Another use case is a site targetting only users of a particular
locale (by being translated only to that locale). Such a site could
make a good guess that any files provided by the user is encoded in an
encoding common for that locale.

/ Jonass
Received on Tuesday, 25 August 2009 10:30:47 UTC

This archive was generated by hypermail 2.3.1 : Friday, 27 October 2017 07:26:18 UTC