jeaye / ncurses-rs

A low-level ncurses wrapper for Rust
Other
685 stars 99 forks source link

macOS: ncurses wide character support for example 7 #168

Open nficca opened 6 years ago

nficca commented 6 years ago

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?

nficca commented 6 years ago

Ah, I just noticed this: https://github.com/jeaye/ncurses-rs/blob/6568749e7bb31e36d1bcd8e14aaace64cb0a542e/build.rs#L24 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?

nficca commented 6 years ago

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.