mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-12 12:55:46 +00:00
Changed to use charset service instead of hard coded charset names to decide mail header encoding type.
This commit is contained in:
parent
534c730d22
commit
f9b90920bb
@ -276,21 +276,10 @@ 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;
|
||||
}
|
||||
|
||||
return kMsgHeaderQEncoding;
|
||||
else
|
||||
return kMsgHeaderQEncoding;
|
||||
}
|
||||
|
||||
static PRBool stateful_encoding(const char* charset)
|
||||
|
Loading…
Reference in New Issue
Block a user