lua-users home
lua-l archive

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


2018-07-10 22:31 GMT+02:00 Gregg Reynolds <dev@mobileink.com>:
>
>
>
> On Tue, Jul 10, 2018, 9:00 AM Dirk Laurie <dirk.laurie@gmail.com> wrote:
>>
>> 2018-07-10 15:30 GMT+02:00 Lorenzo Donati <lorenzodonatibz@tiscali.it>:
>>
>> > Unicode is great for typesetting (I use regularly LaTeX and it's fun to find
>> > almost every symbol you may imagine, even ancient German runic scripts!),
>> > but it sucks (IMHO) for general programming or computer-related stuff. Too
>> > much mind overhead to use correctly for little gain.
>>
>> Yes, yes, but — if you will allow me to return to Lua and UTF-8 — there would
>> be more gain for a programmer if we had (if it is not too late already
>> for Lua 5.4)
>> utf8 versions of find, sub, match, gsub, gmatch, reverse. Just those, not asking
>> for upper/lower, operating only on simple codepoints, no combining characters,
>> no need for a C library.
>
>
> Utf8 != Unicode. It's an encoding; you don't get to pick a subset and still claim Unicode support.
>
> "Simple codepoints"? Does Unicode define that? If not, who decides what that means? Zero-width space is pretty simple.
>
> No combining chars? Ok, but that would not be Unicode. Practical result: massive confusion and complaining. You cannot accept Unicode and reject combining chars.

I. Am. Not. Asking. For. Unicode.

I am merely asking for extra functions along the lines of what the
utf8 library already does.
E.g. Sam's examples:

> s1 = "Hélène"
> s2 = "Hélène"
> > utf8.len(s1)
6
> utf8.len(s2)
7

If you really not understand what I mean, I can elaborate.