HP OpenVMS Systems

ask the wizard
Content starts here

Multinational character set?

» close window

The Question is:

 
Hello, i am developing a system, that should negotiate with an openvms
system, based on a windows98\95 terminal emulation.
 
i need the dec multilengual caracter set & esc codes definitions to provide
a proper interaction, so far i searched many web sites and other forms of
documentation with no resault.
i'm using a hebrew based s\w (optionaly)
 
please help me if you can, i will be most greatfull.
 
thanks in advance,
                Lior Pollack
 
 
 


The Answer is :

 
  It appears you are writing a terminal emulator -- there are already a
  number of these tools available for platforms such as Windows.  The
  PATHWORKS and Advanced Server packages include terminal emulators, as
  an example.
 
  Information on character sets including the multinational character set
  are included in the DECwindows DECterm documentation, in the user manuals
  for the various VT-series terminals, as well as at third-party websites
  that the OpenVMS Wizard is aware of.
 
  Tools that use OpenVMS to generate character set tables are available
  from various sources, including an example similar to the following
  from the _Writing Real Programs in DCL_ (second edition) book, available
  from the Butterworth Heinemann Digital Press imprint at http://www.bh.com/
 
	==
 
$! Title:        CHAR_SETS.COM
$!               Display various character sets on the local terminal
$!
$! Synopsis      CHAR_SETS displays various character sets on the
$!               local terminal.  Can display only the printable
$!               characters supported by the local terminal.
$!
$!
$! Usage:        Requires specification of a parameter that
$!               identifies the character set to display, and
$!               the radix of the display.
$!
$!                 $ @CHAR_SETS <CharSet> <Radix>
$!
$!                 CharSet must be:
$!                   ASCII    ASCII character set
$!                   LATIN1   ISO Latin-1
$!                   MCS      Multinational Character Set
$!                   TCS      Technical Character Set
$!                   VT       VT100 series terminals
$!                   ""       Blank; defaults to ASCII
$!
$!                 Radix must be:
$!                   Decimal
$!                   Hexidecimal
$!                   Octal
$!
$!               Parameters can be truncated.
$!
$! Author:       Atlant G. Schmidt
$! Updated:      Stephen Hoffman
$! Last Edited:  14-Jun-1998
$!
 
$start:
$    so[0,8]  = 14
$    si[0,8]  = 15
$    esc[0,8] = 27
$    say :== write sys$output
 
$!   since we alter the displayed character set, we must
$!   set up a few things need to reset the display first,
$!   and then make an effort to return the character set
$!   to the expected settings.
 
$    on control_y then goto reset_and_exit
$    on warning then goto reset_and_exit
 
$check_charset:
 
$!   Process the character set option parameter: P1
$!   The default character set to display is ASCII.
 
$    charset = f$extract(0,1,f$edit(p1,"COLLAPSE,UPCASE"))
 
$!   The following section could be enhanced to use "libcall
$!   ask xda_clean_option" to clean up the parameters...
 
$    if charset .eqs. "" then charset = "A"
$    charsetcode = ""
$    if charset .eqs. "A" then charsetcode = "B"    ! ASCII
$    if charset .eqs. "L" then charsetcode = "<"    ! ISO Latin-1 (Eight-bit)
$    if charset .eqs. "M" then charsetcode = "<"    ! MCS (Eight-bit)
$    if charset .eqs. "T" then charsetcode = ">"    ! TCS
$    if charset .eqs. "V" then = "0"        ! VT100 series terminals
$    if charsetcode .nes. "" then goto charset_okay
$    say "P1 must be 'ASCII', 'LATIN1', 'MCS, 'TCS', 'VT', or blank"
$    exit
 
$charset_okay:
 
$check_radix:
 
$!   Process the radix option parameter: P2
$!   The default radix for the display is HEXIDECIMAL
 
$    radix = f$extract(0,1,f$edit(p2,"COLLAPSE,UPCASE"))
$    if radix .eqs. "" then radix = "H"
$    format = ""
$    if radix .eqs. "O" then format = "!AS[!UB;!UBH!OB  !AS!AS!AS"
$    if radix .eqs. "D" then format = "!AS[!UB;!UBH!UB  !AS!AS!AS"
$    if radix .eqs. "H" then format = "!AS[!UB;!UBH!XB  !AS!AS!AS"
$    if format .NES. "" then goto radix_okay
$    say "P2 must be 'Octal', 'Decimal, 'Hex', or blank"
$    exit
 
 
$radix_okay:
 
$    screen_column = 3
$    column = %x00
 
$!   Comment-out the following column assignment line to enable the
$!   display of control characters.  When enabled, the control characters
$!   are processed through the f$fao lexical before it is displayed on
$!   the terminal.
 
$    column = column + %x20
 
$!   Select the character set to use, based on the character set
$!   the user has requested.
 
$    say esc + ")" + charsetcode
 
$!   charset options L and M both select ISO Latin-1.
$!   Use it as the default label for the display.
 
$    table_label = "ISO Latin-1 and DEC MCS chart:"
$    if charset .eqs. "A" then table_label = "Ascii chart:"
$    if charset .eqs. "T" then table_label = "DEC TCS chart:"
$    if charset .eqs. "V" then table_label = "DEC VT100 chart:"
$    say esc + "[H" + ESC + "[J" + table_label
 
 
$column_loop:
$    row = 0
 
$row_loop:
$    char[0,8] = column + row
$    say f$fao( format, esc, row+3, -
       screen_column, column+row, so, char, si )
$    row = row + 1
$    if row .lt. %x10 then goto row_loop
$    column = column + %x10
$    screen_column = screen_column + 10
$    if column .lt. %x80 then goto column_loop
 
$reset_and_exit:
$    say esc + "[18;0H"
$    exit

answer written or last revised on ( 1-FEB-1999 )

» close window