Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Emails in Russian

2 views
Skip to first unread message

Barbara Shirtcliff

unread,
Jan 21, 2008, 11:31:29 PM1/21/08
to
I don't understand any of this encoding stuff. I can type in Cyrillic
on my computer, and see the cyrillic characters on the screen, but
when I click send, all of those chars are converted to mere question
marks before sending. How can I avoid this? I would like not to have
to switch everything in emacs over to Russian, but I am unwilling to
use Mail.app or some other external application.

I have tried setting the language environment to Russian, but it is
useless. Ideally, I'd like to easily intersperse Russian words with
English. Is that possible?

Cheers,
Barbara Shirtcliff

newsspam5...@robf.de

unread,
Jan 22, 2008, 4:11:20 PM1/22/08
to
Barbara Shirtcliff <bsh...@uic.edu> writes:
> I don't understand any of this encoding stuff. I can type in Cyrillic
> on my computer, and see the cyrillic characters on the screen, but
> when I click send, all of those chars are converted to mere question
> marks before sending.

How exactly does the buffer look like before and after, i.e. what
headers are added and how does the body look like?

And what Emacs version are you using?

> How can I avoid this? I would like not to have to switch
> everything in emacs over to Russian, but I am unwilling to use
> Mail.app or some other external application.
>
> I have tried setting the language environment to Russian, but it is
> useless. Ideally, I'd like to easily intersperse Russian words with
> English. Is that possible?

The composition somehow needs to be encoded.

You may get it work by explicitly setting the following variables:
* vm-mime-8bit-composition-charset
* vm-mime-8bit-text-transfer-encoding

Robert.

Piet van Oostrum

unread,
Jan 23, 2008, 5:38:50 PM1/23/08
to
>>>>> Barbara Shirtcliff <bsh...@uic.edu> (BS) wrote:

>BS> I don't understand any of this encoding stuff. I can type in Cyrillic
>BS> on my computer, and see the cyrillic characters on the screen, but
>BS> when I click send, all of those chars are converted to mere question
>BS> marks before sending. How can I avoid this? I would like not to have
>BS> to switch everything in emacs over to Russian, but I am unwilling to
>BS> use Mail.app or some other external application.

>BS> I have tried setting the language environment to Russian, but it is
>BS> useless. Ideally, I'd like to easily intersperse Russian words with
>BS> English. Is that possible?

Yes, it is possible. I don't know if it is possible with the standard VM,
however. With vm-7.19 it wasn't possible, so I wrote some code to solve
that. I don't know if that code is still necessary with the 8.0.7
version that I am currently using, but my code is still functioning, so I
haven't tried without. There has also been some other code, different from
mine that seems to solve the problem.
I use it with emacs 22.1. I don't know if it works with other emacs versions.

Anyway, here is my code which I put in my .emacs:

(defun vm-sort-coding-systems-predicate (a b)
(> (length (memq a vm-coding-system-priorities))
(length (memq b vm-coding-system-priorities))))

(setq vm-coding-system-priorities
'(iso-latin-1 iso-latin-9 mule-utf-8 mac-roman)
; '(iso-latin-1 iso-latin-9 windows-1252 mule-utf-8 mac-roman)
mm-coding-system-priorities vm-coding-system-priorities)

