Author Topic: Charset problem with search  (Read 5259 times)

Offline nooooord

  • Newbie
  • *
  • Posts: 4
Charset problem with search
« on: November 02, 2012, 09:12:27 AM »
Hi all. When I search with quick search by the recipients, I dont see cp1251-encoded (cyrillic) recipients.

For example:
Visible:
To: =?UTF-8?Q?=D0=B8=D0=BB=D1=8C=D1=8F_=D1=83=D1=88=D0=B0=D0=BA=D0=BE?=
=?UTF-8?Q?=D0=B2?= <ushakov777@mail.ru>

Not visible:
To: =?Windows-1251?B?6Ov8/yDz+ODq7uI=?= <ushakov777@mail.ru>

IMAP-log (found 1 UTF-message and not found 5 Win-1251-messages)
Code: [Select]
[02-Nov-2012 12:45:51 +0400]: [A770] S: * OK bsd Cyrus IMAP4 v2.2.13-Debian-2.2.13-19+squeeze3 server ready
[02-Nov-2012 12:45:51 +0400]: [A770] C: A0001 CAPABILITY
[02-Nov-2012 12:45:51 +0400]: [A770] S: * CAPABILITY IMAP4 IMAP4rev1 ACL QUOTA LITERAL+ NAMESPACE UIDPLUS ID NO_ATOMIC_RENAME UNSELECT CHILDREN MULTIAPPEND BINARY SORT THREAD=ORDEREDSUBJECT THREAD=REFERENCES ANNOTATEMORE IDLE
[02-Nov-2012 12:45:51 +0400]: [A770] S: A0001 OK Completed
[02-Nov-2012 12:45:51 +0400]: [A770] C: A0002 ID ("name" "Roundcube Webmail" "version" "0.8.1" "php" "5.3.3-7+squeeze14" "os" "Linux" "command" "/?_task=mail&_action=search&_filter=ALL&_q=%D0%B3%D1%80%D0%B8&_headers=from&_mbox=INBOX&_remote=1&_unlock=loading1351846405297&_=1351846405300")
[02-Nov-2012 12:45:51 +0400]: [A770] S: A0002 NO Only one Id allowed in non-authenticated state
[02-Nov-2012 12:45:51 +0400]: [A770] C: A0003 LOGIN admin ******
[02-Nov-2012 12:45:51 +0400]: [A770] S: A0003 OK User logged in
[02-Nov-2012 12:45:51 +0400]: [A770] C: A0004 SELECT INBOX
[02-Nov-2012 12:45:51 +0400]: [A770] S: * FLAGS (\Answered \Flagged \Draft \Deleted \Seen $Forwarded $MDNSent Junk NonJunk)
[02-Nov-2012 12:45:51 +0400]: [A770] S: * OK [PERMANENTFLAGS (\Answered \Flagged \Draft \Deleted \Seen $Forwarded $MDNSent Junk NonJunk \*)]
[02-Nov-2012 12:45:51 +0400]: [A770] S: * 254 EXISTS
[02-Nov-2012 12:45:51 +0400]: [A770] S: * 0 RECENT
[02-Nov-2012 12:45:51 +0400]: [A770] S: * OK [UIDVALIDITY 1317727652]
[02-Nov-2012 12:45:51 +0400]: [A770] S: * OK [UIDNEXT 12459]
[02-Nov-2012 12:45:51 +0400]: [A770] S: A0004 OK [READ-WRITE] Completed
[02-Nov-2012 12:45:51 +0400]: [A770] C: A0005 UID SORT (DATE) UTF-8 ALL UNDELETED HEADER FROM {6+}
[02-Nov-2012 12:45:51 +0400]: [A770] C: гри
[02-Nov-2012 12:45:51 +0400]: [A770] S: * SORT 12388
[02-Nov-2012 12:45:51 +0400]: [A770] S: A0005 OK Completed (1 msgs in 0.000 secs)
[02-Nov-2012 12:45:51 +0400]: [A770] C: A0006 UID FETCH 12388 (UID RFC822.SIZE FLAGS INTERNALDATE BODY.PEEK[HEADER.FIELDS (DATE FROM TO SUBJECT CONTENT-TYPE CC REPLY-TO LIST-POST DISPOSITION-NOTIFICATION-TO X-PRIORITY)])
[02-Nov-2012 12:45:51 +0400]: [A770] S: * 199 FETCH (FLAGS (\Answered \Seen) UID 12388 INTERNALDATE "20-Sep-2012 14:17:20 +0400" RFC822.SIZE 4415 BODY[HEADER.FIELDS (DATE FROM TO SUBJECT CONTENT-TYPE CC REPLY-TO LIST-POST DISPOSITION-NOTIFICATION-TO X-PRIORITY)] {389}
[02-Nov-2012 12:45:51 +0400]: [A770] S: Subject: =?UTF-8?B?UkU6INCf0YDQvtCx0LvQtdC80Ysg0YEg0LrQsNGA0YLQvtC5LiDQl9CfLQ==?=
[02-Nov-2012 12:45:51 +0400]: [A770] S: )
[02-Nov-2012 12:45:51 +0400]: [A770] S: A0006 OK Completed (0.000 sec)
[02-Nov-2012 12:45:51 +0400]: [A770] C: A0007 LOGOUT
[02-Nov-2012 12:45:51 +0400]: [A770] S: * BYE LOGOUT received
[02-Nov-2012 12:45:51 +0400]: [A770] S: A0007 OK Completed


