无法在 Mutt 1.7 上显示希腊字母

无法在 Mutt 1.7 上显示希腊字母

我最近使用 apt 在 Linux Mint 18 上安装了 mutt。我配置了它,它对我的​​三个帐户都非常有效。然后我意识到我有 mutt 1.5 版本,而 1.7 版本是最新的。我无法通过 apt 更新,因此我下载并安装了带有我想要的选项的 tarball。从那时起,我看到的不再是希腊字符:M-O~AM-O~LM-NM-3M-O~AM-NM-1M-NM-<M-NM-<M-NM-1

这是 mutt -v 的输出

gramanas@miniEye ~ $ mutt -v
Mutt 1.7.0 (2016-08-17)
Copyright (C) 1996-2016 Michael R. Elkins and others.
Mutt comes with ABSOLUTELY NO WARRANTY; for details type `mutt -vv'.
Mutt is free software, and you are welcome to redistribute it
under certain conditions; type `mutt -vv' for details.

System: Linux 4.4.0-21-generic (x86_64)
ncurses: ncurses 6.0.20160213 (compiled with 6.0)
hcache backend: tokyocabinet 1.4.48

Compiler:
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-linux-gnu/5/lto-wrapper
Target: x86_64-linux-gnu
Configured with: ../src/configure -v --with-pkgversion='Ubuntu 5.4.0-6ubuntu1~16.04.2' --with-bugurl=file:///usr/share/doc/gcc-5/README.Bugs --enable
-languages=c,ada,c++,java,go,d,fortran,objc,obj-c++ --prefix=/usr --program-suffix=-5 --enable-shared --enable-linker-build-id --libexecdir=/usr/lib 
--without-included-gettext --enable-threads=posix --libdir=/usr/lib --enable-nls --with-sysroot=/ --enable-clocale=gnu --enable-libstdcxx-debug --ena
ble-libstdcxx-time=yes --with-default-libstdcxx-abi=new --enable-gnu-unique-object --disable-vtable-verify --enable-libmpx --enable-plugin --with-system-zlib --disable-browser-plugin --enable-java-awt=gtk --enable-gtk-cairo --with-java-home=/usr/lib/jvm/java-1.5.0-gcj-5-amd64/jre --enable-java-hom
e --with-jvm-root-dir=/usr/lib/jvm/java-1.5.0-gcj-5-amd64 --with-jvm-jar-dir=/usr/lib/jvm-exports/java-1.5.0-gcj-5-amd64 --with-arch-directory=amd64 
--with-ecj-jar=/usr/share/java/eclipse-ecj.jar --enable-objc-gc --enable-multiarch --disable-werror --with-arch-32=i686 --with-abi=m64 --with-multili
b-list=m32,m64,mx32 --enable-multilib --with-tune=generic --enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-
linux-gnu
Thread model: posix
gcc version 5.4.0 20160609 (Ubuntu 5.4.0-6ubuntu1~16.04.2) 

Configure options: '--enable-imap' '--enable-smtp' '--with-ssl' '--enable-sidebar' '--enable-hcache'

Compilation CFLAGS: -Wall -pedantic -Wno-long-long -g -O2

Compile options:
-DOMAIN
-DEBUG
-HOMESPOOL  +USE_SETGID  +USE_DOTLOCK  +DL_STANDALONE  +USE_FCNTL  -USE_FLOCK   
-USE_POP  +USE_IMAP  +USE_SMTP  
+USE_SSL_OPENSSL  -USE_SSL_GNUTLS  -USE_SASL  -USE_GSS  +HAVE_GETADDRINFO  
+HAVE_REGCOMP  -USE_GNU_REGEX  
+HAVE_COLOR  +HAVE_START_COLOR  +HAVE_TYPEAHEAD  +HAVE_BKGDSET  
+HAVE_CURS_SET  +HAVE_META  +HAVE_RESIZETERM  
+CRYPT_BACKEND_CLASSIC_PGP  +CRYPT_BACKEND_CLASSIC_SMIME  -CRYPT_BACKEND_GPGME  
-EXACT_ADDRESS  -SUN_ATTACHMENT  
+ENABLE_NLS  -LOCALES_HACK  +HAVE_WC_FUNCS  +HAVE_LANGINFO_CODESET  +HAVE_LANGINFO_YESEXPR  
+HAVE_ICONV  -ICONV_NONTRANS  -HAVE_LIBIDN  +HAVE_GETSID  +USE_HCACHE  +USE_SIDEBAR  
-ISPELL
SENDMAIL="/usr/sbin/sendmail"
MAILPATH="/var/mail"
PKGDATADIR="/usr/local/share/mutt"
SYSCONFDIR="/usr/local/etc"
EXECSHELL="/bin/sh"
-MIXMASTER
To contact the developers, please mail to <[email protected]>.
To report a bug, please visit http://bugs.mutt.org/.

这是 locale 的输出

gramanas@miniEye ~ $ locale
LANG=en_US.UTF-8
LANGUAGE=
LC_CTYPE="en_US.UTF-8"
LC_NUMERIC=el_GR.UTF-8
LC_TIME="en_US.UTF-8"
LC_COLLATE="en_US.UTF-8"
LC_MONETARY=el_GR.UTF-8
LC_MESSAGES="en_US.UTF-8"
LC_PAPER=el_GR.UTF-8
LC_NAME=el_GR.UTF-8
LC_ADDRESS=el_GR.UTF-8
LC_TELEPHONE=el_GR.UTF-8
LC_MEASUREMENT=el_GR.UTF-8
LC_IDENTIFICATION=el_GR.UTF-8
LC_ALL=

