简体   繁体   中英

C++ Extended ASCII Code

I have a litte issue with Extended ASCII code. So I would like to print for example a symbol of the vaule 178 (some kind of wall), but I get totally different symbol. So how to be able to use this? http://www.theasciicode.com.ar/

Thanks!

Your problem (and that of the linked site) is assuming there is one "extended ASCI" code. ASCII defines 128 characters, and a lot of people jumped to the conclusion that you can add another 128 characters. In fact, there are about 15 official international standards alone (ISO-8859-1 to -15), many national standards, and companies such as Microsoft threw in a bunch of their own. The linked page in fact shows an IBM extension.

The solution is Unicode. Unicode from time to time adds new characters, so there can be some new characters that are unrecognized by old applications, but once added the characters do not change. Unicode is not resticted to one byte, or 2: it foresees that up to 20 bits will be needed, and currently 17 bits are already in use. (now ~100.000 different characters, can grow to to ~1.000.000).

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM