Can you please provide a minimal reproducer (COBOL example for your notes)?
BTW: You likely wanted to provide cobc -V, which is the long form ofcobc --version, not cobc -v, which is the long form of cobc --verbose.
... and actually, in this case cobcrun --verbose --info (likely cobcrun -vi as short form) would be useful in this special case.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hello I am still fighting the textfield garbage problem my be I even killed Eugenio's COBOL environment with my testprogram - sorry Eugenio.
Here is my cobinfo DEBIAN 11 with today updates
the program and some pictures
libcob (GnuCOBOL) 3.1.2.0
Copyright (C) 2020 Free Software Foundation, Inc.
License LGPLv3+: GNU LGPL version 3 or later http://gnu.org/licenses/lgpl.html
Dies ist freie Software; die Kopierbedingungen stehen in den Quellen. Es gibt
KEINE Garantie; auch nicht für MARKTGÄNGIGKEIT oder FÜR SPEZIELLE ZWECKE.
Geschrieben von Keisuke Nishida, Roger While, Ron Norman, Simon Sobisch, Edward Hart
Erstellt Apr 30 2021 14:56:38
Gepackt Dec 23 2020 12:04:58 UTC
I've rechecked that with 3.1.2 and ncursesw and did not found any left adjustments:
compile with -xg -free
run
pressed ENTER
entered some data with leading spaces
pressed ENTER
seen the text not be left adjusted
Note: you've posted the output of cobc --info (build and compiler), cobcrun -v --info will show the runtime part which may be different "somewhere", but I guess cobcrun --runtime-config will show more differences. Mine (reduced to the relevant entries) shows:
Screen I/O configuration
: COB_BELL : not set
: COB_REDIRECT_DISPLAY : no (default)
: COB_SCREEN_ESC : no (default)
: COB_SCREEN_EXCEPTIONS : no (default)
: COB_TIMEOUT_SCALE : not set (1000)
: COB_INSERT_MODE : no (default)
: COB_MOUSE_FLAGS : 1 (default)
System configuration
env: USERNAME : 'simon' (set by LOGNAME)
env: LANG : 'C.UTF-8'
: OSTYPE : not set
env: TERM : 'xterm-256color'
: LC_CTYPE : C
and the relevant parts of cobcrun -vi:
extended screen I/O : ncurses, version 6.2.20210109 (CHTYPE=32, WIDE=1)
xterm with 256 colors
mouse support : yes
What about yours?
In general: can you please explicit state the issues you have? I'm not sure yet (other than the auto-trim left which I can't reproduce).
Note for the test program: let the directive in line 1 start in the column 8 which will lead to the compiler recognize it:
>>SOURCEFORMATISFREE
instead of recognizing garbage:
>>SOURCEFORMATISFREE
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
one more:
Type
gruen enter
gruen 3 -blanks XXXXX enter
makes gruen XXXXX what I expect
but
grün enter
grün 3blanks XXXXX enter
makes grü XXXXXX
A hex screen dump would show more but I have no idea how to make visible what
is behind the screen
My Umlaut configuration always worked ! ?
SOURCE-COMPUTER. gnulinux.
OBJECT-COMPUTER. gnulinux
CHARACTER CLASSIFICATION IS deutsch.
SPECIAL-NAMES.
CRT STATUS is statuscrt
CURSOR IS CSRRCC
DECIMAL-POINT IS COMMA
LOCALE deutsch is "de_DE.UTF-8".
For me it looks like
that blanks ,cursor movement, mouse-positioning produce a different behaviour.
Umlaute produce some kind of line break "within" the field
The left adjustment and umlaut look for me to be different construction sites
Doing my tests I had texts with and without ä ö ß etc . so I could not find a red line
So hopefully you have an idea Thanks Erich
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
This might be an issue of 2+ byte unicode code points. That can make single byte PIC X computations hard to figure out sometimes, depending on where control breaks in code happen...where ever that may be in the operating mix. Then it might depend on a fluke of byte codes taken as out of band terminal control codes. There will be an explanation somewhere though.
Cheers,
Blue
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
When the mouse button is the cause of an interrupt are you able to discern the row and column of the mouse input?
In my WINANIM application I know the row column coordinates when a mouse button is pressed. I compare those coordinates to the terminal cursor row column coordinates. If the mouse was the event I then call a routine to position the terminal cursor to the row column of the mouse press.
Keying data is then synchronized with the mouse and terminal interacting at the same buffer position.
I do the above at an WinAPI level - I don't know if curses permits such low level interfacing.
Ralph
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
As PIC X and UTF-8 don't work well together I'd suggest to swap to ISO8859-15 for now; we should investigate UTF-8 and ncursesw, but I'm not available for that myself in the weeks.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
edit phenomen in Input Text Fields
using:
cobc (GnuCOBOL) 3.1.2.0
Erstellt Apr 30 2021 14:56:57 Gepackt Dec 23 2020 12:04:58 UTC
C-Version "10.2.1 20210110"
Standard-Konfigurationsdatei »default.conf« wird geladen
cobc: Fehler: Keine Eingabedateien
Inputfield in screen section type USING has some content
This is the content
If I change the field:
This is the content /or not
I get something like that
/or notThis is the content
playing around getting similar effects with accents
trying harder the field content appears in other fields of the same screen.
older programs, which I will not compile now behave o.k.
Thanks for any ideas Erich
Can you please provide a minimal reproducer (COBOL example for your notes)?
BTW: You likely wanted to provide
cobc -V
, which is the long form ofcobc --version
, notcobc -v
, which is the long form ofcobc --verbose
.... and actually, in this case
cobcrun --verbose --info
(likelycobcrun -vi
as short form) would be useful in this special case.Hello I am still fighting the textfield garbage problem my be I even killed Eugenio's COBOL environment with my testprogram - sorry Eugenio.
Here is my cobinfo DEBIAN 11 with today updates
the program and some pictures
libcob (GnuCOBOL) 3.1.2.0
Copyright (C) 2020 Free Software Foundation, Inc.
License LGPLv3+: GNU LGPL version 3 or later http://gnu.org/licenses/lgpl.html
Dies ist freie Software; die Kopierbedingungen stehen in den Quellen. Es gibt
KEINE Garantie; auch nicht für MARKTGÄNGIGKEIT oder FÜR SPEZIELLE ZWECKE.
Geschrieben von Keisuke Nishida, Roger While, Ron Norman, Simon Sobisch, Edward Hart
Erstellt Apr 30 2021 14:56:38
Gepackt Dec 23 2020 12:04:58 UTC
Build-Informationen
Build-Umgebung : x86_64-pc-linux-gnu
CC : gcc
C-Version : "10.2.1 20210110"
CPPFLAGS :
CFLAGS : -O2 -pipe -finline-functions -fsigned-char -Wall
-Wwrite-strings -Wmissing-prototypes
-Wno-format-y2k
LD : /usr/bin/ld -m elf_x86_64
LDFLAGS : -Wl,-z,relro,-z,now,-O1
GnuCOBOL-Information
COB_MODULE_EXT : so
dynamic loading : system
"CBL_" param check : Deaktiviert
64bit-mode : ja
BINARY-C-LONG : 8 Bytes
Bytereihenfolge : Little-Endian
Natives EBCDIC : nein
Dateiformat für Variabl : 0
Verarbeitung sequenziell : eingebaut
indexed file handler : BDB, version 5.3.28
Mathematische Bibliothek : GMP, version 6.2.1
XML-Bibliothek : Deaktiviert
JSON-Bibliothek : Deaktiviert
Erweiterte Bildschirm-Ei : ncursesw, version 6.2.20201114 (CHTYPE=32, WIDE=1)
xterm with 256 colors
mouse support : ja
I've rechecked that with 3.1.2 and ncursesw and did not found any left adjustments:
-xg -free
Note: you've posted the output of
cobc --info
(build and compiler),cobcrun -v --info
will show the runtime part which may be different "somewhere", but I guesscobcrun --runtime-config
will show more differences. Mine (reduced to the relevant entries) shows:and the relevant parts of
cobcrun -vi
:What about yours?
In general: can you please explicit state the issues you have? I'm not sure yet (other than the auto-trim left which I can't reproduce).
Note for the test program: let the directive in line 1 start in the column 8 which will lead to the compiler recognize it:
instead of recognizing garbage:
Thank you for your patience
Konfiguration der Bildschirm-Ein-/Ausgabe
: COB_BELL : not set
: COB_REDIRECT_DISPLAY : nein (Standard)
: COB_SCREEN_ESC : nein (Standard)
: COB_SCREEN_EXCEPTIONS : nein (Standard)
: COB_TIMEOUT_SCALE : not set (1000)
: COB_INSERT_MODE : nein (Standard)
: COB_MOUSE_FLAGS : 1 (Standard)
: COB_MOUSE_INTERVAL : 100 (Standard)
: COB_DISPLAY_PRINT_PIPE : not set
: COB_DISPLAY_PRINT_FILE : not set
: COB_DISPLAY_PUNCH_FILE : not set
: COB_LEGACY : nein (Standard)
: COB_EXIT_WAIT : ja (Standard)
: COB_EXIT_MSG : 'end of program, please press a key to exit' (Standard)
one more:
Type
gruen enter
gruen 3 -blanks XXXXX enter
makes gruen XXXXX what I expect
but
grün enter
grün 3blanks XXXXX enter
makes grü XXXXXX
A hex screen dump would show more but I have no idea how to make visible what
is behind the screen
SOURCE-COMPUTER. gnulinux.
OBJECT-COMPUTER. gnulinux
CHARACTER CLASSIFICATION IS deutsch.
SPECIAL-NAMES.
CRT STATUS is statuscrt
CURSOR IS CSRRCC
DECIMAL-POINT IS COMMA
LOCALE deutsch is "de_DE.UTF-8".
For me it looks like
that blanks ,cursor movement, mouse-positioning produce a different behaviour.
Umlaute produce some kind of line break "within" the field
The left adjustment and umlaut look for me to be different construction sites
Doing my tests I had texts with and without ä ö ß etc . so I could not find a red line
So hopefully you have an idea Thanks Erich
This might be an issue of 2+ byte unicode code points. That can make single byte PIC X computations hard to figure out sometimes, depending on where control breaks in code happen...where ever that may be in the operating mix. Then it might depend on a fluke of byte codes taken as out of band terminal control codes. There will be an explanation somewhere though.
Cheers,
Blue
When the mouse button is the cause of an interrupt are you able to discern the row and column of the mouse input?
In my WINANIM application I know the row column coordinates when a mouse button is pressed. I compare those coordinates to the terminal cursor row column coordinates. If the mouse was the event I then call a routine to position the terminal cursor to the row column of the mouse press.
Keying data is then synchronized with the mouse and terminal interacting at the same buffer position.
I do the above at an WinAPI level - I don't know if curses permits such low level interfacing.
Ralph
So what is my option ?
Live with it , or wait for next release ? or .... ???
so long Erich
As
PIC X
and UTF-8 don't work well together I'd suggest to swap to ISO8859-15 for now; we should investigate UTF-8 and ncursesw, but I'm not available for that myself in the weeks.