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

Bug#847479: xterm: display issue with double-width character like ? on the last column via ncurses



On Thu, Dec 08, 2016 at 05:37:15PM +0100, Vincent Lefevre wrote:
> Notes:
> 
> The character appears in the subject of this mail, so that you can
> use it as a test case. :)
> 
> The problem doesn't appear with a shell and printf. Thus I assume that
> it may be related to margins and things like that.

Attaching a script, for discussion.  I don't see the problem, but noticed
that the character is "new", and for instance if you were running xterm
remotely so that the wcwidth wasn't known then you could get odd results.

-- 
Thomas E. Dickey <dickey@invisible-island.net>
http://invisible-island.net
ftp://invisible-island.net
#!/usr/bin/env perl

use strict;
use warnings;
use Encode 'encode_utf8';

binmode( STDOUT, ":utf8" );

my $margin = `tput cols`;
my $length = $margin - 8;
for my $n ( 1 .. 10 ) {
    for my $m ( 1 .. $length ) {
        printf '.';
    }
    printf "{{%s}}\n", chr(0x1f378);
    $length++;
}
printf 'DONE!\n'

Attachment: signature.asc
Description: Digital signature


Reply to: