On Mon, Feb 7, 2011 at 2:38 AM, Jonas Sicking <jonas@sicking.cc> wrote:
> One problem with putting a limit is that it basically forces
> implementations to use a specific encoding, or pay a hefty price. For
> example if we choose a 64K limit, is that of UTF8 data or of UTF16
> data? If it is of UTF8 data, and the implementation uses something
> else to store the date, you risk having to convert the data just to
> measure the size. Possibly this would be different if we measured size
> using UTF16 as javascript more or less enforces that the source string
> is UTF16 which means that you can measure utf16 size on the cheap,
> even if the stored data uses a different format.
>
Is that a safe assumption to design around? The API might later be bound to
other languages fortunate enough not to be stuck in UTF-16.
--
Glenn Maynard