Closed Bug 302275 Opened 19 years ago Closed 19 years ago

newly added news server's default charset does not inherit from mailnews.view_default_charset localized preference.

Categories

(Thunderbird :: General, defect)

x86
All
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: shaohua.wen, Assigned: mscott)

Details

Attachments

(1 file)

User-Agent:       Mozilla/5.0 (X11; U; Linux i686; zh-CN; rv:1.7.7) Gecko/20050403 Firefox/1.0.3
Build Identifier: Mozilla/5.0 (X11; U; Linux i686; zh-CN; rv:1.7.7) Gecko/20050403 Firefox/1.0.3

In Thunderbird 1.0+ zh-CN builds,we have set mailnews.view_default_charset to
GB2312,but when I added a new news server,the default charset for this server is
set to: chrome://messenger/locale/messenger.properties but not GB2312.

see https://bugzilla.mozilla.org/show_bug.cgi?id=126453#c150


Reproducible: Always

Steps to Reproduce:



Expected Results:  
when add new news server,it's default charset should be set to the localized
mailnews.view_default_charset value.
Attached patch get localized pref. β€” β€” Splinter Review
Attachment #190649 - Flags: review?(jshin1987)
Comment on attachment 190649 [details] [diff] [review]
get localized pref.

>--- mozilla/mailnews/news/src/nsNntpIncomingServer.cpp.bak	2005-07-27 08:31:39.000000000 +0000
>+++ mozilla/mailnews/news/src/nsNntpIncomingServer.cpp	2005-07-27 08:31:46.000000000 +0000
>@@ -325,17 +325,17 @@ nsNntpIncomingServer::GetCharset(nsACStr
> 	nsXPIDLCString serverCharset;
> 	//first we get the per-server settings mail.server.<serverkey>.charset
> 	rv = GetCharValue("charset",getter_Copies(serverCharset));
> 
> 	//if the per-server setting is empty,we get the default charset from 
> 	//mailnews.view_default_charset setting and set it as per-server preference.
> 	if(serverCharset.IsEmpty()){
> 		nsXPIDLString defaultCharset;
>-		rv = NS_GetUnicharPreferenceWithDefault(nsnull,
>+		rv = NS_GetLocalizedUnicharPreferenceWithDefault(nsnull,
> 		                                        PREF_MAILNEWS_VIEW_DEFAULT_CHARSET,
> 												NS_LITERAL_STRING("ISO-8859-1"),
> 												defaultCharset);

Why is the indentation so strange here? Your backup file seems different from
what we have in the cvs. The cvs version doesn't have this strange indentation.
Does your editor somehow convert spaces to tabs automatically? Please, make
sure to preserve the original indentation.
Attachment #190649 - Flags: superreview?(bienvenu)
Attachment #190649 - Flags: review?(jshin1987)
Attachment #190649 - Flags: review+
I cannot access cvs by now to update the files,So the indent might be different
from the cvs.
Could you please help to checkin the correct file later?
Really thanks a lot!
Attachment #190649 - Flags: superreview?(bienvenu) → superreview+
Comment on attachment 190649 [details] [diff] [review]
get localized pref.

asking for approval. 
This was a low-risk patch to complete the patch for bug 126453.

I'll take care of the indentation when landing.
Attachment #190649 - Flags: approval1.8b4?
Attachment #190649 - Flags: approval1.8b4? → approval1.8b4+
landed
Status: UNCONFIRMED → RESOLVED
Closed: 19 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: