NA>> Почему нельзя в этом вашем фидо нарисовать все эти сердечки и NA>> смайлики из CP866 ниже символа пробела 0x20? NA>> https://en.wikipedia.org/wiki/Code_page_866 AK> Потому что CP866 начинается с 0x80 AK> А группа ASCII 0x00..0x1F зовется Control characters и терминальными AK> программами не отображается, а приводит к действиям терминала, AK> например табуляции или LineFeed.
Выходит, что в фидо всё врут? Если я ставлю кодировку CP437, то я могу смайлики рисовать, и прочие нотки, которые ДО пробела 0x20? Ну кроме символа \001, который начинает kludge в фидо, это все знают из FTS-1.
NA> I'm looking at code page 437. There are smile characters and other NA> "emoji" below the space 0x20 symbol. But as I understand, everything NA> under the space symbol are control characters, e.g \n \r line feed and NA> stuff. How can I get those smile characters using cp437 then?
You're absolutely right that the bytes under 0x20 in code page 437 (CP437) correspond to control characters like line feed (\n), carriage return (\r), etc. These control characters are not directly displayable as symbols or glyphs because they are used for controlling text flow and formatting rather than visual representation.
However, the smiley faces and other graphical characters you're referring to (like ? and ?) actually start after 0x20, specifically from 0x01 to 0x1F. Normally, these positions in modern character encodings are reserved for control characters, but in CP437 they are mapped to visual symbols.
To access these smiley characters, you'd need to: 1. Use the byte values directly from 0x01 to 0x1F when encoding strings using CP437. 2. Interpret or display them in an environment that understands CP437, such as older DOS systems or software designed to emulate the CP437 font and encoding.
Here's an example in Python to print those characters by interpreting them as CP437:
# Python 3 example to print CP437 smiley characters smiley_bytes = bytes([0x01, 0x02]) # ? and ? (CP437 values) print(smiley_bytes.decode('cp437')) # Decode using CP437 encoding ...
Кстати, питоновский код реально смайлики рисует.
--- GoldED+/LNX 1.1.5-b20240306 * Origin: FidoNet member since 1995 (2:5015/46)