From 5de39f7f80bca97567d7666aa1f309350501d725 Mon Sep 17 00:00:00 2001 From: "rjc%netscape.com" Date: Wed, 31 May 2000 00:28:48 +0000 Subject: [PATCH] Fix PDT+ bug # 40199: default to ISO-8859-1 encoding instead of UTF-8. Review: waterson --- .../search/src/nsInternetSearchService.cpp | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/xpfe/components/search/src/nsInternetSearchService.cpp b/xpfe/components/search/src/nsInternetSearchService.cpp index 676c006534d..333234fee75 100755 --- a/xpfe/components/search/src/nsInternetSearchService.cpp +++ b/xpfe/components/search/src/nsInternetSearchService.cpp @@ -653,7 +653,6 @@ void InternetSearchDataSource::FireTimer(nsITimer* aTimer, void* aClosure) { InternetSearchDataSource *search = NS_STATIC_CAST(InternetSearchDataSource *, aClosure); - nsresult rv; if (!search) return; #ifndef REPEATING_TIMERS @@ -662,6 +661,9 @@ InternetSearchDataSource::FireTimer(nsITimer* aTimer, void* aClosure) mTimer->Cancel(); mTimer = nsnull; } + + nsresult rv; + mTimer = do_CreateInstance("component://netscape/timer", &rv); if (NS_FAILED(rv) || (!mTimer)) return; mTimer->Init(InternetSearchDataSource::FireTimer, search, @@ -3043,7 +3045,7 @@ InternetSearchDataSource::MapEncoding(const nsString &numericEncoding, nsString { "1286", "windows-1256" }, { "1536", "us-ascii" }, { "1584", "GB2312" }, - { "1585", "x-gbk" }, + { "1585", "x-gbk" }, { "1600", "EUC-KR" }, { "2080", "ISO-2022-JP" }, { "2096", "ISO-2022-CN" }, @@ -3054,14 +3056,14 @@ InternetSearchDataSource::MapEncoding(const nsString &numericEncoding, nsString { "2368", "EUC-KR" }, { "2561", "Shift_JIS" }, { "2562", "KOI8-R" }, - { "2563", "Big5" }, + { "2563", "Big5" }, { "2565", "HZ-GB-2312" }, { nsnull, nsnull } }; - // make "UTF-8" as the default - stringEncoding.AssignWithConversion("UTF-8"); + // make "ISO-8859-1" as the default (not "UTF-8") + stringEncoding= NS_ConvertASCIItoUCS2("ISO-8859-1"); PRUint32 loop = 0; while (encodingList[loop].numericEncoding != nsnull)