lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


On 19 Dec 2010, at 22:19, Greg Falcon <veloso@verylowsodium.com> wrote:
> 
> A subtle point here:  This snippet from the manual is talking about
> the *character* at s[1], and Lua doesn't have a character type.

It says character but it means octet.

> There's something awfully
> impure about pretending that a string is a read-only mapping from
> integers to strings.

A string is an array of octets. The mapping from sequences of octets to Unicode codepoints varies, and the relationship between codepoints and glyphs is complicated. I think the concept of "character" is misleadingly simple and should be discarded.

Tony.
--
f.anthony.n.finch  <dot@dotat.at>  http://dotat.at/