[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: UTF-8 patterns in Lua 5.3
- From: Keith Matthews <keith.l.matthews@...>
- Date: Sat, 19 Apr 2014 22:00:06 -0400
On Sat, Apr 19, 2014 at 1:00 PM, Jay Carlson <nop@nop.com> wrote:
> As an aside, I like the demarcation point of "Lua does UTF-8, but it does
> not know Unicode." It is always good to be clear what you are *not* trying
> to do.
I'm no Unicode expert, but this doesn't make sense to me. UTF-8 is
merely a Unicode encoding, so of course Lua 5.3 work 2 "knows"
Unicode. With the utf8 library, Lua can count, index and iterate over
Unicode code points in UTF-8-encoded strings, and convert sequences of
Unicode code points to UTF-8.
Of course, it provides no Unicode algorithms since they typically need
lookup tables larger than Lua itself, but these algorithms are now
much easier to implement thanks to the utf8 library.
Keith