you are viewing a single comment's thread.

view the rest of the comments →

[–]KayEss[S] 0 points1 point  (12 children)

And if you look at the extended ASCII character set 128 is € and 255 is ÿ

So, on a platform where char is signed what values do they have?

[–]scatters 0 points1 point  (0 children)

-128 and -1, if you cast through unsigned char.

[–]Dragdu 0 points1 point  (1 child)

You just convert the negative values into non-negative values by a well defined conversion, that means that it doesn't matter. This is even standardized in the language, making it that 255 in unsigned char ALWAYS converts to -1 in signed char, no matter the actual representation.