Changed to use charset service instead of hard coded charset names to decide mail header encoding type.

This commit is contained in:
nhotta%netscape.com 2000-05-05 20:31:53 +00:00
parent 534c730d22
commit f9b90920bb

View File

@ -276,20 +276,9 @@ const char kMsgHeaderBEncoding[] = "B";
const char kMsgHeaderQEncoding[] = "Q";
static const char * intl_message_header_encoding(const char* charset)
{
//TODO: make this overridable.
if (!nsCRT::strcasecmp(charset, "ISO-2022-JP") ||
!nsCRT::strcasecmp(charset, "ISO-2022-KR") ||
!nsCRT::strcasecmp(charset, "HZ-GB-2312") ||
!nsCRT::strcasecmp(charset, "Shift_JIS") ||
!nsCRT::strcasecmp(charset, "EUC-JP") ||
!nsCRT::strcasecmp(charset, "Big5") ||
!nsCRT::strcasecmp(charset, "GB2312") ||
!nsCRT::strcasecmp(charset, "EUC-KR") ||
!nsCRT::strcasecmp(charset, "UTF-7") ||
!nsCRT::strcasecmp(charset, "UTF-8")) {
if (nsMsgI18Nmultibyte_charset(charset))
return kMsgHeaderBEncoding;
}
else
return kMsgHeaderQEncoding;
}