Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Some (ACS_...) characters not showing as expected #14

Open
fwolfst opened this issue Jan 14, 2016 · 7 comments
Open

Some (ACS_...) characters not showing as expected #14

fwolfst opened this issue Jan 14, 2016 · 7 comments

Comments

@fwolfst
Copy link

fwolfst commented Jan 14, 2016

Hi,

While playing with https://github.com/mare-imbrium/canis I noticed "wrong" characters being displayed.
The output of the ffi-ncurses asc_chars.rb example shows (first two lines)

Upper left corner           6
Lower left corner           ^@

If I compile a ncurses-binary directly:

#include <ncurses.h>
int main(void)
    {
    initscr();
    attron(A_UNDERLINE);
    mvprintw(0,7,"NCURSES EXTENDED CHARACTERS\n");
    attroff(A_UNDERLINE);
    printw("Upper left corner         "); addch(ACS_ULCORNER); printw("  ACS_ULCORNER\n");
    printw("Lower left corner         "); addch(ACS_LLCORNER); printw("  ACS_LLCORNER\n");
    // ....

The output looks more correct to me:

NCURSES EXTENDED CHARACTERS
Upper left corner         ┌  ACS_ULCORNER
Lower left corner         └  ACS_LLCORNER

This happens in the same shell, reproducible independent of execution order. How can we further debug this?

@fwolfst
Copy link
Author

fwolfst commented Jan 15, 2016

If I access the constant ACS_HLINE via a screen it produces the correct output, btw (but not ACS_ULCORNER).

def main
  begin
    scr = initscr
    scr.mvhline(1,1, ACS_HLINE, 4);
    scr.mvhline(2,1, ACS_ULCORNER, 4);
    refresh
    getch
# ...

Will print

 ────
 6666

@fwolfst
Copy link
Author

fwolfst commented Jan 15, 2016

Btw, I use (L)Ubuntu 14.04 64Bit, LXTerminal 0.1.11 (but it happens in XTerm etc, too)

$ ruby --version
ruby 2.2.2p95 (2015-04-13 revision 50295) [x86_64-linux]
$ rvm --version
rvm 1.26.11 (master) by Wayne E. Seguin <wayneeseguin@gmail.com>, Michal Papis <mpapis@gmail.com> [https://rvm.io/]

And examples/getsetsyx.rb works fine (shows box with corners).

@fwolfst
Copy link
Author

fwolfst commented Jan 15, 2016

Packages installed (dpkg -l | grep ncurses)

ii  libncurses5:amd64                           5.9+20140118-1ubuntu1                    amd64        shared libraries for terminal handling
ii  libncurses5:i386                            5.9+20140118-1ubuntu1                    i386         shared libraries for terminal handling
ii  libncurses5-dev:amd64                       5.9+20140118-1ubuntu1                    amd64        developer's libraries for ncurses
ii  libncursesw5:amd64                          5.9+20140118-1ubuntu1                    amd64        shared libraries for terminal handling (wide character support)
ii  libncursesw5-dev:amd64                      5.9+20140118-1ubuntu1                    amd64        developer's libraries for ncursesw
ii  mtr-tiny                                    0.85-2                                   amd64        Full screen ncurses traceroute tool
ii  ncurses-base                                5.9+20140118-1ubuntu1                    all          basic terminal type definitions
ii  ncurses-bin                                 5.9+20140118-1ubuntu1                    amd64        terminal-related programs and man pages
ii  ncurses-term                                5.9+20140118-1ubuntu1                    all          additional terminal type definitions

@seanohalpin
Copy link
Owner

Hi Felix,

Thanks for this bug report. You might have noticed that I have not been
updating ffi-ncurses for a while. I have recently had a change of
circumstance which leaves me some free time for the first time in years. I
am looking forward to fixing the problems you have so thoroughly documented
(for which thank you). I'll also be addressing all other issues with
ffi-ncurses and updating the gem within the next couple of weeks.

Best regards,
Sean

On Fri, Jan 15, 2016 at 10:06 AM, Felix Wolfsteller <
notifications@github.com> wrote:

Packages installed (dpkg -l | grep ncurses)

ii libncurses5:amd64 5.9+20140118-1ubuntu1 amd64 shared libraries for
terminal handling
ii libncurses5:i386 5.9+20140118-1ubuntu1 i386 shared libraries for
terminal handling
ii libncurses5-dev:amd64 5.9+20140118-1ubuntu1 amd64 developer's libraries
for ncurses
ii libncursesw5:amd64 5.9+20140118-1ubuntu1 amd64 shared libraries for
terminal handling (wide character support)
ii libncursesw5-dev:amd64 5.9+20140118-1ubuntu1 amd64 developer's
libraries for ncursesw
ii mtr-tiny 0.85-2 amd64 Full screen ncurses traceroute tool
ii ncurses-base 5.9+20140118-1ubuntu1 all basic terminal type definitions
ii ncurses-bin 5.9+20140118-1ubuntu1 amd64 terminal-related programs and
man pages
ii ncurses-term 5.9+20140118-1ubuntu1 all additional terminal type
definitions


Reply to this email directly or view it on GitHub
#14 (comment)
.

@fwolfst
Copy link
Author

fwolfst commented Jan 25, 2016

Great to hear that, thanks. Tell me if you need more information.

@fwolfst
Copy link
Author

fwolfst commented Sep 4, 2016

Output of locale:

LANG=en_US.UTF-8
LANGUAGE=en_US
LC_CTYPE=en_US.UTF-8
LC_NUMERIC=de_DE.UTF-8
LC_TIME=de_DE.UTF-8
LC_COLLATE="en_US.UTF-8"
LC_MONETARY=de_DE.UTF-8
LC_MESSAGES="en_US.UTF-8"
LC_PAPER=de_DE.UTF-8
LC_NAME=de_DE.UTF-8
LC_ADDRESS=de_DE.UTF-8
LC_TELEPHONE=de_DE.UTF-8
LC_MEASUREMENT=de_DE.UTF-8
LC_IDENTIFICATION=de_DE.UTF-8
LC_ALL=

@zatherz
Copy link

zatherz commented Aug 14, 2017

Bump.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants