rgburke / wed

wed is a terminal text editor with key bindings commonly used in Windows based editors
GNU General Public License v2.0
77 stars 1 forks source link

Wed not showing international characters on Ubuntu 18.04 #9

Closed kerberosdelhades closed 5 years ago

kerberosdelhades commented 5 years ago

Expected behavior

Results in nano editor, less, more, cat, etc. for the string 'éêüñ':

éêüñ

Behavior for wed:

I can get accents and international characters (é, ê, ü, ñ) elsewhere on the terminal (xterm, mate-terminal, terminator). But when I try to open a file with international characters in wed, I get garbage with the editor. Same result if I try to write directly the international characters.

Results in wed for the string 'éêüñ':

M-CM-1M-CM-!scM-CM-<lM-CM-*

Compilation options

The compilation options are as follows:

user@ahura:/opt/source/wed$ ./configure --prefix=/opt/usr --enable-lua --disable-gnu-source-highlight

Additional details

rgburke commented 5 years ago

Thanks for trying wed and reporting this issue. I think that wed is linking against libncurses and that's why it's displaying UTF-8 characters incorrectly. In order to display UTF-8 characters correctly it will need to link against libncursesw. If you run ldd $(which wed) | grep ncurses do you see libncurses.so.5? If so could you install ncurses with wide character support:

sudo apt install libncursesw5-dev

and then re-run the configure script and recompile wed to see if it then displays UTF-8 characters correctly?

kerberosdelhades commented 5 years ago

user@ahura$ sudo apt remove libncurses5-dev user@ahura$ sudo apt install libncursesw5-dev user@ahura$ ./configure --prefix=/opt/usr

That fixed the problem, thanks!