LinuxSir.cn,穿越时空的Linuxsir!

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

mutt显示网页为乱码

[复制链接]
发表于 2005-12-20 16:02:13 | 显示全部楼层 |阅读模式
.mailcap设置为:text/html; /usr/bin/w3m -T text/html '%s'; nametemplate=%s.html; copiousoutput
.muttrc中有设置:auto_view text/html
但收的google快讯显示为乱码。

本帖子中包含更多资源

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

x
 楼主| 发表于 2005-12-20 16:35:30 | 显示全部楼层
??????
回复 支持 反对

使用道具 举报

发表于 2005-12-20 17:01:35 | 显示全部楼层
也许你可以在出现乱码时打开/tmp/mutt.html, 看看源码所用编码和本地locale是否对应
回复 支持 反对

使用道具 举报

发表于 2005-12-20 20:25:46 | 显示全部楼层
wtwang1985兄,
这么好看的彩色是怎么设的?
教一下我吧?
回复 支持 反对

使用道具 举报

 楼主| 发表于 2005-12-20 20:27:47 | 显示全部楼层
Post by pointer
wtwang1985兄,
这么好看的彩色是怎么设的?
教一下我吧?

我在网上搜的。设置如下:

# Color Terminals - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
# (default, white, black, green, magenta, blue, cyan, yellow, red)
# (bright...)  (color1,color2,...,colorN-1)
#     object     foreground     background
#color normal     default        default # normal text
# color indicator  brightyellow   red     # actual message
# color tree       brightmagenta  default # thread arrows
# color status     brightgreen    blue    # status line
# color error      brightred      default # errors
# color message    red            default # info messages
# color signature  red            default # signature
# color attachment brightyellow   red     # MIME attachments
# color search     brightyellow   red     # search matches
# color tilde      brightmagenta  default # ~ at bottom of msg
# color markers    red            default # + at beginning of wrapped lines
# #color hdrdefault blue           default # default header lines
# color bold       red            default # hiliting bold patterns in body
# color underline  green          default # hiliting underlined patterns in body
# color quoted     blue           default # quoted text
# color quoted1    magenta        default
# color quoted2    red            default
# color quoted3    green          default
# color quoted4    cyan           default
# color quoted5    blue           default
# color quoted6    magenta        default
# color quoted7    red            default
# color quoted8    green          default
# color quoted9    cyan           default
# #     object     foreground backg.   RegExp
# color header     red        default  "^(from|subject):"
# #color body      cyan       default  "((ftp|http|https)://|news[^ >)\"\t]+"
# color body       cyan       default  "((ftp|http|https)://|(file|mailto|news):|www\\.)[-a-z0-9_.:]*[a-z0-9](/[^][{} \t\n\r\"<>()]*[^][{} \t\n\r\"<>().,:!])?/?"
# color body       cyan       default  "[-a-z_0-9.+]+@[-a-z_0-9.]+"
# color body       red        default  "(^| )\\*[-a-z0-9dv|_*]+\\*[,.?]?[ \n]"
# color body       green      default  "(^| )_[-a-z0-9dv|__]+_[,.?]?[ \n]"
# color index      blue       default  ~F         # Flagged
# color index      red        default  ~N         # New
# color index      magenta    default  ~T         # Tagged
# color index      yellow     default  ~D         # Deleted

# Default color definitions
color hdrdefault black        cyan
color quoted     red          white
color signature  brightblack  white
color indicator  brightwhite  red
color attachment black        green
color error      red          white
color message    blue         white
color search     brightwhite  magenta
color status     brightyellow blue
color tree       red          white
color normal     blue         white
color tilde      green        white
color bold       brightyellow white
#color underline  magenta      white
color markers    red          white

# Colours for items in the reader
color header brightwhite cyan "^(From|Subject):"
color header red         cyan "^X-Junked-Because:"

# Colours for items in the index
color index brightblue  white ~N
color index brightgreen white "~N ~x hagbard\.demon\.co\.uk"
color index red         white ~F
color index black       green ~T
color index brightwhite black ~D

