while true, this is not the reason for the function signature. this is for type promotion reasons. Rune is still an unsigned short. plan 9 does not support ucs-4.
- erik On Fri May 19 17:51:07 CDT 2006, [EMAIL PROTECTED] wrote: > Matt Stewart wrote: > > The following functions are described as accepting a Rune, but instead > > the parameters are of type long. Why? > > > > int runelen(long); > > char *utfrune(char *, long); > > char *utfrrune(char *, long); > > > From History in this wikipedia page (http://en.wikipedia.org/wiki/UTF-32): > > UCS-4 is sufficient to represent all of the Unicode code space, which > has 1114112 (= 2^20+2^16) code points and therefore requires only up to > hexadecimal 10FFFF. Some people consider it wasteful to reserve such a > large code space for mapping a relatively small set of code points, so a > new encoding form, UTF-32, was proposed.