Bug 274472 - bsddialog and PuTTY shows garbled graphics
Summary: bsddialog and PuTTY shows garbled graphics
Status: Closed FIXED
Alias: None
Product: Base System
Classification: Unclassified
Component: bin (show other bugs)
Version: 14.0-STABLE
Hardware: Any Any
: --- Affects Only Me
Assignee: Alfonso S. Siciliano
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-10-14 22:08 UTC by Daniel Engberg
Modified: 2024-06-09 01:25 UTC (History)
5 users (show)

See Also:


Attachments
Screenshot (6.91 KB, image/png)
2023-10-14 22:08 UTC, Daniel Engberg
no flags Details
ncurses borders with wide chars in putty (12.55 KB, image/png)
2023-11-04 14:52 UTC, Alfonso S. Siciliano
no flags Details
screenshot (10.35 KB, image/png)
2023-11-22 06:39 UTC, jakub_lach
no flags Details
test 1 (6.22 KB, image/png)
2023-11-23 20:12 UTC, jakub_lach
no flags Details
test 2 (6.20 KB, image/png)
2023-11-23 20:12 UTC, jakub_lach
no flags Details
test 3 (9.65 KB, image/png)
2023-11-23 20:13 UTC, jakub_lach
no flags Details
Screenshot "make config" inside PuTTY, all garbled up (27.56 KB, image/png)
2024-05-23 04:00 UTC, Mikhail Teterin
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Daniel Engberg freebsd_committer freebsd_triage 2023-10-14 22:08:14 UTC
Created attachment 245623 [details]
Screenshot

FreeBSD 14.0-RC1

ENV:
LANG=C.UTF-8
MM_CHARSET=UTF-8
TERM=xterm

PuTTY:
Window --> Translation --> Remove character set: UTF-8

How to reproduce:
bsddialog --msgbox plop 0 0

Workaround:
Enable Window --> Translation --> "Enable VT100 line drawing even in UTF-8 mode"
Comment 1 Alfonso S. Siciliano freebsd_committer freebsd_triage 2023-10-16 10:35:06 UTC
Thank you for the report and the screenshot.

The problem is quite obvious looking at the image. The environment does not print unicode chars to draw borders.

Probably `--ascii-lines` could avoid the garbled graphics:
% bsddialog --ascii-lines --msgbox plop 0 0

In reality bsddialog does not handle the graphics, it is handled by ncurses. Precisely bsddialog uses ncurses API to print characters, strings, change colors and move the cursor. The "garbled graphics" are unicode charachters to print lines (used to implement the borders of a dialog).

I' ll search a computer with Windows/putty to try to reproduce the problem. Anyway we can start the investigation.

Scenario 1.
I suspect some problem with ncurses <-> putty. It is a well known problem, many discussions exist online:
 - with an easy solution https://www.suse.com/support/kb/doc/?id=000018370
 - with a comment by the ncurses maintainer https://stackoverflow.com/questions/37845244/acs-characters-not-working-in-putty-even-with-export-ncurses-no-utf8-acs-1
 - another with the ncurses maintainer https://stackoverflow.com/questions/29955575/how-to-support-extended-curses-characters-with-putty
 - and so on...

Could you try some solution online?

Scenario 2.
bsddialog has some problem. Please could you show the output:
% bsddialog --version
% /usr/bin/bsddialog --version
% /usr/local/bin/bsddialog --version

and the output of an easy test:
% fetch https://gitlab.com/alfix/freebsd-lab/-/raw/main/ncurses_unicode_test.c
% cc -D_XOPEN_SOURCE_EXTENDED ncurses_unicode_test.c -o ncurses_unicode_test -lncursesw
% ./ncurses_unicode_test

(Actually the last test does not use bsddialog, only ncurses, so we can understand the origin of the problem).

Alfonso
Comment 2 Daniel Engberg freebsd_committer freebsd_triage 2023-10-16 20:47:31 UTC
Hi,

