Comments (7)
I added features = ["wide"]
to my Cargo.toml, and unicode output works now!
Is there still work to be done? If this feature is incomplete or something I'm interested in helping out.
from pancurses.
Could you elaborate on what you mean exactly? At least on Windows unicode output works as far as I know, aside from some special cases, and input should as well for both platforms with the release of v0.15. Output with ncurses may require more work, I haven't looked into it for a while.
from pancurses.
I'm looking at a problem with unicode output on linux.
I think all one would need is to insert this call after the initscr()
call, but I'm a bit hesitant to suggest just making everyone en-US locale.
https://github.com/jeaye/ncurses-rs/blob/85ab2aa9d58eb58ba68cbac47f105cc93cf36aae/examples/ex_7.rs#L19
from pancurses.
setlocale
is already called in
Line 15 in 65621d5
I did some testing and Unicode output works as it should for me as long as I have the ncurses/wide feature enabled (exported as just wide in pancurses) and I don't use addch
, because that doesn't work correctly. Checking the ncurses manual at http://invisible-island.net/ncurses/man/curs_addch.3x.html it has two relevant bullet points:
- check if a character can be represented as a single byte in the current locale before attempting call waddch, and
- call wadd_wch for characters which cannot be handled by waddch.
which leads me to believe that pancurses should really always use wadd_wch, it would probably work correctly. Unfortunately ncurses-rs does not expose that function yet so fixing this requires a change there first.
from pancurses.
The only issue I know of is the one I described in my earlier comment, regarding addch() not working for multibyte characters.
from pancurses.
There is one other problem as described here:
We can't use Unicode on a terminal created with pancurses::newterm
. In order to support this platform_specific::pre_init()
should be added to that function as well.
from pancurses.
Is there any solution today ?
from pancurses.
Related Issues (20)
- `ctrl`+`space` causes panic on `unwrap` HOT 1
- *mut i8 cannot be sent between threads safely HOT 1
- Segfault can be triggered with printw HOT 2
- _
- error: linking with `link.exe` failed: exit code: 1120 (x86_64-pc-windows-msvc) HOT 3
- Moving subwindow leaves behind the old windows HOT 3
- win32a consistently crashes HOT 1
- mvprintw and printw should not be exposed HOT 1
- Enter key yields Input::Character('\n'), not Input::KeyEnter HOT 2
- Release and activity HOT 1
- Disable wrapping
- Window::border() and unicode HOT 3
- panic of unwrap() on CString creation
- Get and set XY position of cursor (not mouse) HOT 1
- Can a combination of keypresses detected by ncurses be detected in pancurses?
- Example Code throws Error
- non-blokcing getch ? HOT 3
- Input enum for control/shift?
- noecho before initscr
- Update to ncurses 6.0.0 HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pancurses.