From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/32237 Path: main.gmane.org!not-for-mail From: Andrei Elkin Newsgroups: gmane.emacs.gnus.general Subject: mime-charset determination Date: 20 Aug 2000 22:21:45 +0400 Sender: owner-ding@hpc.uh.edu Message-ID: NNTP-Posting-Host: coloc-standby.netfonds.no Mime-Version: 1.0 Content-Type: text/plain; charset=koi8-r Content-Transfer-Encoding: 8bit X-Trace: main.gmane.org 1035168542 18614 80.91.224.250 (21 Oct 2002 02:49:02 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Mon, 21 Oct 2002 02:49:02 +0000 (UTC) Cc: bugs@gnus.org Return-Path: Original-Received: from spinoza.math.uh.edu (spinoza.math.uh.edu [129.7.128.18]) by mailhost.sclp.com (Postfix) with ESMTP id ED940D051E for ; Sun, 20 Aug 2000 14:22:50 -0400 (EDT) Original-Received: from sina.hpc.uh.edu (lists@Sina.HPC.UH.EDU [129.7.3.5]) by spinoza.math.uh.edu (8.9.1/8.9.1) with ESMTP id NAC05468; Sun, 20 Aug 2000 13:22:44 -0500 (CDT) Original-Received: by sina.hpc.uh.edu (TLB v0.09a (1.20 tibbs 1996/10/09 22:03:07)); Sun, 20 Aug 2000 13:22:01 -0500 (CDT) Original-Received: from mailhost.sclp.com (postfix@66-209.196.61.interliant.com [209.196.61.66] (may be forged)) by sina.hpc.uh.edu (8.9.3/8.9.3) with ESMTP id NAA02954 for ; Sun, 20 Aug 2000 13:21:48 -0500 (CDT) Original-Received: from relay2.sbor.ru (sb1.alkor.ru [195.239.62.113]) by mailhost.sclp.com (Postfix) with ESMTP id 46C7BD051E; Sun, 20 Aug 2000 14:22:10 -0400 (EDT) Original-Received: from relay.sbor.ru (relay.sbor.ru [194.220.19.4]) by relay2.sbor.ru (8.9.3/8.9.2) with ESMTP id WAA40622; Sun, 20 Aug 2000 22:22:16 +0400 (MSD) (envelope-from astro@sbor.ru) Original-Received: from himmel.sbor.ru (IDENT:root@[10.2.28.7]) by relay.sbor.ru (8.9.3/8.9.1) with ESMTP id WAA94672; Sun, 20 Aug 2000 22:22:09 +0400 (MSD) Original-Received: (from elkin@localhost) by himmel.sbor.ru (8.9.3/8.9.3) id WAA04167; Sun, 20 Aug 2000 22:22:05 +0400 X-Authentication-Warning: himmel.dune.ru: elkin set sender to astro@sbor.ru using -f Original-To: ding@gnus.org User-Agent: Gnus/5.0807 (Gnus v5.8.7) Emacs/20.5 Original-Lines: 62 Precedence: list X-Majordomo: 1.94.jlt7 Xref: main.gmane.org gmane.emacs.gnus.general:32237 X-Report-Spam: http://spam.gmane.org/gmane.emacs.gnus.general:32237 Current (5.8.7 for me) version provides the definitions of `mm-find-mime-charset-region','mm-mime-charset' that seems to be incorrect. For example my C-h L RET gives: Cyrillic-KOI8 language environment Support for Cyrillic KOI8-R. Sample text: Russian (Русский) Здравствуйте! Input methods (default, cyrillic-jcuken): Character sets: cyrillic-iso8859-5: ISO8859-5 (Cyrillic) Coding systems: cyrillic-koi8 (`R' in mode line): KOI8 8-bit encoding for Cyrillic (MIME: KOI8-R) (alias: koi8-r koi8) And my evelope has Content-Type: text/plain; charset=iso8859-5 insteed of my precious =koi8-r If fact `mm-find-mime-charset-region','mm-mime-charset' try to find out mime-charset value via `Character sets' one. But should do it thru coding-system (as it said in mule.el). Yes, my charset is cyrillic-iso8859-5. But (coding-system-get (mm-preferred-coding-system charset) 'mime-charset) in 'mm-mime-charset' body get that wrong Content-Type as `mm-prefer-coding-system' value is cyrillic-iso8859-5. I found out that `select-message-coding-system' works correctly (resulting with cyrillic-koi8). So the situation becomes nice for me with a redefinition of (defun mm-find-mime-charset-region (b e) (let ((mime-charset (coding-system-get (select-message-coding-system) 'mime-charset))) (if (listp mime-charset) mime-charset (list mime-charset)))) that dont need for 'mm-mime-charset' at all. Emacs ver GNU Emacs 20.5.1 (i386-redhat-linux-gnu, X toolkit) of Tue Feb 22 2000 on porky.devel.redhat.com is run on Linux kernel 2.2.14 in unibyte mode. ______________ Andrei.Elkin P.S this message was posted with the new definition, so should have Content-Type: text/plain; charset=koi8-r