UTF-8 library

Patryk Zadarnowski pat@jantar.org
Thu, 08 Aug 2002 19:56:33 +1000 (EST)


On Thu, 8 Aug 2002, Ashley Yakeley wrote:

> At 2002-08-08 02:28, Manuel M T Chakravarty wrote:
> 
> >ANSI C guarantees that char is 1 byte (more precisely that
> >"sizeof (char)" == 1).
> 
> That's also what the C++ ARM says (which I have to hand). Unfortunately, 
> 
>     "a byte is undefined by the language except in terms of 
>     sizeof; sizeof(char) is 1." [sec. 5.3.2]
> 
> Maybe ANSI C is different?

1990 ANSI/ISO C requires chars to be at least 8 bits wide in section
5.2.4.2.1. This extends to ANSI/ISO C++, which cites ISO C for its
definition of <limits.h>. Haven't got C'99 handy, but it'll be a
similar story - char is *at least* 8 bits wide.

Hope that satisfies the pedants.

	Pat.