I’m just trying to get started with the curses library in Ruby’s
standard library. I wanted to draw a window using the “real” unicode
characters for this, i.e. ─ for horizontal and │ for vertical lines
(UTF-8 being pretty standard now, using - and | is not an option). So I
tried the obvious (the following is a self-contained example):
-- coding: utf-8 --
str = “Hello world ”
win = Window.new(lines, cols, 0, 0)
win.setpos( lines / 2, (cols / 2) - (str.chars.count / 2) )
This presents me a window with a border of blinking reverse-video “â”
characters instead of the expected continuous lines. Interestingly, the
unicode smiley () in #addstr is displayed correctly, so I doubt it’s a
problem with curses itself.
So: How do I get continuous lines for window borders with curses?