Plz help me. I suspect files rcube_result_index.php and rcube_imap.php. Thanks in advance.
« Last Edit: November 02, 2012, 09:18:24 AM by nooooord »

Offline alec

  • Hero Member
  • *****
  • Posts: 1,363
Re: Charset problem with search
« Reply #1 on: November 03, 2012, 03:54:45 PM »
Hi all. When I search with quick search by the recipients, I dont see cp1251-encoded (cyrillic) recipients.
Code: [Select]
[02-Nov-2012 12:45:51 +0400]: [A770] S: * OK bsd Cyrus IMAP4 v2.2.13-Debian-2.2.13-19+squeeze3 server ready
[02-Nov-2012 12:45:51 +0400]: [A770] C: A0005 UID SORT (DATE) UTF-8 ALL UNDELETED HEADER FROM {6+}
[02-Nov-2012 12:45:51 +0400]: [A770] C: гри
[02-Nov-2012 12:45:51 +0400]: [A770] S: * SORT 12388
[02-Nov-2012 12:45:51 +0400]: [A770] S: A0005 OK Completed (1 msgs in 0.000 secs)
As you can see here it's your IMAP server. It finds only one message. It is also a very old version of Cyrus.

Offline nooooord

  • Newbie
  • *
  • Posts: 4
Re: Charset problem with search
« Reply #2 on: November 04, 2012, 02:42:09 PM »
Well, yes. Very old, but this is last version in Debian repo. Anyway if this is IMAP-server problem, why it works in Thunderbird? It shows 5 messages with the same request.

Offline alec

  • Hero Member
  • *****
  • Posts: 1,363
Re: Charset problem with search
« Reply #3 on: November 05, 2012, 02:31:12 AM »
Just because Thunderbird implements searching in a different way, e.g. by searching in local cache or using SEARCH instead of SORT.

Offline nooooord

  • Newbie
  • *
  • Posts: 4
Re: Charset problem with search
« Reply #4 on: November 05, 2012, 03:47:46 AM »
Oh, i see. Does RC have any plugin which provides that 'search by cache'? It would be very useful.

Offline SKaero

  • Administrator
  • Hero Member
  • *****
  • Posts: 5,868
    • SKaero - Custom Roundcube development
Re: Charset problem with search
« Reply #5 on: November 06, 2012, 01:48:05 AM »
RoundCube doen't keep a full mail cache like Thunderbird so its not possible.