Closed Bug 114891 Opened 24 years ago Closed 23 years ago

Incorrect charset used to migrate prefs.js entries

Categories

(Core Graveyard :: Profile: Migration, defect)

defect
Not set
normal

Tracking

(Not tracked)

VERIFIED FIXED

People

(Reporter: mkaply, Assigned: racham)

References

Details

Attachments

(1 file)

In nsPrefMigration.cpp, the following prefs.js entries are migrated: ldap_2.server.*.description intl.font*.fixed_font intl.font*.prop_font The migration code uses kPlatformCharsetSel_FileName to determine with which charset the values are encoded in the file prefs.js. This is wrong. kPlatformCharset_FileName is used for mapping filenames on the harddrive. There should be a new kPlatformCharset like kPlatformCharset_prefs_js for migrating prefs.js. This will be a bug on any 4.x browser that uses a different codepage for the file system vs. things in prefs.js. For instance, on OS/2, we store all our values in prefs.js in ISO-8859-1 on 4.x, but our filesystem is 850.
Naoki this sounds like we might want someone on i18n looking at this.
Status: NEW → ASSIGNED
*** Bug 122754 has been marked as a duplicate of this bug. ***
this patch adds a new enum for the codepage of the prefs.js file and uses it. The other (simpler) option is just to use 4xBookmarksFile in pref migration. That appears to cover this for all platforms.
The new selector is used in XP code nsPrefMigration.cpp, so it has to be implemented for all platforms. Mike, did you check GetCharset for other platforms? Are they all implemented to return a same value for kPlatformCharsetSel_FileName and the new one kPlatformCharsetSel_4xPrefsJS?
Actually, no platforms handle any of the kPlatformCharsetSel values except OS/2. They take the default charset (mCharset) See: http://lxr.mozilla.org/seamonkey/ident?i=GetCharset The only platform that does anything special with GetCharset at all is OS/2 which is why this change will work.
Comment on attachment 67294 [details] [diff] [review] Add new enum for prefs.js charset r=nhotta
Attachment #67294 - Flags: review+
>no platforms handle any of the kPlatformCharsetSel values except OS/2 FYI, I am implementing kPlatformCharsetSel_KeyboardInput, bug 141248
Comment on attachment 67294 [details] [diff] [review] Add new enum for prefs.js charset sr=blizzard
Attachment #67294 - Flags: superreview+
Comment on attachment 67294 [details] [diff] [review] Add new enum for prefs.js charset a=rjesup@wgate.com for branch checkin. Make sure it's in the trunk as well
Attachment #67294 - Flags: approval+
Fix checked in.
Status: ASSIGNED → RESOLVED
Closed: 23 years ago
Resolution: --- → FIXED
Verified code fix
Status: RESOLVED → VERIFIED
Product: Core → Core Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: