[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Lua in Javascript environments [was: iLuaBox Now Available - Run Lua on Your iPad]
- From: Duncan Cross <duncan.cross@...>
- Date: Tue, 26 Oct 2010 21:08:16 +0100
On Tue, Oct 26, 2010 at 8:43 PM, Jonathan Castello <twisolar@gmail.com> wrote:
> I was under the impression that UTF-8, which Javascript strings use,
> puts restrictions on certain bytes. From Wikipedia's page for UTF-8,
> bytes above 127 are either part of a sequence, or are reserved.
Javascript code only "sees" strings as a sequence of Unicode
characters, the internal representation of those characters in memory
(UTF-8 or otherwise) is hidden and inaccessible. U+0000 through to
U+00FF are all valid Unicode characters, so it's certainly possible to
use a Javascript string to store a sequence of arbitrary octets, but
they will be taking up more space in memory than just that number of
bytes.
-Duncan