From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/19370 Path: main.gmane.org!not-for-mail From: Shenghuo ZHU Newsgroups: gmane.emacs.gnus.general Subject: Re: with pgnus 0.55 and 0.56 i'm unable to see text in russian Date: 30 Nov 1998 14:03:47 -0500 Organization: Computer Dept of U Rochester Sender: owner-ding@hpc.uh.edu Message-ID: <5bemqldmuk.fsf@schnapps.cs.rochester.edu> References: <2nd865okh3.fsf@zsh.cs.rochester.edu> NNTP-Posting-Host: coloc-standby.netfonds.no Mime-Version: 1.0 X-Trace: main.gmane.org 1035157731 11218 80.91.224.250 (20 Oct 2002 23:48:51 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Sun, 20 Oct 2002 23:48:51 +0000 (UTC) Return-Path: Original-Received: from karazm.math.uh.edu (karazm.math.uh.edu [129.7.128.1]) by sclp3.sclp.com (8.8.5/8.8.5) with ESMTP id OAA24037 for ; Mon, 30 Nov 1998 14:20:09 -0500 (EST) Original-Received: from sina.hpc.uh.edu (lists@Sina.HPC.UH.EDU [129.7.3.5]) by karazm.math.uh.edu (8.9.1/8.9.1) with ESMTP id NAB23087; Mon, 30 Nov 1998 13:04:44 -0600 (CST) Original-Received: by sina.hpc.uh.edu (TLB v0.09a (1.20 tibbs 1996/10/09 22:03:07)); Mon, 30 Nov 1998 13:04:43 -0600 (CST) Original-Received: from sclp3.sclp.com (root@sclp3.sclp.com [204.252.123.139]) by sina.hpc.uh.edu (8.7.3/8.7.3) with ESMTP id NAA08312 for ; Mon, 30 Nov 1998 13:04:20 -0600 (CST) Original-Received: from cayuga.cs.rochester.edu (cayuga.cs.rochester.edu [192.5.53.209]) by sclp3.sclp.com (8.8.5/8.8.5) with SMTP id OAA23661 for ; Mon, 30 Nov 1998 14:03:52 -0500 (EST) Original-Received: from slate.cs.rochester.edu (slate.cs.rochester.edu [192.5.53.101]) by cayuga.cs.rochester.edu (8.6.9/O) with ESMTP id OAA14957 for ; Mon, 30 Nov 1998 14:03:48 -0500 Original-Received: from schnapps.cs.rochester.edu (schnapps.cs.rochester.edu [192.5.53.194]) by slate.cs.rochester.edu (8.6.9/O) with ESMTP id OAA13330 for ; Mon, 30 Nov 1998 14:03:47 -0500 Original-Received: (from zsh@localhost) by schnapps.cs.rochester.edu (SMI-8.6/N++) id OAA14780; Mon, 30 Nov 1998 14:03:47 -0500 Original-To: ding@gnus.org X-Attribution: ZSH X-Face: 'IF:e51ib'Qbl^(}l^&4-J`'P!@[4~O|&k#:@Gld#b/]oMq&`&FVY._3+b`mzp~Jeve~/#/ ERD!OTe<86UhyN=l`mrPY)M7_}`Ktt\K+58Z!hu7>qU,i.N7TotU[FYE(f1;}`g2xj!u*l`^&=Q!g{ *q|ddto|nkt"$r,K$[)"|6,elPH= GJ6Q In-Reply-To: Vladimir Volovich's message of "30 Nov 1998 10:54:36 +0300" Original-Lines: 104 User-Agent: Gnus/5.070056 (Pterodactyl Gnus v0.56) Emacs/20.3 Precedence: list X-Majordomo: 1.94.jlt7 Xref: main.gmane.org gmane.emacs.gnus.general:19370 X-Report-Spam: http://spam.gmane.org/gmane.emacs.gnus.general:19370 >>>>> "VVV" == Vladimir Volovich writes: VVV> My previous test article was incorrect, sorry. The text/plain messages VVV> with one part, even if they are QP-encoded, are displayed fine. The VVV> problem appears in multipart messages. E.g multipart/alternative in VVV> which the text part is QP-encoded, is displayed buggily. I'm sending a VVV> sample message (which _definitely_ is viewed buggy for me) to you in a VVV> private mail. And: the 8-bit articles in koi8-r which do not have C-T VVV> header, are displayed incorrectly: i see iso-8859-1 characters instead VVV> of russian characters, but i have VVV> (setq mm-default-coding-system 'koi8) VVV> in my ~/.emacs file. This worked fine with 0.54, but was broken in 0.55. Fixed. A patch is attached. ChangeLog: Mon Nov 30 13:52:50 1998 Shenghuo ZHU * mm-bodies.el (mm-decode-string): New function. * mm-view.el (mm-inline-text): Use mm-decode-string. Reason: (cited from "C-h f insert") If the current buffer is multibyte, unibyte strings are converted to multibyte for insertion (see `unibyte-char-to-multibyte'). If the current buffer is unibyte, multibyte strings are converted to unibyte for insertion. ZSH> I guess the problem is that "quoted-printable-decode-region" ZSH> runs in a non-"unibyte" buffer. To verify, do the following ZSH> steps, VVV> i'll try this, and will report soon. There is no bug. ZSH> BTW, what is difference between koi8-r and koi8? VVV> No difference at all. koi8-r is the correct name. Koi8 is an VVV> alias. There are some variants of koi8-r which are not yet VVV> standardized, --- e.g. koi8-u, koi8-ru, koi8-rub (extensions for the VVV> Ukrainian and Byelorussian languages). But koi8-r is a standard VVV> charset specified in RFC. ZSH> In XEmacs, XEmacs 20.4 can not show Russian characters in koi8-r ZSH> article. VVV> That's very strange. What does it show? Does adding of the line e.g. VVV> ;-*-coding: koi8-r;-*- VVV> help? I guess there is no coding-system named "koi8-r" in XEmacs 20.4. So, mm-mime-mule-charset-alist needs to be fixed. -- Shenghuo :- cut ---------------------------- --- mm-bodies.el 1998/11/30 18:45:04 1.1 +++ mm-bodies.el 1998/11/30 19:01:23 @@ -163,6 +163,18 @@ (setq mule-charset rfc2047-default-charset))) (mm-decode-coding-region (point-min) (point-max) mule-charset)))))) +(defun mm-decode-string (string charset) + "Decode STRING with CHARSET." + (setq charset (or charset rfc2047-default-charset)) + (when (featurep 'mule) + (let (mule-charset) + (when (and charset + (setq mule-charset (mm-charset-to-coding-system charset)) + enable-multibyte-characters + (or (not (eq mule-charset 'ascii)) + (setq mule-charset rfc2047-default-charset))) + (mm-decode-coding-string string mule-charset))))) + (provide 'mm-bodies) ;; mm-bodies.el ends here --- mm-view.el 1998/11/30 18:29:57 1.1 +++ mm-view.el 1998/11/30 18:51:51 @@ -54,13 +54,12 @@ (cond ((equal type "plain") (setq text (mm-get-part handle)) - (let ((b (point))) - (insert text) + (let ((b (point)) + (charset (mail-content-type-get + (mm-handle-type handle) 'charset))) + (insert (mm-decode-string text charset)) (save-restriction (narrow-to-region b (point)) - (let ((charset (mail-content-type-get - (mm-handle-type handle) 'charset))) - (mm-decode-body charset nil)) (mm-handle-set-undisplayer handle `(lambda ()