; The next line is for a noautoload vm.elc. Otherwise use "vm-mime".
;(eval-after-load "vm"
; The next line is for an autoload (default) vm.elc. Otherwise use "vm".
(eval-after-load "vm-mime"
'(defun vm-determine-proper-charset (beg end)
(save-excursion
(save-restriction
(narrow-to-region beg end)
(catch 'done
(goto-char (point-min))
(if (or vm-xemacs-mule-p
(and vm-fsfemacs-mule-p enable-multibyte-characters))
(let ((charsets (delq 'compound-text (find-coding-systems-region
(point-min) (point-max)))))
(cond ((equal charsets '(undecided))
"us-ascii")
(t
(setq charsets
(sort charsets 'vm-sort-coding-systems-predicate))
(while charsets
(let ((cs (coding-system-get (pop charsets) 'mime-charset)))
(if cs
(throw 'done (symbol-name cs))))))))
(and (re-search-forward "[^\000-\177]" nil t)
(throw 'done (or vm-mime-8bit-composition-charset
"iso-8859-1")))
(throw 'done vm-mime-7bit-composition-charset)))))))

--
Piet van Oostrum <pi...@cs.uu.nl>
URL: http://pietvanoostrum.com [PGP 8DAE142BE17999C4]
Private email: pi...@vanoostrum.org

Barbara Shirtcliff

unread,
Feb 6, 2008, 7:03:08 PM2/6/08
to
Okay, Piet, I tried this, but the code called for functions that I
don't have. I do have the latest Aquamacs nightly distribution and
Emacs build.

I also tried the instructions in the previous response. I also
checked the variable sendmail-coding-system (it was nil), set it to
utf-8 (any reason why not?), and watched as my mail was rendered into
question marks before being sent, as previously.

I also tried this last variable as ISO-8859-5, with the same result.
I feel like I must be missing some basic concept.

there are all sorts of encoding variables, various ways to set them,
and five different versions of Russian for each. I wish I had the
time to learn all about this stuff, but I don't think I should have
to. this should be easy.


Deeply frustrated,
Bar

--
Barbara Shirtcliff
PhD Candidate - Russian History
University of Illinois at Chicago


A man is morally free when, in full possession of his living humanity,
he judges the world, and judges other men, with uncompromising
sincerity.
--George Santayana

Piet van Oostrum

unread,
Feb 7, 2008, 3:30:58 PM2/7/08
to
>>>>> Barbara Shirtcliff <gnus.20...@spamgourmet.com> (BS) wrote:

>BS> Okay, Piet, I tried this, but the code called for functions that I
>BS> don't have. I do have the latest Aquamacs nightly distribution and
>BS> Emacs build.

Hi Barbara,

Can you tell me which functions it calls that you don't have?

newsspam5...@robf.de

unread,
Feb 7, 2008, 6:08:58 PM2/7/08
to
Barbara Shirtcliff <gnus.20...@spamgourmet.com> writes:

> Okay, Piet, I tried this, but the code called for functions that I
> don't have. I do have the latest Aquamacs nightly distribution and
> Emacs build.
>
> I also tried the instructions in the previous response. I also
> checked the variable sendmail-coding-system (it was nil), set it to
> utf-8 (any reason why not?), and watched as my mail was rendered into
> question marks before being sent, as previously.

If you have a MULE aware Emacs which supports UTF8, then maybe ...

M-: (member 'utf-8 (coding-system-list)) RET

should be t.

But UTF is a whole different topic and I have no experiences here
(with VM) ...

> >
> I also tried this last variable as ISO-8859-5, with the same result.
> I feel like I must be missing some basic concept.
>
> there are all sorts of encoding variables, various ways to set them,
> and five different versions of Russian for each. I wish I had the
> time to learn all about this stuff, but I don't think I should have
> to. this should be easy.

It should just work ...

Which version of VM are you using?

If you are using 7.x you might try 8.0.x which has some code
to handle this.

What is the result of

M-: (vm-determine-proper-charset (point-min) (point-max)) RET

before encoding?

For a vanilla GNU Emacs / VM you should get for

,---- [ Unencoded ]
| To:
| Subject:
| --text follows this line--
| äöü
`----

,---- [ After pressing C-c C-e ]
|
| MIME-Version: 1.0
| Content-Type: text/plain; charset=iso-8859-1
| Content-Transfer-Encoding: quoted-printable
| To:
| Subject:
| --text follows this line--
| =E4=F6=FC
`----

These are German Umlauts, but it should work the similar for
Russian, i.e. for 8bit chars.

> Deeply frustrated,

Hey, keep on trying ;-)

Robert.

0 new messages