lua-users home
lua-l archive

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

> 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