Closed Bug 256409 Opened 21 years ago Closed 21 years ago

bookmarks file path with non-ASCII characters doesn't work

Categories

(SeaMonkey :: Bookmarks & History, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: jshin1987, Assigned: jshin1987)

Details

(Keywords: fixed-aviary1.0, fixed1.7.5, intl)

Attachments

(2 files, 1 obsolete file)

'GetCharPref' or 'CopyCharPref' is used to retrieve the path of bookmarks file. Both APIs can only deal with 'string' (of unspecified encoding. Well, actually, it's UTF-8). We should use GetComplexValue, instead.
I'm not using nsILocalFile directly because the implementation of GetComplexValue with nsILocalFile is broken. Or depending on the point of view, one might say implementations of SetPersistentProperties is broken in nsLocalFileXXX.cpp
Comment on attachment 156681 [details] [diff] [review] patch for both seamonkey and aviary asking for r/sr
Attachment #156681 - Flags: superreview?(jag)
Attachment #156681 - Flags: review?(p_ch)
Attachment #156681 - Flags: superreview?(jag) → superreview+
Attachment #156681 - Flags: superreview+ → superreview?(jag)
Comment on attachment 156681 [details] [diff] [review] patch for both seamonkey and aviary And we should use GetComplexValue + NS_NewLocalFile because NS_NewNativeLocalFile expects the path in the OS's native character encoding? That makes sense. Shouldn't you change http://lxr.mozilla.org/seamonkey/source/xpfe/components/bookmarks/resources/boo kmarksManager.js#147 to set it as a complex value then, or does that store it as UTF-8, which will (or should?) automatically get converted to UTF-16 when we GetComplexValue? Re: nsILocalFile and prefs, please file a bug describing how it's broken.
(In reply to comment #3) > Shouldn't you change >http://lxr.mozilla.org/seamonkey/source/xpfe/components/bookmarks/resources/bookmarksManager.js#147 > to set it as a complex value then, or does that store it Thanks. You're absolutely right. I should have done that, too. I'll upload a new patch. > Re: nsILocalFile and prefs, please file a bug describing how it's broken. I filed bug 256410 for that.
Attachment #156681 - Flags: superreview?(jag)
Attachment #156681 - Flags: review?(p_ch)
took care of bookmarksManager.js (thanks, jag)
Attachment #156681 - Attachment is obsolete: true
Comment on attachment 156710 [details] [diff] [review] patch v2 (include bookmarksManager.js) asking for r/sr
Attachment #156710 - Flags: superreview?(jag)
Attachment #156710 - Flags: review?(p_ch)
Comment on attachment 156710 [details] [diff] [review] patch v2 (include bookmarksManager.js) sr=jag
Attachment #156710 - Flags: superreview?(jag) → superreview+
Attachment #156710 - Flags: review?(p_ch) → review+
fix checked into the trunk. i'll ask for aviary-1.0 and 1.7 branch approval after testing with branch trees which I don't have handy at the moment
Status: NEW → RESOLVED
Closed: 21 years ago
Resolution: --- → FIXED
Comment on attachment 156710 [details] [diff] [review] patch v2 (include bookmarksManager.js) >+ nsXPIDLString bookmarksFile; >+ prefVal->ToString(getter_Copies(bookmarksFile)); Nit: I think using an nsString would be more efficient here, as GetData would only share the internal buffer rather than copying it.
You meant it'd be more efficient this way ? nsString bookmarksFile; prefValue->GetData(bookmarksFile); http://lxr.mozilla.org/seamonkey/source/xpcom/ds/nsSupportsPrimitives.cpp#158
(In reply to comment #9) > Nit: I think using an nsString would be more efficient here, as GetData would > only share the internal buffer rather than copying it. But use nsAutoString, which is more efficient if the function's impl does not do string sharing > You meant it'd be more efficient this way ? yes.
Per Neil's and Christian's comment. I've already checked in the difference between attachment 156710 [details] [diff] [review] and this patch. I'm uploading this to get a1.7 and a-aviary1.0
Comment on attachment 158632 [details] [diff] [review] patch v3 (with GetData) carrying over r/sr and asking for a1.7 and a-aviary This patch (sans GetData()) on the trunk was already verified by a Korean user. English-speaking users wouldn't be affected at all. Non-English speaking users with their bookmarks file at a custom location (with non-ASCII characters) would be happy to see this fixed.
Attachment #158632 - Flags: superreview+
Attachment #158632 - Flags: review+
Attachment #158632 - Flags: approval1.7.x?
Attachment #158632 - Flags: approval-aviary?
Comment on attachment 158632 [details] [diff] [review] patch v3 (with GetData) a=asa (on behalf of the aviary team and drivers) for checkin to the aviary branch and the 1.7 branch.
Attachment #158632 - Flags: approval1.7.x?
Attachment #158632 - Flags: approval1.7.x+
Attachment #158632 - Flags: approval-aviary?
Attachment #158632 - Flags: approval-aviary+
This bug seems to have an aviary branch checkin associated with it. If this has landed on the aviary branch (as much as it's going to for 1.0) can you please add the "fixed-aviary1.0" keyword? Thanks.
Adding keywords for branch landing
Product: Browser → Seamonkey
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: