Menu

Alt Codes and GnuCobol32M-BDB-x64-rc2 / Windows 10

2023-07-02
2023-07-02
  • Guido Rebry

    Guido Rebry - 2023-07-02

    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.

     
    • Vincent (Bryan) Coen

      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?

      Guido.

       
    • Simon Sobisch

      Simon Sobisch - 2023-07-02

      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.

       
  • Vincent (Bryan) Coen

    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:

    Characters produced may vary depending on the OEM Code Page setting.
    To type a character using its Alt Code value, Num lock should be on. Otherwise unwanted results may occur.
    The numeric keypad does not exist on every laptop. To use them, Numpad should be activated by pressing down the Fn key.
    

    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.

    Make sure you switch on the NumLock,
    press and hold down the Alt key,
    type the Alt Code value of the degree symbol 0176 on the numeric pad,
    release the Alt key and you got a ° degree symbol.
    

    ** 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.

     

Anonymous
Anonymous

Add attachments
Cancel