I recently found https://www.alt-codes.net/arrow_alt_codes.php
So, opening a command prompt I can type
U:\GnuCobol32M-BDB-x64-rc2>►Text between rightwards/leftwards arrows◄
using Alt16 and Alt17
When I try to display this in a cobol program I get Ôû║Text between rightwards/leftwards arrowsÔùä
Can a Cobol program display Altcodes like "→" and "←" ?
Can it be done by changing the code page? If so, which code page number?
Guido.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
What do you get when you use the keyboard directly ?
If there is no result then you are not using the code pages they use -
which is possible.
Code pages used between system can vary a lot both by platform type and
version let alone country and user preference.
On 02/07/2023 11:20, Guido Rebry wrote:
Hi!
I recently found https://www.alt-codes.net/arrow_alt_codes.php
So, opening a command prompt I can type
U:\GnuCobol32M-BDB-x64-rc2>/►Text between rightwards/leftwards arrows◄/
using Alt16 and Alt17
When I try to display this in a cobol program I get /Ôû║Text between
rightwards/leftwards arrowsÔùä/
Can a Cobol program display Altcodes like "→" and "←" ?
Can it be done by changing the code page? If so, which code page number?
DISPLAY with extended screen io or with plain one (where you see what was output before if the program is started under cmd.exe)?
That makes a huge difference. In the first case it works as long as you save the COBOL source in the same encoding as your codepage (or vice versa).
In the second case codepages don't apply at all and yours need to use the matching character.
IBM developed a method to place the characters that can not be typed by a keyboard on the screen: while keeping the Alt key down, typing the code defined for the character via the numeric keypad. The system which interprets this action and places the corresponding character at the cursor's location is BIOS.
These codes became so popular so that Microsoft, even though developed a new set of codes, decided to keep them. The new set was named ANSI(later changed to Windows codes), and the old ones called as OEM(original equipment manufacturer) code pages. Three-digit codes represent the OEM codes. Codes with a preceding 0 represent the new ANSI codes.
For the last two decades, Unicode is being adopted by many systems. After adopting Windows to Unicode, the entry of all Unicode characters by the same method was desired, and achieved by some applications, but couldn't be spread to all system. Compatibility issues with old ANSI codes prevent the entry of all Unicode characters.
Some Tips:
Hi!
I recently found https://www.alt-codes.net/arrow_alt_codes.php
So, opening a command prompt I can type
U:\GnuCobol32M-BDB-x64-rc2>►Text between rightwards/leftwards arrows◄
using Alt16 and Alt17
When I try to display this in a cobol program I get Ôû║Text between rightwards/leftwards arrowsÔùä
Can a Cobol program display Altcodes like "→" and "←" ?
Can it be done by changing the code page? If so, which code page number?
Guido.
What do you get when you use the keyboard directly ?
If there is no result then you are not using the code pages they use -
which is possible.
Code pages used between system can vary a lot both by platform type and
version let alone country and user preference.
On 02/07/2023 11:20, Guido Rebry wrote:
DISPLAY with extended screen io or with plain one (where you see what was output before if the program is started under cmd.exe)?
That makes a huge difference. In the first case it works as long as you save the COBOL source in the same encoding as your codepage (or vice versa).
In the second case codepages don't apply at all and yours need to use the matching character.
Follow on see your given site near bottom for :
About Alt Codes
IBM developed a method to place the characters that can not be typed by a keyboard on the screen: while keeping the Alt key down, typing the code defined for the character via the numeric keypad. The system which interprets this action and places the corresponding character at the cursor's location is BIOS.
These codes became so popular so that Microsoft, even though developed a new set of codes, decided to keep them. The new set was named ANSI(later changed to Windows codes), and the old ones called as OEM(original equipment manufacturer) code pages. Three-digit codes represent the OEM codes. Codes with a preceding 0 represent the new ANSI codes.
For the last two decades, Unicode is being adopted by many systems. After adopting Windows to Unicode, the entry of all Unicode characters by the same method was desired, and achieved by some applications, but couldn't be spread to all system. Compatibility issues with old ANSI codes prevent the entry of all Unicode characters.
Some Tips:
How to type an Alt Symbol on keyboard?
For example, let's type a degree symbol by using its Alt Code value on the keyboard.
** Above mentioned procedure is not aplicable for MacOS.
For more information on how to use symbols, emojis please check our How to use Alt-Codes? page.