lua-users home
lua-l archive

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


On Mon, 20 Jun 2022 at 11:55, Budi <> wrote:
> Thanks much. but haven't clearly explained code point 233 came out of 195 169

I purposely did not because it is trivial, if you know what ut8 is you
pass 195 169 to 0xC3, 0xA9, compose those using wikipedia utf8 page or
any other source, 0xC3 = 0x1100 - 011 = 110, two byte code, 00011,
0xA9 = 0x1010-1001, 10-contnuation, 101001, full code is 00011-101001
=> 000-1110-1001, which is 0xE9, being less than 0x100 must be latin-1
( code points below 100 are the same ), so a quick latin1 google, or
plain old man latin1, gives:
       351   233   E9     é     LATIN SMALL LETTER E WITH ACUTE
But all this is off-topic utf8 stuff, the important lua related stuff
is gives codes STARTING in the range, so the 1-2 and 1-3
luaesque 1-based intervals gave you the same result because the é in
code point 2 straddles bytes 2 and 3.

Francisco Olarte.