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

Re: About charset hook and external program reference that varible



On 2008-01-09, Bendany Qian <logismall@xxxxxxxxxxx> wrote:
> Hi all
> 
> When using charset hook , say
> 
> charset-hook gb2312 gbk
> 
> when mailcap reference the %{charset} variable, gb2312 is returned
> instead of gbk.
> 
> I think mutt should return hook value instead of orginal value.
> 
> am I true?

I discovered that a while back, too, and I also thought at first 
that it was a bug.  Then I realized that I could always convert the 
original charset value to the hook value in a script, but if mutt 
set %{charset} to the hook value I wouldn't be able to determine the 
original charset value.  You could say that the original charset 
value has more information than the hook value.

That being said, I haven't thought of a real scenario in which a 
user would specify a charset-hook to change charset A to charset B, 
then want to use charset A instead of B in the mailcap file.

Regards,
Gary