Santiago Vila kirjutas:
> > I think the regular expressions, which are used by the mailstat script,
> > behave differently under different locale settings.
> 
> So: Is there a good reason for those regular expressions to behave
> differently under your locale, or should I just close this report?
> (or maybe reassign to sed or some other program?)

There are a few sed regular expressions in the mailstat script, which
assume, that the alphabet begins with `a' and ends with `z', which is
true for the English language. But there are languages, including
Estonian, where this does not apply. So this is not bug of sed.

The mailstat script should use more generic regular expressions, which
do not depend on locale settings, EG: the `a-zA-Z0-9' expressions should
be replaced with locale-independent [:alphanum:] expressions. I attach a
patch with the such changes to this e-mail. This patch made the mailstat
work on my computer with et_EE locale.


Juhan

PS. This is first time for me to write regular expressions for sed, so
probably i broke the mailstat horribly and beyond any recognition. :-)
193,194c193,194
<    -e '/^  Folder/s/\/msg\.[-0-9A-Za-z_][-0-9A-Za-z_]*        /\/     /' \
<    -e '/^  Folder/s/\/new\/[-0-9A-Za-z_][-0-9A-Za-z_.,+:[EMAIL PROTECTED]     
/\/     /' \
---
>    -e '/^  Folder/s/\/msg\.[-[:alnum:]_][-[:alnum:]_]*        /\/     /' \
>    -e '/^  Folder/s/\/new\/[-[:alnum:]_][-[:alnum:]_.,+:[EMAIL PROTECTED]     
> /\/     /' \
201,202c201,202
<    -e '/^  Folder/s/\/msg\.[-0-9A-Za-z_][-0-9A-Za-z_]*        /\/     /' \
<    -e '/^  Folder/s/\/new\/[-0-9A-Za-z_][-0-9A-Za-z_.,+:[EMAIL PROTECTED]     
/\/     /' \
---
>    -e '/^  Folder/s/\/msg\.[-[:alnum:]_][-[:alnum:]_]*        /\/     /' \
>    -e '/^  Folder/s/\/new\/[-[:alnum:]_][-[:alnum:]_.,+:[EMAIL PROTECTED]     
> /\/     /' \

Reply via email to