UTF-8 library

Manuel M T Chakravarty chak@cse.unsw.edu.au
Sun, 11 Aug 2002 15:30:43 +1000 (EST)


"Marcin 'Qrczak' Kowalczyk" <qrczak@knm.org.pl> wrote,

> Thu, 08 Aug 2002 19:28:18 +1000 (EST), Manuel M T Chakravarty <chak@cse.unsw.edu.au> pisze:
> 
> > ANSI C guarantees that char is 1 byte (more precisely that
> > "sizeof (char)" == 1).
> 
> It says that sizeof (char) == 1 but doesn't say that it means 8 bits.
> sizeof is measured in chars, whatever it is. But limits for values
> of char imply that it has at least 8 bits.
> 
> Perhaps we can assume some widely true facts even if ANSI C doesn't
> guarantee that if it makes life easier. For example that a C type
> corresponding to Int32 exists at all, and that different pointer
> types have the same representation - we already rely on that, don't we?

Yes.  And as Ketil pointed out Worse Is Better.

Manuel