jeaye/ncurses-rs

macOS: ncurses wide character support for example 7

Opened this issue · 2 comments

Currently on macOS HighSierra Version 10.13.6.

Trying to get example 7 to run properly, but I'm receiving this message when I try:

This example requires wide character support.

Which tells me that I probably haven't set up ncursesw properly.

Here's what I've done (as per the readme):

  1. brew install ncurses
  2. brew link --force ncurses
  3. cargo run --example ex_7

What am I missing here? Are there additional steps I should be taking to get this to work?

Ah, I just noticed this:

let wide = cfg!(all(feature = "wide", not(target_os = "macos")));

If I change that line to:

let wide = cfg!(feature = "wide");

And then run:

cargo run --features="wide" --example ex_7

It works fine.

What's the reason for the excluding macOS from using wide characters?

Hm, is it because not all of the WchResult::KeyCode(i32) values work? I've tried wget_wch with backspace, enter, tab, and escape and they all returned WchResult::Char(u32) values.