lua-users home
lua-l archive

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


On 6/28/17, Duane Leslie <parakleta@darkreality.org> wrote:
> Hi,
>
> I had a problem with the quoted string format producing strings that
> were not legal UTF-8 [...]

What do you mean? I don't see any problem:

`string.format("%q", "Здравствуйте")` returns '"Здравствуйте"'. That's
valid UTF-8.

>
> [...] because it was not escaping non-ascii characters,

(Why should non-ASCII chars be escaped? If you personally need this
escaping, it doesn't mean there's a "problem" with Lua's %q.)