yahoo / imapnio

Java imap nio client that is designed to scale well for thousands of connections per machine and reduce contention when using large number of threads and cpus.
57 stars 50 forks source link

List response with no UTF8 capability #170

Open tolikbotov opened 3 weeks ago

tolikbotov commented 3 weeks ago

Description

I have an ICloud account. I named a folder by 'Dubai Co Setup & Real Estate'.

ICloud server returns this name like 'Dubai Co Setup &- Real Estate', i.e. it encodes '&' to '&-'.

'com.sun.mail.imap.protocol.ListInfo:99' has support such names, but it relates on 'utf8' support flag.

I believe, this flag is set if an imap server has 'UTF8' capability. But Library do nothing to detect it.

Expected Behavior

I believe, library should detect 'UTF8' support and if it's missing set flag 'utf8' in IMAPResponse as 'false'.

Actual Behavior

Library ignores capability and set supportsUtf8 as true in any case.

Possible Fix

Library should replace ImapClientRespDecoder or provide a way to tell it - utf8 is not supported.

Steps to Reproduce

  1. Take icloud imap account
  2. Create folder with name, like 'abs & zxc'
  3. List folders, you will see 'abs &- zxc'. SHould be 'abs & zxc'.

Context

I want to see right folder name.

Your Environment

tolikbotov commented 3 weeks ago

Oh I missed something? Can you help?