Lars Ingebrigtsen writes: > Hobbit writes: > >> If you look at mml-generate-mime-1 at mml.el.gz, you'll see this code: >> >> (if (and (not raw) >> (member (car (split-string type "/")) '("text" "message"))) >> (progn >> >> When attachment is text file all this black magic after `progn' starts >> to work. Question arises: why not just grab a text, encode it into >> base64 and put into a message? You'll still have to find out the correct charset. > It's a good question, and I don't know. I've Cc'd this message to the > Gnus development list -- perhaps someone there knows? > > (The issue is that the user inserts the following MIME part: > > ðóññêèé òåêñò â êï1251 > > > and then the CP text gets marked as utf-8.) I see this in the raw mail: --=-=-= Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline; filename=thing.txt Content-Transfer-Encoding: base64 8PPx8ero6SDy5erx8iDiIOrvMTI1MQ0K --=-=-= Which makes sense, since 8-bit encodings cannot be told apart, so the detection can't do better than using the first charset from the priority list. If you need to force a specific charset you have to specify it manually, as I did here: