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

Non-English Characters #8

Open
webfolderio opened this issue Apr 13, 2019 · 4 comments
Open

Non-English Characters #8

webfolderio opened this issue Apr 13, 2019 · 4 comments

Comments

@webfolderio
Copy link
Contributor

Thanks for the great port. It works quite well on my Windows 10 except non-English characters.

When i press a non-English character, nano did not print the char.

@lhmouse
Copy link
Owner

lhmouse commented Apr 13, 2019

It does not work for me either. FFS ncursesw (the W variant) seems to want MBCS to be in UTF-8 but native Windows CRT only works with the system's code page which is unlikely UTF-8 (it is 936 on my Simplified Chinese system) so it never worked perfectly.

P.S. You may want to tamper with the configure options to both nano and ncurses and see whether it works. These are beyond my ken. Sorry.

@sergeevabc
Copy link

sergeevabc commented Feb 19, 2020

Perhaps someone has found a workaround to switch & type in non-English?

@eabase
Copy link

eabase commented Jan 12, 2022

Yep, it totally crashes when changing windows keyboard to another language and type anything.
Need to kill process!

@webfolderio
Copy link
Contributor Author

webfolderio commented Feb 2, 2022

@lhmouse nano build with mingw64 and it uses msvcrt.dll. msvcrt doesn't support utf-8 and this might be the root cause for Non-English chars. As you might know Windows 10 comes with new C-Runtime (UCRT). UCRT supports utf-8 and support POSIX better.

I didn't try but build nano-win with ucrt based compiler will fix the issue.

There are two ways to compile nano-win with ucrt based compiler.

Option 1: Using MSYS2, requires Windows env. and there is a mingw64 ucrt based dev. env. mingw64 ucrt based doesn't work on Linux.

Option 2: There is an llvm-mingw which supports ucrt based c-runtime and works on both Windows & Linux: https://github.com/mstorsjo/llvm-mingw

What you think about this solution?

Thanks

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

No branches or pull requests

4 participants