While this is probably valid header format it might be not supported by your IMAP server. The Date header format is ASCII-only so, there's no need to encode the header value here. Because of that the server may not even try to decode Date header. Anyway, the sorting is done (in most cases) by the IMAP server, so this is not a Roundcube issue.