зеркало из https://github.com/mozilla/gecko-dev.git
Fix PDT+ bug # 40199: default to ISO-8859-1 encoding instead of UTF-8. Review: waterson
This commit is contained in:
Родитель
01054862c6
Коммит
5839bd125c
|
@ -653,7 +653,6 @@ void
|
||||||
InternetSearchDataSource::FireTimer(nsITimer* aTimer, void* aClosure)
|
InternetSearchDataSource::FireTimer(nsITimer* aTimer, void* aClosure)
|
||||||
{
|
{
|
||||||
InternetSearchDataSource *search = NS_STATIC_CAST(InternetSearchDataSource *, aClosure);
|
InternetSearchDataSource *search = NS_STATIC_CAST(InternetSearchDataSource *, aClosure);
|
||||||
nsresult rv;
|
|
||||||
if (!search) return;
|
if (!search) return;
|
||||||
|
|
||||||
#ifndef REPEATING_TIMERS
|
#ifndef REPEATING_TIMERS
|
||||||
|
@ -662,6 +661,9 @@ InternetSearchDataSource::FireTimer(nsITimer* aTimer, void* aClosure)
|
||||||
mTimer->Cancel();
|
mTimer->Cancel();
|
||||||
mTimer = nsnull;
|
mTimer = nsnull;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
nsresult rv;
|
||||||
|
|
||||||
mTimer = do_CreateInstance("component://netscape/timer", &rv);
|
mTimer = do_CreateInstance("component://netscape/timer", &rv);
|
||||||
if (NS_FAILED(rv) || (!mTimer)) return;
|
if (NS_FAILED(rv) || (!mTimer)) return;
|
||||||
mTimer->Init(InternetSearchDataSource::FireTimer, search,
|
mTimer->Init(InternetSearchDataSource::FireTimer, search,
|
||||||
|
@ -3060,8 +3062,8 @@ InternetSearchDataSource::MapEncoding(const nsString &numericEncoding, nsString
|
||||||
{ nsnull, nsnull }
|
{ nsnull, nsnull }
|
||||||
};
|
};
|
||||||
|
|
||||||
// make "UTF-8" as the default
|
// make "ISO-8859-1" as the default (not "UTF-8")
|
||||||
stringEncoding.AssignWithConversion("UTF-8");
|
stringEncoding= NS_ConvertASCIItoUCS2("ISO-8859-1");
|
||||||
|
|
||||||
PRUint32 loop = 0;
|
PRUint32 loop = 0;
|
||||||
while (encodingList[loop].numericEncoding != nsnull)
|
while (encodingList[loop].numericEncoding != nsnull)
|
||||||
|
|
Загрузка…
Ссылка в новой задаче