[webkit-dev] localStorage quota limit - followup

Darin Adler darin at apple.com
Wed Dec 23 20:25:23 PST 2009


On Dec 23, 2009, at 1:19 PM, William Edney wrote:

> From following the thread earlier, it didn't seem like anyone would have a major objection to using UTF-8 instead of UTF-16 for localStorage on Webkit.

Maciej did have an objection to doing this in a simplistic way (always using UTF-8). He wrote:

>> ECMAScript Strings are essentially sequences of arbitrary 16-bit values. Sometimes Web apps take advantage of this to use a String as a hacky way to represent binary data. I don't think we should reject such strings arbitrarily.
>> 
>> I think it would be fine to use a more compact encoding opportunistically, as long as we can still handle an arbitrary JavaScript String. Perhaps we should use UTF-8 if and only if the conversion succeeds, or perhaps even use Latin1 as the alternative.

If someone can find a way to do use a more compact encoding “opportunistically”, but still allow any arbitrary 16-bit value for any character, I’m open to that. If not, please note that Maciej’s objection is one that I share.

    -- Darin



More information about the webkit-dev mailing list