|Subject:||Encode::MIME::Header::encode should not split on 'especials'|
Encode::MIME::Header::encode splits the string to encode on the regex '$re_especials'. This causes strings like eg 'Adapt og søn A/S' (a hypothetical but possible name for a danish firm) to be encoded as 2 lumps: '=?UTF-8?B?QWRhcHQgb2cgc8O4biBB?=/S' If this string is used as the subject field of an e-mail most mail-readers interpret it incorectly (often not decoding the encoded string). RFC2047 states in 5.1 that: Ordinary ASCII text and 'encoded-word's may appear together in the same header field. However, an 'encoded-word' that appears in a header field defined as '*text' MUST be separated from any adjacent 'encoded-word' or 'text' by 'linear-white-space'. This is obviously not the case here. I cannot see from RFC2047 any reason to split on 'especials'. The restriction (as far as I can read it) is that 'encoded-words' may not contain any of the 'especial'-characters. My suggestion would be to simplify the encoding to just split due to length - or have I misunderstood something?