lua-users home
lua-l archive

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


On Fri, Apr 1, 2011 at 6:37 PM, Marc Balmer <marc@msys.ch> wrote:
> Am 01.04.11 19:29, schrieb Roberto Ierusalimschy:
>> A quick survey, for those who care:
>> - should LPeg support utf-8?
>
> Yes, please.  In fact, all of Lua should... (at least that's what _I_
> would like to see, purely egoistic standpoint, I know...)
>
>> - If so, what would that mean?
>
> On the C level, quite a lot.  strlen() and friends can no longer be
> used, printf format strings like "%20s" don't work anymore etc.  Not to
> speak about string comparison, collation etc.  Since I am not familiar
> with LPeg's implementation, that is about all I can say.

I interpreted the question to be more about semantics than
implementation, e.g. what should lpeg.P(n) mean for integer n? what
should lpeg.R and lpeg.S do? etc.

My first thoughts are that if you want builtin utf8 support, then you
can write a thin wrapper around lpeg in Lua.