Sujet : Re: multi bytes character - how to make it defined behavior?
De : ldo (at) *nospam* nz.invalid (Lawrence D'Oliveiro)
Groupes : comp.lang.cDate : 15. Aug 2024, 03:43:03
Autres entêtes
Organisation : A noiseless patient Spider
Message-ID : <v9jpvn$q8q3$3@dont-email.me>
References : 1 2 3 4 5 6 7 8
User-Agent : Pan/0.159 (Vovchansk; )
On Wed, 14 Aug 2024 13:10:01 -0300, Thiago Adams wrote:
The result of GCC is 50071 static_assert('×' == 50071);
The explanation is that GCC is doing:
256*195 + 151 = 50071
(Remember the utf8 bytes were 195 151)
That would be an endian-dependent interpretation.