Would you like signs with those chars?
Would you like signs with those chars?
Posted Oct 25, 2022 10:36 UTC (Tue) by geert (subscriber, #98403)In reply to: Would you like signs with those chars? by eru
Parent article: Would you like signs with those chars?
Don't forget all of this was introduced in the days of 7-bit ASCII[*], so a signed char was fine. In fact it also allows you to store a negative error code, without wasting precious memory on expanding beyond a single byte.
8-bit ASCII (e.g. ISO-8859-*) was only standardized in the eighties, which is about the same time as PowerPC and ARM saw the day of light, so making char default to unsigned may made sense for them (modulo the compatibility issues).
8-bit ASCII (e.g. ISO-8859-*) was only standardized in the eighties, which is about the same time as PowerPC and ARM saw the day of light, so making char default to unsigned may made sense for them (modulo the compatibility issues).
[*] EBCDIC is 8-bit, and seems to have an intentional division in characters with and without bit 7 (the "sign" bit) set.
https://en.wikipedia.org/wiki/EBCDIC#Code_page_layout
