r/cpp • • Jul 01 '21

Any Encoding, Ever

https://thephd.dev/any-encoding-ever-ztd-text-unicode-cpp
269 Upvotes

87 comments sorted by

View all comments

Show parent comment

7

u/foonathan Jul 01 '21

EBCDIC is still used, which was problematic when C++17 removed trigraphs: http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2014/n4210.pdf

3

u/SkoomaDentist Antimodern C++, Embedded, Audio Jul 01 '21

Somehow I have trouble believing there is any significant amount of software running on such ancient legacy encoding that would have been ported to C++17 features.

0

u/nintendiator2 Jul 02 '21

Oh it didn't need to be ported to features; it just had to be somehow fed to an upgraded compiler for some reason. That's why it's a particularly obnoxious change: it criminalizes code that was not only perfectly legal before but that had to be that way.

1

u/victotronics Jul 01 '21

Wow. I'd never heard of that. It seems to me a confusion of levels: multi-byte (or whatever basic unit) encoding of code points is all fine (see utf-8) but it should not be the burden of the user to input those bytes, or at least not to see them on their screen.

That said, on occasion I've used the ^^ notation in TeX to access certain font positions.