Re: [Q] attachment charset?



On Sun 17:39, 26 May 2002 Albrecht Dreß wrote:
> Hi,
> 
> I noticed that since recent versions of balsa attachments always seem to 
> have the charset "unknown-8bit", e.g.:
> 
> : Content-Type: message/rfc822; charset=unknown-8bit
> : Content-Disposition: inline
> : Content-Transfer-Encoding: 8bit
> 
> This may be misleading (if the attachment is base64 or qouted-printable 
> encoded), and it is wrong for message/rfc822 which (if I remember the rfc 
> correctly) should (or must?) have 7bit.
> 
> Any ideas?

Just checked RFC 2046.  The charset parameter must be a IANA registered 
token.  2046 mentions US-ASCII and ISO-8859-X where X is a number.  And as 
usual ...

    No character set name other than those defined above may be used in
    Internet mail without the publication of a formal specification and
    its registration with IANA, or by private agreement, in which case
    the character set name must begin with "X-".

IANA registers the following ...

Big5-HKSCS CESU-8 GB18030 GBK IBM00858 IBM00924 IBM01140 IBM01141 IBM01142 
IBM01143 IBM01144 IBM01145 IBM01146 IBM01147 IBM01148 IBM01149 ibm775 ibm866 
iso-8859-13 iso-8859-14 iso-8859-16 SCSU tis-620 UTF-16 UTF-16BE UTF-16LE 
UTF-32 UTF-32BE UTF-32LE windows-1250 windows-1251 windows-1252 windows-1253 
windows-1254 windows-1255 windows-1256 windows-1257 windows-1258

... "unknown-8bit" is clearly not one of them (interestingly, neither is 
"UTF-8").  To be standards compliant, balsa must either put an X- in front of 
unknown-8bit or just omit the charset parameter if it cannot be determined.  
Another UA will not know how to interpret the unknown-8bit anyway and will 
revert to default, or worse not handle it at all.

The use of "unknown-8bit" means that balsa is abusing MIME by adding 
non-standard, non-portable extensions.  The charset parameter should be 
omitted if it cannot be determined or is not appropriate to the content type.  
In most cases only content with type text/* requires the charset parameter.

Brian



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]