[Dovecot] Found bug on doing IMAP search with UTF8 chars

A.L.E.C alec at alec.pl
Wed Sep 12 11:37:30 EEST 2012


On 09/12/2012 10:04 AM, Weinreich, Nico wrote:
> I've installed 2.1.9 from source (and Pigeonhole also). The error in Roundcube is still the same:

I've found what's really going on here. This is initial search request
with utf-8:

C: A0003 UID SORT (DATE) UTF-8 ALL OR HEADER SUBJECT {10+}
C: Lösung123 HEADER FROM {10+}
C: Lösung123
S: * SORT
S: A0003 OK Sort completed.

Now, because of a bug, fixed in commit I posted before, Roundcube sends
another request with search arguments converted to US-ASCII. It should
do this only if the first command returns "unsupported charset" response.

C: A0004 UID SORT (DATE) US-ASCII ALL OR HEADER SUBJECT {9+}
C: L.sung123 HEADER FROM {9+}
C: L.sung123
S: A0004 NO Invalid search key

The problem is that on that convertion ö is converted to character with
code 246 (hex F6), which is from extended ASCII table. This is because
in PHP (iconv/mb_string) US-ASCII means extended ASCII. So, I'll fix
this in Roundcube.

-- 
Aleksander 'A.L.E.C' Machniak
LAN Management System Developer [http://lms.org.pl]
Roundcube Webmail Developer  [http://roundcube.net]
---------------------------------------------------
PGP: 19359DC1 @@ GG: 2275252 @@ WWW: http://alec.pl



More information about the dovecot mailing list