如果您需要其他任何东西,我很乐意提供。

答案1

ncurses 库是针对不同的配置构建的(请参阅手册页)。

Mutt 的版本消息显示了很多细节,但开发人员忽略了告诉您它是否找到了 ncurses 的宽字符版本。

如果您安装libncursesw5-dev包裹,然后重新配置,脚本将显示如下内容:

checking for initscr... no
checking for waddnwstr in -lncurses... no
checking for waddnwstr in -lncursesw... yes
checking for initscr in -lncursesw... yes
checking for tgetent in -ltinfo... yes
checking ncursesw/ncurses.h usability... yes
checking ncursesw/ncurses.h presence... yes
checking for ncursesw/ncurses.h... yes
checking for start_color declaration... yes
checking for typeahead declaration... yes
checking for bkgdset declaration... yes
checking for curs_set declaration... yes
checking for meta declaration... yes
checking for use_default_colors declaration... yes
checking for resizeterm declaration... yes
checking for use_extended_names... yes

你可以知道使用了哪个库的唯一方法是使用ldd

linux-vdso.so.1 =>  (0x00007ffd72ba4000)
libncursesw.so.5 => /lib/x86_64-linux-gnu/libncursesw.so.5 (0x00007f4f2131d000)
libtinfo.so.5 => /lib/x86_64-linux-gnu/libtinfo.so.5 (0x00007f4f210f4000)
libssl.so.1.0.0 => /lib/x86_64-linux-gnu/libssl.so.1.0.0 (0x00007f4f20e8a000)
libcrypto.so.1.0.0 => /lib/x86_64-linux-gnu/libcrypto.so.1.0.0 (0x00007f4f20a46000)
libidn.so.11 => /usr/lib/x86_64-linux-gnu/libidn.so.11 (0x00007f4f20813000)
libdb-5.3.so => /usr/lib/x86_64-linux-gnu/libdb-5.3.so (0x00007f4f20465000)
libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f4f2009c000)
libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007f4f1fe98000)
libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007f4f1fc7a000)
/lib64/ld-linux-x86-64.so.2 (0x0000562212af9000)

或(使用我的externs脚本过滤结果),其中nm

$ externs mutt |grep NCURSES
beep@@NCURSESW_5.1.20000708
cbreak@@NCURSES_TINFO_5.0.19991023
clearok@@NCURSESW_5.1.20000708
curs_set@@NCURSES_TINFO_5.0.19991023
curses_version@@NCURSES_TINFO_5.0.19991023
endwin@@NCURSESW_5.1.20000708
flushinp@@NCURSES_TINFO_5.0.19991023
has_colors@@NCURSESW_5.1.20000708
init_pair@@NCURSESW_5.1.20000708
initscr@@NCURSESW_5.1.20000708
isendwin@@NCURSESW_5.1.20000708
key_defined@@NCURSES_TINFO_5.4.20040208
keypad@@NCURSES_TINFO_5.0.19991023
meta@@NCURSES_TINFO_5.0.19991023
noecho@@NCURSESW_5.1.20000708
printw@@NCURSESW_5.1.20000708
resizeterm@@NCURSESW_5.1.20000708
scrollok@@NCURSESW_5.1.20000708
start_color@@NCURSESW_5.1.20000708
tigetflag@@NCURSES_TINFO_5.0.19991023
tigetstr@@NCURSES_TINFO_5.0.19991023
typeahead@@NCURSES_TINFO_5.0.19991023
use_default_colors@@NCURSESW_5.1.20000708
use_extended_names@@NCURSES_TINFO_5.1.20000708
vwprintw@@NCURSESW_5.1.20000708
wadd_wch@@NCURSESW_5.3.20021019
waddch@@NCURSESW_5.1.20000708
waddnstr@@NCURSESW_5.1.20000708
wbkgdset@@NCURSESW_5.1.20000708
wclear@@NCURSESW_5.1.20000708
wclrtobot@@NCURSESW_5.1.20000708
wclrtoeol@@NCURSESW_5.1.20000708
wgetch@@NCURSESW_5.1.20000708
wmove@@NCURSESW_5.1.20000708
wrefresh@@NCURSESW_5.1.20000708
wtimeout@@NCURSES_TINFO_5.0.19991023

答案2

以下帮助了我(mutt 1.6.2 和 1.7.1,匈牙利语言环境,同样的问题):

  • 下载 mutt 源代码 - 如果您还没有下载
  • 安装libncursesw5-dev- 这就是问题的解决方案。
  • 我还发现了一些需要安装的库,以便使用我的选项构建 mutt: libgpgme11-dev libghc-gsasl-dev libgss-dev libtokyocabinet-dev
  • 更改到 mutt 源目录
  • 使用您的选项(重新)配置 mutt。

    我的例子:

    ./configure --enable-smtp --enable-pop --enable-imap --with-gss --with-sasl --with-gnutls --enable-gpgme --with-idn --enable-hcache --with-tokyocabinet
    
  • (重新)构建杂种狗:

    make
    

    此时您可以通过运行来测试 mutt ./mutt

  • 安装

    make install
    

相关内容