Date: Mon, 9 Apr 2007 11:21:08 -0700 From: Jeremy Chadwick <koitsu@FreeBSD.org> To: Rong-en Fan <grafan@gmail.com> Cc: ache@freebsd.org, stable@freebsd.org, Thomas Dickey <dickey@radix.net> Subject: Re: HEADS UP: ncurses is updated Message-ID: <20070409182108.GA17450@icarus.home.lan> In-Reply-To: <6eb82e0704091049u256f649ei80537fac7b876a92@mail.gmail.com> References: <6eb82e0704061105u1f2c2fedr95ceae1393c66b6c@mail.gmail.com> <20070409163354.GA15528@icarus.home.lan> <6eb82e0704091049u256f649ei80537fac7b876a92@mail.gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On Tue, Apr 10, 2007 at 01:49:32AM +0800, Rong-en Fan wrote: > On 4/10/07, Jeremy Chadwick <koitsu@freebsd.org> wrote: > >The only thing I've found, though, is that dialog(1) does not appear to > >properly handle UTF-8 encoding. Line drawing characters show up as > >gibberish (alphanumeric characters). I realise dialog isn't part of > >ncurses, but it does rely on it. We should consider updating dialog to > >match this change. > > You mean it display sometihng like "tqxu" instead of line drawing > characters? > Last time I checked, I thought it is terminal related. When I use screen, it > uses line drawing character. For PuTTY, see: > > http://lists.freebsd.org/pipermail/freebsd-questions/2007-April/146577.html > > The current dialog + utf8 MacOS's Term.app seems work just fine. > I'm playing with devel/cdialog and no matter it uses ncurses or ncursesw > the result is the same. > > I'm CCing ache@ who imports GNU's dialog to our base and cdialog/ncurses > author, hope they can comment :-) So here's how to reproduce this. I'm using PuTTY 0.59 (and I have tried using the snapshots as well, same behaviour) on Windows, using a font that has Unicode line-drawing characters. PuTTY is set for ISO-8859-1 encoding/translation. My UNIX environment: TERM="xterm" export LANG="en_GB.ISO8859-1" export LC_CTYPE="en_GB.ISO8859-1" export LC_COLLATE="C" Results of COLUMNS=40 dialog --msgbox "testing" 6 30 (sorry if this doesn't come across right, but if I save it to a file and cat it, it does appear correctly): ┌────────────────────────────┐ │ testing │ │ │ ├────────────────────────────┤ │ [ OK ] │ └────────────────────────────┘ Now we change PuTTY encoding/translation to UTF-8, and the UNIX environment to: export LANG="en_GB.UTF-8" export LC_CTYPE="en_GB.UTF-8" Results of COLUMNS=40 dialog --msgbox "testing" 6 30 : lqqqqqqqqqqqqqqqqqqqqqqqqqqqqk x testing x x x tqqqqqqqqqqqqqqqqqqqqqqqqqqqqu x [ OK ] x mqqqqqqqqqqqqqqqqqqqqqqqqqqqqj mutt and other apps, however, draw line characters just fine with this configuration. This is what I meant by "specific to dialog(1)". Hope this helps. -- | Jeremy Chadwick jdc at parodius.com | | Parodius Networking http://www.parodius.com/ | | UNIX Systems Administrator Mountain View, CA, USA | | Making life hard for others since 1977. PGP: 4BD6C0CB |
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20070409182108.GA17450>