[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Unicode and UTF-8 the Lua way, mid-discussion (was Re: What do you miss most in Lua)
- From: David Given <dg@...>
- Date: Sat, 11 Feb 2012 00:20:42 +0000
On 10/02/12 19:25, William Ahern wrote:
[...]
> Not unlike the way strings are internalized in Lua, each unique grapheme
> cluster is dynamically assigned a codepoint at runtime, so that clusters can
> be easily compared.
Now, that's a disturbingly cunning idea. Easy, too. And there's plenty
of space at the top of Unicode code point range for these synthetic code
points. I might have to steal that for a non-Lua project; thanks.
Of course, in Lua, since strings are all internalised anyway, you might
as well use string pointers instead of synthetic codepoints; that way
you let the string internaliser do the heavy lifting and avoid needing a
specialised API, and you still get to do comparisons by comparing
pointers...
--
┌─── dg@cowlark.com ───── http://www.cowlark.com ─────
│
│ "Never attribute to malice what can be adequately explained by
│ stupidity." --- Nick Diamos (Hanlon's Razor)
Attachment:
signature.asc
Description: OpenPGP digital signature
- References:
- Unicode and UTF-8 the Lua way, mid-discussion (was Re: What do you miss most in Lua), Jay Carlson
- Re: Unicode and UTF-8 the Lua way, mid-discussion (was Re: What do you miss most in Lua), Dirk Laurie
- Re: Unicode and UTF-8 the Lua way, mid-discussion (was Re: What do you miss most in Lua), Rob Hoelz
- Re: Unicode and UTF-8 the Lua way, mid-discussion (was Re: What do you miss most in Lua), Sam Roberts
- Re: Unicode and UTF-8 the Lua way, mid-discussion (was Re: What do you miss most in Lua), Roberto Ierusalimschy
- Re: Unicode and UTF-8 the Lua way, mid-discussion (was Re: What do you miss most in Lua), Bernd Eggink
- Re: Unicode and UTF-8 the Lua way, mid-discussion (was Re: What do you miss most in Lua), William Ahern