[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: Lua 5.1 has a serious issue
- From: Mike Pall <mikelu-0601@...>
- Date: Thu, 12 Jan 2006 18:24:36 +0100
Asko Kauppi wrote:
> Make that apply to strings as well?
> As a quick example, would allow UTF-8 strings to be returning the
> real length (in characters); not the number of bytes.
Please do not reopen this discussion again:
UTF-8 gives rise to multiple measures of 'length'. So you need
multiple operators or functions anyway. The most appropriate
choice for #s is the definition which is common to all strings.
And this is the length in bytes. No need to override this.
BTW: The length in characters is mostly meaningless for UTF-8.
You probably want glyphs or screen real-estate.