emacs-devel
[Top][All Lists]
Advanced

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

Re: Rmail changes for Emacs 22


From: Stefan Monnier
Subject: Re: Rmail changes for Emacs 22
Date: Mon, 21 Oct 2002 16:50:50 -0400

> But what do other programs do?  Convert all incoming messages to
> Unicode?  If they read from /var/mail, that might be difficult to
> do.  Or do other programs just grok multiple charsets (encodings?) in
> the same file?
> 
> It would, however, be slightly difficult to keep messages encoded in
> ascii and utf-16 in the same file.  Hm.  But if one keeps
> Content-Length headers, say, then one would know that one is looking
> at the From_ line.  Therefore, one could tell whether those five
> characters are encoded in something that looks like ascii or whether
> it looks like utf-16.  That might be sufficient to find the
> Content-type header to be really sure what the charset/encoding is.

Much simpler: because the format is basically the format used during
transfer, you benefit from the work done on MIME and can reuse the
same tricks: the header, for example, is always written in more
or less pure ASCII (at least in theory) and any non-ASCII char has
to be encoded using the =?<charset>?<encoding>?<text>?= thingy.
This way you can unambiguously read the Content-Type and its
charset argument.


        Stefan





reply via email to

[Prev in Thread] Current Thread [Next in Thread]