[Date Prev][Date Next][Thread Prev][][Date Index][Thread Index]

Re: why Chinese just shown in byte codes?

jidanni@xxxxxxxxxxx wrote:
> Why is the following message's Chinese just displayed in octal codes,
> and not real Chinese, like mutt(1) can see?
> Maybe the problem is in
> "
> Content-Type: text/plain; charset="UTF-8"
>  Digest for Group:
>    Chinese Speakers
>    http://www.couchsurfing.org/group.html?gid=42773
>    Last Group Digest Sent:  Jun 19 12:55 am
> "

That's indeed just the cause (w3m is not, as Steinar Bang said).

> Well mutt(1) can deal with it. Maybe gnus/w3m could be less strict about
> formatting?

I don't know mutt, but I don't think every MUA worth dealing with
such a broken thing.  If you often get such mails, this will help
(waste time a bit even with normal mails, though).

(defadvice rfc2231-parse-string (before separate-charset-token activate)
  "Separate charset token being not terminated."
  (if (string-match "\\(charset=[^\t\n ]+\\)[\t\n ]*[^\t\n ;]" (ad-get-arg 0))
      (ad-set-arg 0 (concat (substring (ad-get-arg 0) 0 (match-end 1))
                            (substring (ad-get-arg 0) (match-end 1))))))