3 ms·
Umm... wchar_t was not part of C89. It was added later. I think it was a supplement rolled out half way between C89 & C99, mostly as a consequence of a lot of p
by cbsmith 11y ago
Umm... wchar_t was not part of C89. It was added later. I think it was a supplement rolled out half way between C89 & C99, mostly as a consequence of a lot of platforms embracing native unicode interfaces (I seem to recall it was released just as Unicode 2.0 was coming out and making it so fixed width glyphs were no longer a thing).
...and digraphs & trigraphs had to do with different terminals/text editors that didn't have keys/characters for certain language symbols. Last I checked it wasn't really about internationalization, but rather the rather insane variance of character sets just for english (like EBCDIC).
- kps 11y agoReally? I'll have to check my paper copy at home, but Wikipedia seems to agree, with a quote from the standard: https://en.wikipedia.org/wiki/Wide_character#C.2FC.2B.2B https://en.wikipedia.org/wiki/Wide_character#C.2FC.2B.2B Maybe it was in C90 (ISO) but not C89 (ANSI)? For trigraphs see the Rationale at http://www.lysator.liu.se/c/rat/b.html#2-2-1-1 http://www.lysator.liu.se/c/rat/b.html#2-2-1-1
- cbsmith 11y agoIt's entirely possible I'm misremembering, but I could swear it was in Amendment 1/C95, not in C90. I have this distinct memory about making jokes about how C95 and Windows 95 were both outdated technologies the day they were released. ;-) I thought C90 was essentially just a reformatting of C89. Interestingly, the ANSI C page agrees with me: https://en.wikipedia.org/wiki/ANSI_C#C95 https://en.wikipedia.org/wiki/ANSI_C#C95
- kps 11y agoAh, got it. C89 had wchar_t, defined in <stddef.h>, but <wchar.h> and <wctype.h> didn't show up until '95, so it wasn't very useful. Hence my vestigial memory of it being a prematurely standardized checkbox feature.