lua-users home
lua-l archive

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

On Thu, Jun 9, 2011 at 1:29 PM, Patrick Rapin <> wrote:
> A good trade-off rule would be: if a string is a valid UTF-8 string,
> assume it is UTF-8; otherwise assume it is encoded in the current
> locale.

Ah, but any plain ASCII is a degenerate (and valid) kind of UTF-8, so
I have the old problem of how to decide:

Quite apart from the 'plain C' part, the question in my mind is how to
decide when to use the current locate in the MultiByteToUnicode
conversion functions.

steve d.