On Fri, October 30, 2009 7:12 am, Kevin Kammer wrote:
> I had been trying to create send-hooks and save-hooks, but noticed that,
> contrary to all the documentation I could find, Mutt was insisting on
> evaluating my regular expressions as case-sensitive.
>
> I was not using any capitalized letters it the regexs. I know that if one
> or more letters is/are capitalized, the expression will be evaluated
> case-sensitive. Nevertheless, '~f tony' matched for messages from "tony"
> but not from "Tony"
>
> Internet searches have revealed that regexs will get messed up if the
> charset that Mutt is using doesn't match the rest of the system. However,
> they appear to match. In the shell:
>
> $ locale
> LANG=en_US.UTF-8
> LC_CTYPE="en_US.UTF-8"
> LC_NUMERIC="en_US.UTF-8"
> LC_TIME="en_US.UTF-8"
> LC_COLLATE="en_US.UTF-8"
> LC_MONETARY="en_US.UTF-8"
> LC_MESSAGES="en_US.UTF-8"
> LC_ALL=
>
> ...and in Mutt:
>
> :set &charset ?charset
> charset="utf-8"
>
> Mutt seems to match the rest of the system, but it still doesn't do
> case-insensitive regex. However, if I invoke mutt with:
>
> $ LC_ALL=C mutt

Looks like a problem with locales or may be even a bug in the regex
parser in mutt. Now setting LC_ALL usually overrides all other LC_
variables. So try to only set LC_CTYPE or may be LC_COLLATE to C. I am
not sure if this works, but it is worth a try.

>
> Then the regex problem is solved, but other problems are introduced since
> Mutt is now running with us-ascii as the $charset.

True. You could try to explicitly set charset to utf-8, but that may
introduce other problems as well.

>
> So far as I can tell, regex in Mutt are broken in UTF-8, unless I am
> missing something (which I think I am). Does anyone know how I can run
> mutt in UTF-8 and without these case problems in regular expressions?

Well, if you do not find a solution, you could open a bug report.

regards,
Christian
-- 
:wq

Reply via email to