Running "bsddialog --ascii-lines --msgbox plop 0 0" works, bapt replicated this by running putty (https://www.freshports.org/security/putty/) on FreeBSD too.

This occurs on both 13.2 and 14.0 using a fresh checkout of the ports tree

I just want to point out that this worked before switching and is probably something we want to fix before 14 gets released.

Best regards,
Daniel
Comment 3 Alfonso S. Siciliano freebsd_committer freebsd_triage 2023-10-27 13:40:21 UTC
I created a review to upload some screenshot and to find the better solution, review D42380.
Comment 4 Alfonso S. Siciliano freebsd_committer freebsd_triage 2023-11-04 14:52:54 UTC
Created attachment 246112 [details]
ncurses borders with wide chars in putty

I can use wide chars instead of utf8 to draw borders. This avoids runtime settings like "env NCURSES_NO_UTF8_ACS=1" and putty: "Window -> Translation -> [X] Enable VT100 line drawing even in UTF-8 mode".

Tested witn ncurses in Current 15.0 (below) and putty (screenshoot).

#include <curses.h>
#include <locale.h>
#include <err.h>
#include <stdlib.h>

/*
 * % cc -D_XOPEN_SOURCE_EXTENDED ncurses-acs-test.c -o ncurses-acs-test -lncursesw
 * % ./ncurses-acs-test
*/

int main()
{
	int u8;
	char *locale;

	if ((locale = setlocale(LC_ALL, "")) == NULL)
		err(1, "Cannot set locale");
	/* init ncurses */
	if (initscr() == NULL)
		errx(1, "Cannot init curses (initscr)\n");

	/* testing */
	box_set(stdscr, 0,0); /* uses WACS_  (wide chars) */
	//box(stdscr, 0, 0);  /* uses ACS_  (UTF8 chars) */
	mvaddstr(1, 2, "Testing Line-drawing");

	mvaddstr(3, 3, "locale and ncurses.");
	mvprintw(4, 4, "1) locale: %s.", locale);
	mvprintw(5, 4, "2) ncurses version: %s, %d.", NCURSES_VERSION, NCURSES_VERSION_PATCH);
	u8 = tigetnum("U8");
	mvprintw(6, 4, "3) U8 cap: %d, TERM: %s", u8, getenv("TERM"));

	mvaddstr(9, 3, "Unicode chars.");
	mvaddstr(10, 4, "1) locale encode: あいうえお");
	mvaddstr(11, 4, "2) Unicode chars border (ACS_*): ");
	addch(ACS_VLINE); addch(' ');
	addch(ACS_HLINE); addch(' ');
	addch(ACS_ULCORNER); addch(' ');
	addch(ACS_URCORNER); addch(' ');
	addch(ACS_LRCORNER); addch(' ');
	addch(ACS_LLCORNER); addch(' ');
	addch(ACS_RTEE); addch(' ');
	addch(ACS_LTEE); addch(' ');

	mvaddstr(13, 3, "Wide chars.");
	mvaddwstr(14, 4, L"1) wchar: あいうえお");
	mvaddstr(15, 4, "2) Wide chars border (WACS_*): ");
	add_wch(WACS_VLINE); addch(' ');
	add_wch(WACS_HLINE); addch(' ');
	add_wch(WACS_ULCORNER); addch(' ');
	add_wch(WACS_URCORNER); addch(' ');
	add_wch(WACS_LRCORNER); addch(' ');
	add_wch(WACS_LLCORNER); addch(' ');
	add_wch(WACS_RTEE); addch(' ');
	add_wch(WACS_LTEE); addch(' ');

	/* refresh and exit */
	mvaddstr(20, 2, "Thank you to test <Press a Key to close> ");
	refresh();
	getch();
	endwin();

	return (0);
}
Comment 5 Daniel Engberg freebsd_committer freebsd_triage 2023-11-04 15:23:43 UTC
Oh, that looks nice!
Comment 6 commit-hook freebsd_committer freebsd_triage 2023-11-17 18:56:56 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=fb4e7422ac7a5e21b497763b301353a066dcd135

commit fb4e7422ac7a5e21b497763b301353a066dcd135
Author:     Alfonso S. Siciliano <asiciliano@FreeBSD.org>
AuthorDate: 2023-11-17 18:45:21 +0000
Commit:     Alfonso S. Siciliano <asiciliano@FreeBSD.org>
CommitDate: 2023-11-17 18:55:58 +0000

    devel/bsddialog: Update to 1.0.1

    Changes:        https://gitlab.com/alfix/bsddialog/-/blob/main/CHANGELOG

    PR:             275134 274472
    Approved by:    fernape

 devel/bsddialog/Makefile  | 3 ++-
 devel/bsddialog/distinfo  | 6 +++---
 devel/bsddialog/pkg-plist | 2 +-
 3 files changed, 6 insertions(+), 5 deletions(-)
Comment 7 jakub_lach 2023-11-21 20:27:00 UTC
(In reply to commit-hook from comment #6)

I had problems with some of the dialogs since Nov (?), now I get "â"s in place of borders in make config in (xterm/terminus).
Comment 8 jakub_lach 2023-11-21 20:29:46 UTC
(In reply to jakub_lach from comment #7)

| Testing unicode ncurses.                                                            |
|                                                                                     |
|  locale and ncurses.                                                                |
|   1) locale: pl_PL.ISO8859-2.                                                       |
|   2) ncurses version: 6.2, 20210220.                                                |
|   3) U8 cap: -2, TERM: xterm                                                        |
|                                                                                     |
|                                                                                     |
|  Unicode chars.                                                                     |
|   1) locale encode: ă~A~Bă~A~Dă~A~Fă~A~Hă~A~J                                       |
|   2) wchar:                                                                         |
|   3) Unicode border chars (ACS_*): | - + + + + + +                                  |
|                                                                                     |
| Thank you to test <Press a Key to close>
Comment 9 jakub_lach 2023-11-21 20:38:16 UTC
FreeBSD 14.0-STABLE #0 stable/14-ae8387cc8 amd64
Comment 10 jakub_lach 2023-11-22 06:39:21 UTC
Created attachment 246479 [details]
screenshot
Comment 11 jakub_lach 2023-11-22 06:40:01 UTC
(In reply to jakub_lach from comment #10)

To be precise, bsddialog --msgbox plop 0 0 works. Garbling is in portsconfig.
Comment 12 jakub_lach 2023-11-22 06:47:42 UTC
(In reply to jakub_lach from comment #11)

Without X, config dialogs work (though borders are different than earlier), but the colours are off (that is, different shades than used in X). 

Pre changes/problems, both in xterm in X and in pure console dialogs looked more or less the same.
Comment 13 Alfonso S. Siciliano freebsd_committer freebsd_triage 2023-11-23 10:38:15 UTC
Hello jakub_lach@mailplus.pl,

Thank you for the report.

So to recap:

> To be precise, bsddialog --msgbox plop 0 0 works. Garbling is in portsconfig.

Please could you show the output of:

% portconfig -v
Comment 14 jakub_lach 2023-11-23 12:53:34 UTC
(In reply to Alfonso S. Siciliano from comment #13)

$ portconfig -v
portconfig version: 0.6.1 (libbsddialog: 1.0.1).
Comment 15 Alfonso S. Siciliano freebsd_committer freebsd_triage 2023-11-23 19:50:17 UTC
(In reply to jakub_lach from comment #14)

I cannot reproduce the problem with fresh 14 RELEASE iso and 15 CURRENT iso installation in VM.
Are you using putty from ports? Did you deinstall devel/bsddialog and ports-mgmt/portconfig and reinstall them from ports?

The output of:
% bsddialog --version
% /usr/local/bin/bsddialog --version

And screenshots of:
test in the Comment 4
% /usr/bin/bsddialog --msgbox base r 0
% /usr/local/bin/bsddialog --msgbox PORT 0 0
Comment 16 jakub_lach 2023-11-23 20:12:35 UTC
Created attachment 246522 [details]
test 1
Comment 17 jakub_lach 2023-11-23 20:12:59 UTC
Created attachment 246523 [details]
test 2
Comment 18 jakub_lach 2023-11-23 20:13:29 UTC
Created attachment 246524 [details]
test 3
Comment 19 jakub_lach 2023-11-23 20:16:46 UTC
(In reply to Alfonso S. Siciliano from comment #15)

$ bsddialog --version
Version: 0.4

$ /usr/local/bin/bsddialog --version
Version: 1.0.1

I do not use putty, I did reinstall bsddialog from ports (was not installed) and portconfig before tests.

I use xterm and x11-fonts/terminus-font.
Comment 20 Alfonso S. Siciliano freebsd_committer freebsd_triage 2023-11-23 20:43:48 UTC
Ok bsddialog tests are right.

> I do not use putty, I did reinstall bsddialog from ports (was not installed) 

You should reinstall portconfig now (after bsddialog) and retest. Then I am sure it is using the right lib version and the problem is only for portconfig.

Anyway this PR is for putty and (lib)bsddialog, if portconfig continues with the error you could open a new PR.
Comment 21 Daniel Engberg freebsd_committer freebsd_triage 2023-12-16 15:44:53 UTC
Close this due to second submitter timeout. Please open a new PR if your issue persists.
Comment 22 commit-hook freebsd_committer freebsd_triage 2024-05-16 13:27:38 UTC
A commit in branch vendor/bsddialog references this bug:

URL: https://cgit.FreeBSD.org/src/commit/?id=be8846bd9e069f4a6bea3d769005bea96cf43990

commit be8846bd9e069f4a6bea3d769005bea96cf43990
Author:     Alfonso S. Siciliano <asiciliano@FreeBSD.org>
AuthorDate: 2024-05-16 13:24:49 +0000
Commit:     Alfonso S. Siciliano <asiciliano@FreeBSD.org>
CommitDate: 2024-05-16 13:24:49 +0000

    contrib/bsddialog: Import version 1.0.2

    Implicitly import also 1.0.1, both versions are for fixing and
    feature requests.

    Fixing:
    Change --mixedform behavior to fix a bsdinstall fault avoiding
    to change the command line in wlanconfig.

    Feature requests:
     * Add keys to navigate menus.
     * Add key to redraw dialogs.
     * Avoid to handle env NCURSES_NO_UTF8_ACS in PuTTY.

    See '2024-04-11 Version 1.0.2' and '2023-11-16 Version 1.0.1' in
    /usr/src/contrib/bsddialog/CHANGELOG for more detailed information.

    PR:                     274472
    Differential Revision:  D42380

 CHANGELOG                     |  32 ++++++++++++
 LICENSE                       |   2 +-
 Makefile                      |  12 ++---
 README.md                     |  27 ++++++----
 examples_library/gauge.c      |   2 +-
 examples_library/mixedgauge.c |   2 +-
 lib/barbox.c                  |  86 +++++++++++++++++++++++++-------
 lib/bsddialog.3               |  37 +++++++++-----
 lib/bsddialog.h               |   4 +-
 lib/datebox.c                 |  53 +++++++++++++++-----
 lib/formbox.c                 |  43 ++++++++--------
 lib/lib_util.c                | 111 +++++++++++++++++++++++-------------------
 lib/lib_util.h                |   9 +++-
 lib/libbsddialog.c            |   9 ++--
 lib/menubox.c                 |  25 ++++++----
 lib/messagebox.c              |  15 ++++--
 lib/textbox.c                 |  34 +++++++------
 lib/timebox.c                 |  17 +++++--
 utility/bsddialog.1           |  83 +++++++++++++++++++++----------
 utility/bsddialog.c           |   6 +--
 utility/util_builders.c       |  72 ++++++++++++++++++++-------
 utility/util_theme.c          |  12 ++---
 22 files changed, 469 insertions(+), 224 deletions(-)
Comment 23 commit-hook freebsd_committer freebsd_triage 2024-05-16 13:27:40 UTC
The tag vendor/bsddialog/1.0.2 references this bug:

URL: https://cgit.FreeBSD.org/src/tag/?h=vendor/bsddialog/1.0.2

tag vendor/bsddialog/1.0.2
Tagger:     Alfonso S. Siciliano <asiciliano@FreeBSD.org>
TaggerDate: 2024-05-16 13:25:47 +0000

contrib/bsddialog: Import version 1.0.2

Implicitly import also 1.0.1, both versions are for fixing and
feature requests.

Fixing:
Change --mixedform behavior to fix a bsdinstall fault avoiding
to change the command line in wlanconfig.

Feature requests:
 * Add keys to navigate menus.
 * Add key to redraw dialogs.
 * Avoid to handle env NCURSES_NO_UTF8_ACS in PuTTY.

See '2024-04-11 Version 1.0.2' and '2023-11-16 Version 1.0.1' in
/usr/src/contrib/bsddialog/CHANGELOG for more detailed information.

PR:			274472
Differential Revision:	D42380
-----BEGIN PGP SIGNATURE-----

iQGTBAABCgB9FiEE3rLDBf8Ek2yJx9ZuP57vrP03HjcFAmZGCXVfFIAAAAAALgAo
aXNzdWVyLWZwckBub3RhdGlvbnMub3BlbnBncC5maWZ0aGhvcnNlbWFuLm5ldERF
QjJDMzA1RkYwNDkzNkM4OUM3RDY2RTNGOUVFRkFDRkQzNzFFMzcACgkQP57vrP03
HjfPQAgAtQl5Zi2ANayQMJgMooJOJif36QvThbtpVddDo0TgDrkR8bA9nwf9skZA
ay8Cq7+nW8vqSwAfwGZyuNQ9RWtgH7CEKl3Wh99Gw1+cc2k8nuVMNbKwQ1woz4xw
BhMYr+92L8SZ+JDww3Rt+fm49QmNSbVcxDJYmx/zU41+gm/KjnXRq0KXb5k6etZu
FH4ILat4rsol/K56fUFkDpuEtUzOnDBIjC/U6k8tnTydZfhpMlDmGrZcBwsYZYWu
D6oY59VFSLL87lCVkRxu9GydJjGOQVujun+UgNf+yBaDQWPrajIaDe+P/GoxDuZl
UaWXImz9nB2qDpzoX28iIIMv8PiOIQ==
=xB0S
-----END PGP SIGNATURE-----

commit be8846bd9e069f4a6bea3d769005bea96cf43990
Author:     Alfonso S. Siciliano <asiciliano@FreeBSD.org>
AuthorDate: 2024-05-16 13:24:49 +0000
Commit:     Alfonso S. Siciliano <asiciliano@FreeBSD.org>
CommitDate: 2024-05-16 13:24:49 +0000

    contrib/bsddialog: Import version 1.0.2

    Implicitly import also 1.0.1, both versions are for fixing and
    feature requests.

    Fixing:
    Change --mixedform behavior to fix a bsdinstall fault avoiding
    to change the command line in wlanconfig.

    Feature requests:
     * Add keys to navigate menus.
     * Add key to redraw dialogs.
     * Avoid to handle env NCURSES_NO_UTF8_ACS in PuTTY.

    See '2024-04-11 Version 1.0.2' and '2023-11-16 Version 1.0.1' in
    /usr/src/contrib/bsddialog/CHANGELOG for more detailed information.

    PR:                     274472
    Differential Revision:  D42380

 CHANGELOG                     |  32 ++++++++++++
 LICENSE                       |   2 +-
 Makefile                      |  12 ++---
 README.md                     |  27 ++++++----
 examples_library/gauge.c      |   2 +-
 examples_library/mixedgauge.c |   2 +-
 lib/barbox.c                  |  86 +++++++++++++++++++++++++-------
 lib/bsddialog.3               |  37 +++++++++-----
 lib/bsddialog.h               |   4 +-
 lib/datebox.c                 |  53 +++++++++++++++-----
 lib/formbox.c                 |  43 ++++++++--------
 lib/lib_util.c                | 111 +++++++++++++++++++++++-------------------
 lib/lib_util.h                |   9 +++-
 lib/libbsddialog.c            |   9 ++--
 lib/menubox.c                 |  25 ++++++----
 lib/messagebox.c              |  15 ++++--
 lib/textbox.c                 |  34 +++++++------
 lib/timebox.c                 |  17 +++++--
 utility/bsddialog.1           |  83 +++++++++++++++++++++----------
 utility/bsddialog.c           |   6 +--
 utility/util_builders.c       |  72 ++++++++++++++++++++-------
 utility/util_theme.c          |  12 ++---
 22 files changed, 469 insertions(+), 224 deletions(-)
Comment 24 commit-hook freebsd_committer freebsd_triage 2024-05-16 13:27:41 UTC
The tag vendor/bsddialog/1.0.2 references this bug:

URL: https://cgit.FreeBSD.org/src/tag/?h=vendor/bsddialog/1.0.2

tag vendor/bsddialog/1.0.2
Tagger:     Alfonso S. Siciliano <asiciliano@FreeBSD.org>
TaggerDate: 2024-05-16 13:25:47 +0000

contrib/bsddialog: Import version 1.0.2

Implicitly import also 1.0.1, both versions are for fixing and
feature requests.

Fixing:
Change --mixedform behavior to fix a bsdinstall fault avoiding
to change the command line in wlanconfig.

Feature requests:
 * Add keys to navigate menus.
 * Add key to redraw dialogs.
 * Avoid to handle env NCURSES_NO_UTF8_ACS in PuTTY.

See '2024-04-11 Version 1.0.2' and '2023-11-16 Version 1.0.1' in
/usr/src/contrib/bsddialog/CHANGELOG for more detailed information.

PR:			274472
Differential Revision:	D42380
-----BEGIN PGP SIGNATURE-----

iQGTBAABCgB9FiEE3rLDBf8Ek2yJx9ZuP57vrP03HjcFAmZGCXVfFIAAAAAALgAo
aXNzdWVyLWZwckBub3RhdGlvbnMub3BlbnBncC5maWZ0aGhvcnNlbWFuLm5ldERF
QjJDMzA1RkYwNDkzNkM4OUM3RDY2RTNGOUVFRkFDRkQzNzFFMzcACgkQP57vrP03
HjfPQAgAtQl5Zi2ANayQMJgMooJOJif36QvThbtpVddDo0TgDrkR8bA9nwf9skZA
ay8Cq7+nW8vqSwAfwGZyuNQ9RWtgH7CEKl3Wh99Gw1+cc2k8nuVMNbKwQ1woz4xw
BhMYr+92L8SZ+JDww3Rt+fm49QmNSbVcxDJYmx/zU41+gm/KjnXRq0KXb5k6etZu
FH4ILat4rsol/K56fUFkDpuEtUzOnDBIjC/U6k8tnTydZfhpMlDmGrZcBwsYZYWu
D6oY59VFSLL87lCVkRxu9GydJjGOQVujun+UgNf+yBaDQWPrajIaDe+P/GoxDuZl
UaWXImz9nB2qDpzoX28iIIMv8PiOIQ==
=xB0S
-----END PGP SIGNATURE-----

commit be8846bd9e069f4a6bea3d769005bea96cf43990
Author:     Alfonso S. Siciliano <asiciliano@FreeBSD.org>
AuthorDate: 2024-05-16 13:24:49 +0000
Commit:     Alfonso S. Siciliano <asiciliano@FreeBSD.org>
CommitDate: 2024-05-16 13:24:49 +0000

    contrib/bsddialog: Import version 1.0.2

    Implicitly import also 1.0.1, both versions are for fixing and
    feature requests.

    Fixing:
    Change --mixedform behavior to fix a bsdinstall fault avoiding
    to change the command line in wlanconfig.

    Feature requests:
     * Add keys to navigate menus.
     * Add key to redraw dialogs.
     * Avoid to handle env NCURSES_NO_UTF8_ACS in PuTTY.

    See '2024-04-11 Version 1.0.2' and '2023-11-16 Version 1.0.1' in
    /usr/src/contrib/bsddialog/CHANGELOG for more detailed information.

    PR:                     274472
    Differential Revision:  D42380

 CHANGELOG                     |  32 ++++++++++++
 LICENSE                       |   2 +-
 Makefile                      |  12 ++---
 README.md                     |  27 ++++++----
 examples_library/gauge.c      |   2 +-
 examples_library/mixedgauge.c |   2 +-
 lib/barbox.c                  |  86 +++++++++++++++++++++++++-------
 lib/bsddialog.3               |  37 +++++++++-----
 lib/bsddialog.h               |   4 +-
 lib/datebox.c                 |  53 +++++++++++++++-----
 lib/formbox.c                 |  43 ++++++++--------
 lib/lib_util.c                | 111 +++++++++++++++++++++++-------------------
 lib/lib_util.h                |   9 +++-
 lib/libbsddialog.c            |   9 ++--
 lib/menubox.c                 |  25 ++++++----
 lib/messagebox.c              |  15 ++++--
 lib/textbox.c                 |  34 +++++++------
 lib/timebox.c                 |  17 +++++--
 utility/bsddialog.1           |  83 +++++++++++++++++++++----------
 utility/bsddialog.c           |   6 +--
 utility/util_builders.c       |  72 ++++++++++++++++++++-------
 utility/util_theme.c          |  12 ++---
 22 files changed, 469 insertions(+), 224 deletions(-)
Comment 25 commit-hook freebsd_committer freebsd_triage 2024-05-16 13:35:43 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/src/commit/?id=a6d8be451f62d425b71a4874f7d4e133b9fb393c

commit a6d8be451f62d425b71a4874f7d4e133b9fb393c
Merge: abb1a1340e3f be8846bd9e06
Author:     Alfonso S. Siciliano <asiciliano@FreeBSD.org>
AuthorDate: 2024-05-16 13:32:56 +0000
Commit:     Alfonso S. Siciliano <asiciliano@FreeBSD.org>
CommitDate: 2024-05-16 13:32:56 +0000

    contrib/bsddialog: Import version 1.0.2

    Implicitly import also 1.0.1, both versions are for fixing and
    feature requests.

    Fixing:
    Change --mixedform behavior to fix a bsdinstall fault avoiding
    to change the command line in wlanconfig.

    Feature requests:
     * Add keys to navigate menus.
     * Add key to redraw dialogs.
     * Avoid to handle env NCURSES_NO_UTF8_ACS in PuTTY.

    See '2024-04-11 Version 1.0.2' and '2023-11-16 Version 1.0.1' in
    /usr/src/contrib/bsddialog/CHANGELOG for more detailed information.

    PR:                     274472
    Differential Revision:  D42380

    Merge commit 'be8846bd9e069f4a6bea3d769005bea96cf43990'

 contrib/bsddialog/CHANGELOG                     |  32 +++++++
 contrib/bsddialog/LICENSE                       |   2 +-
 contrib/bsddialog/Makefile                      |  12 +--
 contrib/bsddialog/README.md                     |  27 ++++--
 contrib/bsddialog/examples_library/gauge.c      |   2 +-
 contrib/bsddialog/examples_library/mixedgauge.c |   2 +-
 contrib/bsddialog/lib/barbox.c                  |  86 ++++++++++++++----
 contrib/bsddialog/lib/bsddialog.3               |  37 +++++---
 contrib/bsddialog/lib/bsddialog.h               |   4 +-
 contrib/bsddialog/lib/datebox.c                 |  53 ++++++++---
 contrib/bsddialog/lib/formbox.c                 |  43 ++++-----
 contrib/bsddialog/lib/lib_util.c                | 111 +++++++++++++-----------
 contrib/bsddialog/lib/lib_util.h                |   9 +-
 contrib/bsddialog/lib/libbsddialog.c            |   9 +-
 contrib/bsddialog/lib/menubox.c                 |  25 +++---
 contrib/bsddialog/lib/messagebox.c              |  15 ++--
 contrib/bsddialog/lib/textbox.c                 |  34 ++++----
 contrib/bsddialog/lib/timebox.c                 |  17 +++-
 contrib/bsddialog/utility/bsddialog.1           |  83 ++++++++++++------
 contrib/bsddialog/utility/bsddialog.c           |   6 +-
 contrib/bsddialog/utility/util_builders.c       |  72 +++++++++++----
 contrib/bsddialog/utility/util_theme.c          |  12 +--
 22 files changed, 469 insertions(+), 224 deletions(-)
Comment 26 Mikhail Teterin freebsd_committer freebsd_triage 2024-05-23 04:00:24 UTC
Created attachment 250889 [details]
Screenshot "make config" inside PuTTY, all garbled up

This is marked "Closed", but I'm still having the problem with both PuTTY and FreeBSD's own native syscons (on a freshly-built 14.1/stable)... My LANG is set to uk_UA.KOI8-U and the KOI8-U fonts are loaded at boot with: fonts8x16="koi8-u-8x16" setting in /etc/rc.conf.

Things look a little better inside xterm -- all the lines are drawn with Cyrillic Б-character, ugly, but usable. But on a FreeBSD console -- before I had the X11 up -- it was not usable at all. Until I forced it back to dialog4ports -- seems like it too early to deprecate that...
Comment 27 jakub_lach 2024-05-23 06:10:57 UTC
(In reply to Mikhail Teterin from comment #26)

The update is not MFC to -STABLE, as far as I can tell.
Comment 28 Alfonso S. Siciliano freebsd_committer freebsd_triage 2024-05-23 15:50:13 UTC
(In reply to Mikhail Teterin from comment #26)

The problem seem related to portconfig. Please could you check if it is bug #275304 or bug #275364. Otherwise you could open a new PR and/or add a new entry to Problems in wiki https://wiki.freebsd.org/portconfig.
Comment 29 Mikhail T. 2024-06-07 13:37:59 UTC
(In reply to jakub_lach from comment #27)
> The update is not MFC to -STABLE, as far as I can tell.

Ouch. Shouldn't it be? At present, the "out of the box" 14.x is unusable for people like myself :(

(In reply to Alfonso S. Siciliano from comment #28)
> if it is bug #275304 or bug #275364

Those two seem closely related, aren't they? Both to each other and to this PR :)
Comment 30 Alfonso S. Siciliano freebsd_committer freebsd_triage 2024-06-09 01:25:47 UTC
(In reply to Mikhail T. from comment #29)

> Ouch. Shouldn't it be? At present, the "out of the box" 14.x is unusable for people like myself :(

You can write me an email to asiciliano@ as this PR is close and unrelated to portconfig, we can solve quickly the problem.

>(In reply to Alfonso S. Siciliano from comment #28)
> if it is bug #275304 or bug #275364

>Those two seem closely related, aren't they? Both to each other and to this PR :)

Yes, the 2 PR (bug #275304 and bug #275364) are the same problem, that is `make config` in a NO-utf8 environment. The cause is described in their comments.

However, they are not related to this PR. Actually this is a ncurses feature, env NCURSES_NO_UTF8_ACS, to know more review D42380.