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)
SeaMonkey
Bookmarks & History
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)
|
4.72 KB,
patch
|
p_ch
:
review+
jag+mozilla
:
superreview+
|
Details | Diff | Splinter Review |
|
4.68 KB,
patch
|
jshin1987
:
review+
jshin1987
:
superreview+
asa
:
approval-aviary+
asa
:
approval1.7.5+
|
Details | Diff | Splinter Review |
'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.
| Assignee | ||
Comment 1•21 years ago
|
||
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
| Assignee | ||
Comment 2•21 years ago
|
||
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)
Updated•21 years ago
|
Attachment #156681 -
Flags: superreview?(jag) → superreview+
Updated•21 years ago
|
Attachment #156681 -
Flags: superreview+ → superreview?(jag)
Comment 3•21 years ago
|
||
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.
| Assignee | ||
Comment 4•21 years ago
|
||
(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.
| Assignee | ||
Updated•21 years ago
|
Attachment #156681 -
Flags: superreview?(jag)
Attachment #156681 -
Flags: review?(p_ch)
| Assignee | ||
Comment 5•21 years ago
|
||
took care of bookmarksManager.js (thanks, jag)
Attachment #156681 -
Attachment is obsolete: true
| Assignee | ||
Comment 6•21 years ago
|
||
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 7•21 years ago
|
||
Comment on attachment 156710 [details] [diff] [review]
patch v2 (include bookmarksManager.js)
sr=jag
Attachment #156710 -
Flags: superreview?(jag) → superreview+
Updated•21 years ago
|
Attachment #156710 -
Flags: review?(p_ch) → review+
| Assignee | ||
Comment 8•21 years ago
|
||
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 9•21 years ago
|
||
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.
| Assignee | ||
Comment 10•21 years ago
|
||
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
Comment 11•21 years ago
|
||
(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.
| Assignee | ||
Comment 12•21 years ago
|
||
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
| Assignee | ||
Comment 13•21 years ago
|
||
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 14•21 years ago
|
||
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+
Comment 15•21 years ago
|
||
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.
| Assignee | ||
Comment 16•21 years ago
|
||
Adding keywords for branch landing
Keywords: fixed-aviary1.0,
fixed1.7
Updated•21 years ago
|
Keywords: fixed1.7 → fixed1.7.x
Updated•21 years ago
|
Product: Browser → Seamonkey
You need to log in
before you can comment on or make changes to this bug.
Description
•