[openbeos] Re: [sort of OT, flame-ish] Re: Re: AW: Re: AW: Locale Kit

Well, actually, non ascii charachters have a variable length (from 2 to 4, IIRC). 'à', for example, is 2 bytes long.

If the Unicode value U is:


U < 128 : 1 byte
128 <= U < 2^12 : 2 bytes (e.g. accentuated letters)
2^12 <= U < 2^18 : 3 bytes (e.g. japanese characters)
2^18 <= U <= MAX_UNICODE : 4 bytes

Pascal


Other related posts: