diff --git a/netwerk/streamconv/converters/nsIndexedToHTML.cpp b/netwerk/streamconv/converters/nsIndexedToHTML.cpp
index 31d3537e78b..4f2a5231de0 100644
--- a/netwerk/streamconv/converters/nsIndexedToHTML.cpp
+++ b/netwerk/streamconv/converters/nsIndexedToHTML.cpp
@@ -522,19 +522,22 @@ nsIndexedToHTML::OnIndexAvailable(nsIRequest *aRequest,
pushBuffer.Append(NS_LITERAL_STRING("\n
"));
} else {
nsAutoString formatted;
+ nsAutoString strNCR; // use NCR to show date in any doc charset
mDateTime->FormatPRTime(nsnull,
kDateFormatShort,
kTimeFormatNone,
t,
formatted);
- pushBuffer.Append(formatted);
+ ConvertNonAsciiToNCR(formatted, strNCR);
+ pushBuffer.Append(strNCR);
pushBuffer.Append(NS_LITERAL_STRING(" | \n "));
mDateTime->FormatPRTime(nsnull,
kDateFormatNone,
kTimeFormatSeconds,
t,
formatted);
- pushBuffer.Append(formatted);
+ ConvertNonAsciiToNCR(formatted, strNCR);
+ pushBuffer.Append(strNCR);
}
pushBuffer.Append(NS_LITERAL_STRING(" | \n\n"));