bug-ncurses
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: Problem with tic


From: rsbecker
Subject: RE: Problem with tic
Date: Sat, 25 Feb 2023 14:11:19 -0500

On Saturday, February 25, 2023 1:49 PM, Thomas Dickey wrote:
>On Thu, Feb 23, 2023 at 03:48:38PM -0500, rsbecker@nexbridge.com wrote:
>> On Thursday, February 23, 2023 3:40 PM, Thomas Dickey wrote:
>> >On Thu, Feb 23, 2023 at 06:55:48PM +0000, Caron, François wrote:
>> >> [cid:logo_MCN_Courriel_622c23f2-1a24-4cf2-a00a-95479a689f68.png]
>> >> Hi,
>> >>
>> >> I'm wondering why I have these warnings and problem on line 1.
>> >>
>> >> Operating System: z/OS  02.04.00
>> >> Java version: 1.8.0_341
>> >>
>> >> Best regards
>> >>
>> >> $ tic terminfo-20180127.src
>> >> tic: Warning: near line 1: terminal '', Illegal character - '-'
>> >> tic: Warning: near line 1: terminal '', Illegal character - 'Á'
>> >> tic: Line 1: terminal '', File does not start with terminal names
>> >> in column one
>> >
>> >z/OS uses EBCDIC, with some provision for reading ASCII files.
>> >
>> >https://medium.com/theropod/z-os-unix-character-encoding-best-practic
>> >es-
>> >2660cc76b2e9
>> >
>> >For processing the terminfo source (all ASCII, including tab and
>> line-feed), I can see
>> >that would be a problem if you "simply" translated it to EBCDIC,
>> >because a
>> lot of the
>> >content is literally the codes (in ASCII) which would be sent to a
>> terminal.
>> >
>> >For example, in this fragment,
>> >
>> >aixterm|IBM Aixterm Terminal Emulator,
>> >    am, bw, eslok, hs, msgr, xon,
>> >    colors#8, cols#80, it#8, lines#25, pairs#64,
>> >    acsc=jjkkllmmnnqqttuuvvwwxx, bel=^G, bold=\E[1m,
>> >    clear=\E[H\E[J, cr=\r, cub=\E[%p1%dD, cub1=^H,
>> >
>> >the
>> >    jjkkllmmnnqqttuuvvwwxx
>> >
>> >is a sequence of codes assumed to be ASCII.
>> >and in
>> >    clear=\E[H\E[J, cr=\r, cub=\E[%p1%dD, cub1=^H,
>> >
>> >the "[", "J", "D" are also assumed to be ASCII.
>> >
>> >I see in the documentation for tic and infocmp some indication of this:
>> >
>> >https://www.ibm.com/docs/en/zos/2.4.0?topic=descriptions-tic-put-term
>> >inal-e
>> ntries-
>> >in-terminfo-database
>> >
>> >https://www.ibm.com/docs/en/zos/2.4.0?topic=descriptions-infocmp-comp
>> >are-pr
>> int-
>> >terminal-description
>> >
>> >in particular (tic):
>> >
>> >    Specifies the name of a file containing the terminal specifications.
>> >    Only a single file name can be specified.  The files supported by
>> z/OS
>> >    Curses are identical to the specifications with the exception that
>> the
>> >    source code must be EBCDIC rather than ASCII.
>> >
>> >so... it seems that you'll have to (mechanically) translate the ASCII
>> >file
>> to EBCDIC so
>> >that the IBM tic can translate it back to ASCII.
>>
>> Would it make sense to convert and tag terminfo as ASCII on z/OS? That
>> seems to cure a number of problems in other products.
>
>probably (but I can't test that, and the manpage isn't helpful in this
case)

IIRC, the command is " chtag -t -c ISO8859-1 file-name". You might have to
copy the file to a new location, change the tag, then copy back to get the
contents to be correct. The cp command is aware of tags, so it should do the
conversion. That or use iconv. My code (different project) uses fread/fwrite
to do the conversion after tagging because I'm going from UTF-16 to
ISO8859-1. The codes in terminfo would have to be EBCDIC values even with
the keys being ASCII if you do this. It might be worth a shot anyway.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]