Arguably, seems like a bug that invalid string values are let thru the door to start with?

Since users can't effectively store invalid UTF16 character sequences in FF or IE, is there really any downside to using UTF8 text encoding in WebKit? @Jeremy, this isn't a matter of letting users choose the text encoding, this is entirely an implementation detail of WebStorage. 

Downsides
* The code change to get UTF8 by default in new databases, tiny.
* Migrating pre-existing databases to the new encoding. Somewhat of a hassle. But maybe doesn't need to be done, pre-existing files could continue to use UTF16, while newly created dbs could use UTF8 (the text encoding is chosen at database creation time and stuck that way forever thereafter).
* Its possible that some app is already depending on the ability to store invalid character sequences (on the iPhone say), and this would be a breaking change for that app.

The preload everything characteristic is a separate issue altogether.



On Wed, Dec 2, 2009 at 11:15 AM, Jeremy Orlow <jorlow@chromium.org> wrote:
IE chokes ("invalid procedure call or argument") and Firefox mangles the data for LocalStorage (but works fine for SessionStorage).

On Wed, Dec 2, 2009 at 10:54 AM, Darin Adler <darin@apple.com> wrote:
On Dec 2, 2009, at 10:48 AM, Jeremy Orlow wrote:

> How can you construct invalid UTF-16 sequences?

http://unicode.org/faq/utf_bom.html#utf16-7

   -- Darin



_______________________________________________
webkit-dev mailing list
webkit-dev@lists.webkit.org
http://lists.webkit.org/mailman/listinfo.cgi/webkit-dev