[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Unicode
- From: Roberto Ierusalimschy <roberto@...>
- Date: Fri, 24 May 2002 17:32:40 -0300
> IMO, the following Lua stringg function should already be
> UTF-8 compatible (if they have been implmented cleanly):
>
> * strfind (s, pattern [, init [, plain]])
> [...]
> * gsub (s, pat, repl [, n])
The problem here is that pattern modifiers (`*', `+', etc.) in Lua work
only over a single char. If someone writes "ã*", she wants the "whole"
ã to repeat (and not only the last byte in the representation of ã), so
pattern matching must be `UTF-8 aware' (and `UTF-8-able'...)
-- Roberto