<<< Date Index >>>     <<< Thread Index >>>

Re: How to change From: and other headers according to language



On Tue, Dec 02, 2003 at 06:08:54AM -0500, David Yitzchak Cohen wrote:
> somebody's gonna use it.  (To be honest, I'll probably use it myself,
> but I'm too lazy to implement it for myself alone, at this point.)

I appreciate the offer, but I probably wouldn't make use of it.

> By "custom editor," I mean to set editor=3D"my_custom_editor" instead of
> vim or whatever.  my_custom_editor will be a script that'll look at the
> message and make all sorts of automated changes (changing From: based on

Okay, understand.  Pretty nifty.

> > The content-type/charest header would be fairly close.
> 
> I can't afford to make decisions based on that for reasons I've already

Right.  I think it depends a lot on the language(s) involved.  (I did
not mention that I already re-write the charest header in the case of
the one non-English language I'm interested in.)

> stated.  I prefer to use a heuristic (e.g. spell checking) to determine
> what the "primary" language of the original mail was and/or to determine

I also prefer a heuristic approach.  I've been doing it for years with
procmail pattern matches, since before I had Mutt working, I had to have
everything in ascii or euc-jp to use mailx.  My case is much easier than
for most people since I only need three rather simple patterns to catch
(and then convert to euc) any mail coming in written in Japanese (until
Micro$oft figures out some other way to butcher it).

> > I will be writing in one or other language depending
> > on what language the mail is that I am replying to.
> 
> Forget about using hooks on that.

In my case (= only two very distinct languages), hooks should work.  In
the interim, while I wait for some clarification on the reply-hook/~h
pattern match incompatibility, I'm going to try a simple ~y hook.  It's
not as bad as I originally thought since a new X- header would only be
added if there were a match on the second language.

henry