nano-win icon indicating copy to clipboard operation
nano-win copied to clipboard

Non-English Characters

Open webfolderio opened this issue 5 years ago • 4 comments

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.

webfolderio avatar Apr 13 '19 16:04 webfolderio

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.

lhmouse avatar Apr 13 '19 17:04 lhmouse

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

sergeevabc avatar Feb 19 '20 04:02 sergeevabc

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

eabase avatar Jan 12 '22 16:01 eabase

@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

webfolderio avatar Feb 02 '22 20:02 webfolderio