LinuxSir.cn,穿越时空的Linuxsir!

 找回密码
 注册
搜索
热搜: shell linux mysql
查看: 2950|回复: 16

mutt中文显示乱码?

[复制链接]
发表于 2006-10-16 10:02:44 | 显示全部楼层 |阅读模式
我在gnome的中文环境下进入mutt,终端的上下提示栏都是乱码:

  1. q:离��~@  d:�~H��~Y�  u:�~O~M�~H��~Y�  s:�~B���~X  m:信件  r:�~[~^��~F  g:群��~D  ?:帮�~J�
复制代码

在英文环境下进入mutt,终端上下的提示栏就正确了:

  1. q:Quit  d:Del  u:Undel  s:Save  m:Mail  r:Reply  g:Group  ?:Help
复制代码

这问题是怎么回事?貌似跟mutt无关??

然后,邮件上还有中文乱码,不管是中文还是英文环境?
我的
locale

  1. LANG=zh_CN.utf8
  2. LC_CTYPE=zh_CN.utf8
  3. LC_NUMERIC=en_US
  4. LC_TIME=en_US
  5. LC_COLLATE=en_US
  6. LC_MONETARY=en_US
  7. LC_MESSAGES=en_US
  8. LC_PAPER=en_US
  9. LC_NAME=en_US
  10. LC_ADDRESS=en_US
  11. LC_TELEPHONE=en_US
  12. LC_MEASUREMENT=en_US
  13. LC_IDENTIFICATION=en_US
  14. LC_ALL=
复制代码


.muttrc里面是
set charset = "utf-8"
set locale = "zh_CN"

不知这该怎么解决?
发表于 2006-10-16 11:07:36 | 显示全部楼层
locale改成zh_CN.UTF-8
回复 支持 反对

使用道具 举报

 楼主| 发表于 2006-10-16 13:05:03 | 显示全部楼层
都一样,没有任何改变
回复 支持 反对

使用道具 举报

 楼主| 发表于 2006-10-16 15:46:39 | 显示全部楼层
贴张图看看吧!
像第一行的乱码,好像没人有过这种乱码问题!

还有最下面的乱码我也不知如何解决,论坛上有人说要emerge world,那就太可怕了!觉得跟上面的乱码问题可能不是同一个原因!

本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有帐号?注册

x
回复 支持 反对

使用道具 举报

 楼主| 发表于 2006-10-17 21:00:03 | 显示全部楼层
不是吧!这里这么少人用mutt?
回复 支持 反对

使用道具 举报

发表于 2006-10-17 22:58:25 | 显示全部楼层
我的locale是en_US.utf8,所以不存在你的问题,把locale所有的变量都设成同一个试试?
邮件中的在.muttrc中加入
set assumed_charset="utf-8:gb2312:gb18080:gbk"
看看
回复 支持 反对

使用道具 举报

 楼主| 发表于 2006-10-18 11:54:33 | 显示全部楼层
还是一样,我把locale的所有选项变成en_US.utf8,上下提示栏就好了(第一贴一样),但是邮件里的中文还是乱码
回复 支持 反对

使用道具 举报

发表于 2006-10-18 12:12:01 | 显示全部楼层
可能的话贴出mailcap和muttrc看看
回复 支持 反对

使用道具 举报

 楼主| 发表于 2006-10-18 12:51:14 | 显示全部楼层
当然:
  1. $ cat .mailcap
  2. text/html ;\
  3. w3m -T text/html -I %{charset} -dump %s ;\
  4. nametemplate=%s.html ;\
  5. copiousoutput
  6. image/* ; feh %s
复制代码
  1. auto_view application/zip
  2. auto_view application/x-gzip
  3. auto_view application/x-gunzip
  4. auto_view application/pgp-signature
  5. auto_view application/pgp
  6. auto_view application/octet-stream
  7. auto_view application/x-zip-compressed
  8. auto_view application/x-arj-compressed
  9. auto_view application/x-tar-gz
  10. auto_view application/ms-tnef
  11. auto_view application/x-perl
  12. auto_view application/x-sh
  13. auto_view application/x-tcl
  14. auto_view application/x-delphi-source
  15. auto_view application/emacs-lisp
  16. auto_view application/msword
  17. auto_view text/x-patch
  18. auto_view text/html
  19. auto_view text/x-vcard
  20. auto_view text/x-script.elisp
  21. auto_view image/tiff
  22. auto_view text/x-lisp
  23. set hostname="localhost"
  24. set mbox_type=Maildir
  25. set folder=~/.maildir
  26. set spoolfile=~/.maildir/
  27. set record=~/.maildir-sent-`date +%y-%m`/
  28. set move=no
  29. set sendmail = "/usr/bin/esmtp -v -X ~/.esmtplog"
  30. set to_chars="+TCFL"
  31. set charset="utf-8"
  32. set send_charset="utf-8"
  33. #mailboxes Mailbox sent-mail
  34. set header=no
  35. set include=yes
  36. set indent_str="> "
  37. auto_view text/html
  38. set ascii_chars=yes
  39. score "~N" +4
  40. score "~f w2r007" +2
  41. score "~s 通知" +2
  42. score "~s Circulation" +3
  43. score "~D" -5
  44. score "~O" +1
  45. score "~s believe" -10
  46. set sort=threads
  47. set sort_aux=date
  48. set pager_stop
  49. set fast_reply
  50. set edit_headers = no
  51. set pager_index_lines = 4
  52. color signature brightred default
  53. color status white blue
  54. color tilde blue default
  55. color tree brightmagenta default
  56. color underline yellow default
  57. color bold green default
  58. color error red default
  59. color indicator black white
  60. color markers brightred default
  61. color message white blue
  62. color body cyan default "ftp://[^ ]*"
  63. color body cyan default "www.[^ ]*"
  64. color body brightgreen default "[[:alnum:]][-+.#_[:alnum:]]*@[-+.[:alnum:]]*[[:alnum:]]"
  65. color body cyan default "<URL:[^ ]*>"
  66. color body brightblue default "(^|[[:space:]])\\*[^[:space:]]+\\*([[:space:]]|$)"
  67. color body brightblue default "(^|[[:space:]])_[^[:space:]]+_([[:space:]]|$)"
  68. color body brightblue default "(^|[[:space:]])/[^[:space:]]+/([[:space:]]|$)"
  69. color body yellow default "[;:]-[)/(|]"
  70. color body yellow default "[8][-\^][)|]"
  71. color body yellow default "[;:][)/(|]"
  72. color body brightblue default "(http|https|rsync|ftp|news|telnet|finger|gopher)://[^ ]*"
  73. color body brightblue default "<(http|https|rsync|ftp|news|telnet|finger|gopher)://[^ ]*>"
  74. color header yellow default "^cc: "
  75. color header red cyan "^X-Spam-Status:"
  76. color header green default "^date: "
  77. color header yellow default "^from "
  78. color header cyan default "^from: "
  79. color header yellow default "^newsgroups: "
  80. color header yellow default "^reply-to: "
  81. color header cyan default "^subject: "
  82. color header green default "^to: "
  83. color header yellow default "^x-mailer: "
  84. color header yellow default "^message-id:"
  85. color header yellow default "^Organization:"
  86. color header yellow default "^Organisation:"
  87. color header yellow default "^User-Agent:"
  88. color header yellow default "^message-id: .*pine"
  89. color quoted cyan default
  90. color quoted1 yellow default
  91. color quoted2 red default
  92. color quoted3 green default
  93. color quoted4 cyan default
  94. color quoted5 yellow default
  95. color quoted6 red default
  96. color quoted7 green default
  97. color index green default ~N
  98. color index red default ~O
  99. color index magenta default ~F
  100. color index blue default ~T
  101. color index yellow default ~D
  102. # Maybe we shouldn't set index_format here, but this is a recommended
  103. # one for maildir-style folders.
  104. set index_format="%4C %Z %{%b %d} %-16.16L  %s"
  105. folder-hook . "ignore *; unignore from to subject date X-Mailer User-Agent"
  106. folder-hook sent.* "ignore *; unignore from to subject date"
  107. hdr_order X-Mailer User-Agent date from to subject
复制代码
回复 支持 反对

使用道具 举报

发表于 2006-10-18 13:20:28 | 显示全部楼层
从你的截图看好像.mailcap没起作用,调用的还是lynx,图中邮件上的乱码都是提示吧,可能是lynx没找到之类的,应该跟第一行的乱码原因相同,locale换成en_US.utf8乱码还在吗?
另外邮件标题和内容是否乱码,尤其是中文
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

快速回复 返回顶部 返回列表