Re: Sieve doesn´t filter emails with words with accents

2006-06-20 Thread Sebas PRE



Citado por Andreas Hasenack <[EMAIL PROTECTED]>:


On Mon, Jun 19, 2006 at 09:24:36AM +0200, Sebas PRE wrote:

Yes, the strings of my sieve script are in UTF-8, this is my script:

require "fileinto";

# Leido
if header :comparator "i;ascii-casemap" :contains "Subject" "Leído"  {
   fileinto "TESTBOX";
}

but it doesn´t work.


It's a bit worse than that: you don't even need to have accented
characters in
the sieve rule.

https://bugzilla.andrew.cmu.edu/show_bug.cgi?id=2455 was opened a couple of
years ago.






Thanks for the replies, I hope this bug is solved soon because for many
languages the filters don´t work.

Greetings...


Sebastián Calero.

Cyrus Home Page: http://asg.web.cmu.edu/cyrus
Cyrus Wiki/FAQ: http://cyruswiki.andrew.cmu.edu
List Archives/Info: http://asg.web.cmu.edu/cyrus/mailing-list.html


Re: Sieve doesn´t filter emails with words with accents

2006-06-19 Thread Andreas Hasenack
On Mon, Jun 19, 2006 at 09:24:36AM +0200, Sebas PRE wrote:
> Yes, the strings of my sieve script are in UTF-8, this is my script:
> 
> require "fileinto";
> 
> # Leido
> if header :comparator "i;ascii-casemap" :contains "Subject" "Leído"  {
>fileinto "TESTBOX";
> }
> 
> but it doesn´t work.

It's a bit worse than that: you don't even need to have accented characters in
the sieve rule.

https://bugzilla.andrew.cmu.edu/show_bug.cgi?id=2455 was opened a couple of
years ago.


Cyrus Home Page: http://asg.web.cmu.edu/cyrus
Cyrus Wiki/FAQ: http://cyruswiki.andrew.cmu.edu
List Archives/Info: http://asg.web.cmu.edu/cyrus/mailing-list.html


Re: Sieve doesn´t filter emails with words with accents

2006-06-19 Thread Sebas PRE

Yes, the strings of my sieve script are in UTF-8, this is my script:

require "fileinto";

# Leido
if header :comparator "i;ascii-casemap" :contains "Subject" "Leído"  {
   fileinto "TESTBOX";
}

but it doesn´t work.


Greetings...

Sebastián Calero.


Citado por Kjetil Torgrim Homme <[EMAIL PROTECTED]>:


On Thu, 2006-06-15 at 16:33 +0200, Sandy Drobic wrote:

Sebas PRE wrote:
> I would like to create a sieve filter to deliver to a folder all mail with
> "leído:" in the Subject: header, but it does not work.

Because 8 bit characters are not allowed in header lines. You need to look
for the encoded equivalent.


that's not correct.  the Sieve interpreter should decode headers as per
RFC 2047 (or RFC 2231 as appropriate) into Unicode.  I quote from RFC
3028:

2.7.2.   Comparisons Across Character Sets

  All Sieve scripts are represented in UTF-8, but messages may involve
  a number of character sets.  In order for comparisons to work across
  character sets, implementations SHOULD implement the following
  behavior:

 Implementations decode header charsets to UTF-8.  Two strings are
 considered equal if their UTF-8 representations are identical.
 Implementations should decode charsets represented in the forms
 specified by [MIME] for both message headers and bodies.
 Implementations must be capable of decoding US-ASCII, ISO-8859-1,
 the ASCII subset of ISO-8859-* character sets, and UTF-8.

  If implementations fail to support the above behavior, they MUST
  conform to the following:

 No two strings can be considered equal if one contains octets
 greater than 127.

Cyrus is allowed to not match on accented characters as per the last
stanza, but it clearly would be benificial if it supported other
character sets than US-ASCII.  the code actually tries to do so, but
there is a bug somewhere -- I think the problem is that the strings from
the script are not represented in UTF-8.  I couldn't quite keep track
across all the function pointers, however.

--
Kjetil T.



Cyrus Home Page: http://asg.web.cmu.edu/cyrus
Cyrus Wiki/FAQ: http://cyruswiki.andrew.cmu.edu
List Archives/Info: http://asg.web.cmu.edu/cyrus/mailing-list.html





Cyrus Home Page: http://asg.web.cmu.edu/cyrus
Cyrus Wiki/FAQ: http://cyruswiki.andrew.cmu.edu
List Archives/Info: http://asg.web.cmu.edu/cyrus/mailing-list.html


Re: Sieve doesn´t filter emails with words with accents

2006-06-15 Thread Kjetil Torgrim Homme
On Thu, 2006-06-15 at 16:33 +0200, Sandy Drobic wrote:
> Sebas PRE wrote:
> > I would like to create a sieve filter to deliver to a folder all mail with
> > "leído:" in the Subject: header, but it does not work.
> 
> Because 8 bit characters are not allowed in header lines. You need to look 
> for the encoded equivalent.

that's not correct.  the Sieve interpreter should decode headers as per
RFC 2047 (or RFC 2231 as appropriate) into Unicode.  I quote from RFC
3028:

2.7.2.   Comparisons Across Character Sets

   All Sieve scripts are represented in UTF-8, but messages may involve
   a number of character sets.  In order for comparisons to work across
   character sets, implementations SHOULD implement the following
   behavior:

  Implementations decode header charsets to UTF-8.  Two strings are
  considered equal if their UTF-8 representations are identical.
  Implementations should decode charsets represented in the forms
  specified by [MIME] for both message headers and bodies.
  Implementations must be capable of decoding US-ASCII, ISO-8859-1,
  the ASCII subset of ISO-8859-* character sets, and UTF-8.

   If implementations fail to support the above behavior, they MUST
   conform to the following:

  No two strings can be considered equal if one contains octets
  greater than 127.

Cyrus is allowed to not match on accented characters as per the last
stanza, but it clearly would be benificial if it supported other
character sets than US-ASCII.  the code actually tries to do so, but
there is a bug somewhere -- I think the problem is that the strings from
the script are not represented in UTF-8.  I couldn't quite keep track
across all the function pointers, however.

-- 
Kjetil T.



Cyrus Home Page: http://asg.web.cmu.edu/cyrus
Cyrus Wiki/FAQ: http://cyruswiki.andrew.cmu.edu
List Archives/Info: http://asg.web.cmu.edu/cyrus/mailing-list.html


Re: Sieve doesn´t filter emails with words with accents

2006-06-15 Thread Sandy Drobic

Sebas PRE wrote:

I would like to create a sieve filter to deliver to a folder all mail with
"leído:" in the Subject: header, but it does not work.


Because 8 bit characters are not allowed in header lines. You need to look 
for the encoded equivalent.


Sandy


Cyrus Home Page: http://asg.web.cmu.edu/cyrus
Cyrus Wiki/FAQ: http://cyruswiki.andrew.cmu.edu
List Archives/Info: http://asg.web.cmu.edu/cyrus/mailing-list.html