HEADS UP: ncurses is updated
    Jeremy Chadwick 
    koitsu at FreeBSD.org
       
    Mon Apr  9 18:21:13 UTC 2007
    
    
  
On Tue, Apr 10, 2007 at 01:49:32AM +0800, Rong-en Fan wrote:
> On 4/10/07, Jeremy Chadwick <koitsu at 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 |
    
    
More information about the freebsd-stable
mailing list