зеркало из https://github.com/mozilla/gecko-dev.git
fix linux bustage
This commit is contained in:
Родитель
36d75d26c9
Коммит
60afed7b1d
|
@ -717,11 +717,18 @@ MimeHeaders_convert_rfc1522(MimeDisplayOptions *opt,
|
|||
}
|
||||
|
||||
PRBool useInputCharsetConverter = opt->m_inputCharsetToUnicodeDecoder && !nsCRT::strcasecmp(inputCharset, opt->charsetForCachedInputDecoder);
|
||||
int status =
|
||||
opt->rfc1522_conversion_fn(input, input_length,
|
||||
int status;
|
||||
if (useInputCharsetConverter)
|
||||
status = opt->rfc1522_conversion_fn(input, input_length,
|
||||
inputCharset, output_charset, /* no input charset? */
|
||||
&converted, &converted_len,
|
||||
opt->stream_closure, (useInputCharsetConverter) ? opt->m_inputCharsetToUnicodeDecoder : nsnull, opt->m_unicodeToUTF8Encoder);
|
||||
opt->stream_closure, opt->m_inputCharsetToUnicodeDecoder , opt->m_unicodeToUTF8Encoder);
|
||||
else
|
||||
status = opt->rfc1522_conversion_fn(input, input_length,
|
||||
inputCharset, output_charset, /* no input charset? */
|
||||
&converted, &converted_len,
|
||||
opt->stream_closure, nsnull , opt->m_unicodeToUTF8Encoder);
|
||||
|
||||
if (status < 0)
|
||||
{
|
||||
PR_FREEIF(converted);
|
||||
|
|
|
@ -345,13 +345,23 @@ MimeInlineText_rotate_convert_and_parse_line(char *line, PRInt32 length,
|
|||
const char *inputCharset = !nsCRT::strcasecmp(input_charset, "us-ascii") ? "ISO-8859-1" : input_charset;
|
||||
PRBool useInputCharsetConverter = obj->options->m_inputCharsetToUnicodeDecoder && !nsCRT::strcasecmp(inputCharset, obj->options->charsetForCachedInputDecoder);
|
||||
|
||||
status = obj->options->charset_conversion_fn(input_autodetect, line, length,
|
||||
if (useInputCharsetConverter)
|
||||
status = obj->options->charset_conversion_fn(input_autodetect, line, length,
|
||||
inputCharset,
|
||||
"UTF-8",
|
||||
&converted,
|
||||
&converted_len,
|
||||
obj->options->stream_closure, (useInputCharsetConverter) ? obj->options->m_inputCharsetToUnicodeDecoder : nsnull,
|
||||
obj->options->stream_closure, obj->options->m_inputCharsetToUnicodeDecoder,
|
||||
obj->options->m_unicodeToUTF8Encoder);
|
||||
else
|
||||
status = obj->options->charset_conversion_fn(input_autodetect, line, length,
|
||||
inputCharset,
|
||||
"UTF-8",
|
||||
&converted,
|
||||
&converted_len,
|
||||
obj->options->stream_closure, nsnull,
|
||||
obj->options->m_unicodeToUTF8Encoder);
|
||||
|
||||
if (status < 0)
|
||||
{
|
||||
PR_FREEIF(converted);
|
||||
|
|
Загрузка…
Ссылка в новой задаче