# Highlights inside the body of a message.
# URLs
color body brightblue  white "(http|ftp|news|telnet|finger)://[^ \"\t\r\n]*"
color body brightblue  white "mailto:[-a-z_0-9.]+@[-a-z_0-9.]+"
# email addresses
color body brightblue  white "[-a-z_0-9.%$]+@[-a-z_0-9.]+\\.[-a-z][-a-z]+"
# Various smilies and the like
color body brightgreen white "<[Gg]>"               # <g>
color body brightgreen white "<[Bb][Gg]>"           # <bg>
color body brightgreen white " [;:]-*[)>(<|]"       # :-) etc...
回复 支持 反对

使用道具 举报

 楼主| 发表于 2005-12-20 20:50:45 | 显示全部楼层
Post by x11
也许你可以在出现乱码时打开/tmp/mutt.html, 看看源码所用编码和本地locale是否对应

谢谢。在/tmp下我找不到mutt.html.在vim里看/var/mail/david(邮箱)源码好像无法正确显示,里面的中文都是方块。
回复 支持 反对

使用道具 举报

发表于 2005-12-20 21:01:04 | 显示全部楼层
Post by wtwang1985
谢谢。在/tmp下我找不到mutt.html.在vim里看/var/mail/david(邮箱)源码好像无法正确显示,里面的中文都是方块。

在mutt浏览这个邮件时,再去看.
否则, mutt会又删掉的
回复 支持 反对

使用道具 举报

 楼主| 发表于 2005-12-20 21:26:46 | 显示全部楼层
Post by pointer
在mutt浏览这个邮件时,再去看.
否则, mutt会又删掉的

没找着。你的机子上能看到么?我用了:sudo ls -R /tmp。显示结果如下:
david@jasminwang:/tmp$ sudo ls -R /tmp
/tmp:
esrv1000-jasminwang        gconfd-root       mapping-david  ssh-ovGMNO6996
flashgot.8qp1zmnh.default  hsperfdata_david  orbit-david
gconfd-david               keyring-IanK7k    orbit-root

/tmp/flashgot.8qp1zmnh.default:
flashgot.fgt  flashgot.sh.test

/tmp/gconfd-david:
lock

/tmp/gconfd-david/lock:
ior

/tmp/gconfd-root:

/tmp/hsperfdata_david:
7623

/tmp/keyring-IanK7k:
socket

/tmp/orbit-david:
bonobo-activation-register.lock  linc-1c1d-0-7fb58c9f65102
bonobo-activation-server-ior     linc-1c20-0-2607c4abaff58
linc-1b54-0-14d500beae2b7        linc-1c26-0-2a6dc9ccb66d6
linc-1b8c-0-2fc49c4594d93        linc-1c33-0-4c06f3fa4cc79
linc-1b93-0-58bb28a181422        linc-1c35-0-62e975a2801c8
linc-1b95-0-6ba68cc0b3280        linc-1c37-0-62e975a276b00
linc-1c05-0-2bbe198eb4e1e        linc-1c39-0-62e975a2d57dd
linc-1c0a-0-47c2c88930919        linc-1c3b-0-62e975a29280b
linc-1c0c-0-47c2c88a12156        linc-1c3f-0-1b6b6d357020
linc-1c0e-0-47c2c8897a465        linc-1c6c-0-432bb64fc57a2
linc-1c14-0-30b187d55ab46        linc-1d7c-0-3b707992d7beb

/tmp/orbit-root:
bonobo-activation-register.lock  bonobo-activation-server-ior

/tmp/ssh-ovGMNO6996:
agent.6996
我觉得可能是编码搞的鬼,如果是这样该怎么办呢?我用w3m浏览大部分的中文网页都没有出现这样的问题阿
回复 支持 反对

使用道具 举报

发表于 2005-12-21 16:34:24 | 显示全部楼层
楼主的locale是gbk还是utf8?
可以先把附件保存,然后查看编码。
现在很多网页都是gbk编码的,如果楼主的locale是utf8,可以在.mailcap中
/usr/bin/w3m -T text/html '%s' 后加 |iconv -f gbk -t utf8
呵呵,笨办法,不知道谁还有好点的办法?
回复 支持 反对

使用道具 举报

发表于 2005-12-21 19:25:25 | 显示全部楼层
对不起,我错了,我这儿也没有的.
回复 支持 反对

使用道具 举报

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

本版积分规则

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