Closed
Bug 44011
Opened 26 years ago
Closed 26 years ago
the bookmark charset does not work correctly if we select sidebar first
Categories
(Core :: Internationalization, defect, P2)
Core
Internationalization
Tracking
()
VERIFIED
FIXED
People
(Reporter: ftang, Assigned: shanjian)
Details
(Whiteboard: nsbeta3+, fix checked in)
Attachments
(1 file)
|
1.32 KB,
patch
|
Details | Diff | Splinter Review |
somehow the bookmark charset updating code does not get the correct charset,
instead it always get UTF-8, if we select something in the sidebar first and
then select the bookmark from the menu.
| Reporter | ||
Updated•26 years ago
|
Priority: P3 → P2
Whiteboard: nsbeta3+
| Reporter | ||
Comment 2•26 years ago
|
||
nsbeta3+ per bug meeting. Mark it as P2
| Reporter | ||
Comment 3•26 years ago
|
||
This is related to the focus window. If we select the bookmark from the sidebar,
then the focused window are set to the sidebar, and the document of the focus
window is the bookmark listing instead of the newly loaded document. Reassign
this to shanjian
shanjian, could you please take a look at this ? The code which cause this bug
is in xpfe/browser/resources/content/navigator.js
The following function have problem-
142 function UpdateBookmarksLastVisitedDate(event)
143 {
144 if ((window._content.location.href) &&
(window._content.location.href != ""))
145 {
146 try
147 {
148
149 var wnd = document.commandDispatcher.focusedWindow;
150 if (window == wnd) wnd = window._content;
151 var docCharset = wnd.document.characterSet;
152
153 // if the URL is bookmarked, update its "Last
Visited" date
154 var bmks =
Components.classes["component://netscape/browser/bookmarks-service"].getService(
);
155 if (bmks) bmks =
bmks.QueryInterface(Components.interfaces.nsIBookmarksService);
156 if (bmks)
bmks.UpdateBookmarkLastVisitedDate(window._content.location.href, docCharset);
157 }
158 catch(ex)
159 {
160 dump("failed to update bookmark last visited
date.\n");
161 }
162 }
163 }
put a
dump(docCharset + "\n");
in line 152 and you will see we get UTF-8 when we select it from the sidebar
boomark listing and the *correct* charet if we select from bookmark menu.
Assignee: ftang → shanjian
Status: ASSIGNED → NEW
| Reporter | ||
Comment 4•26 years ago
|
||
shanjian have difficult to reporduce this. I need to retest this. Leave it as
P2.
| Reporter | ||
Comment 5•26 years ago
|
||
to reproduce
1. launch Netscape6
2. visit http://www.yahoo.co.jp
3. change your encidng to Japanse (EUC-JP)
4. add it to bookmark
5. go to other pages
6. change your encoding to others (say ISO-8859-1)
7. Select that yahoo page from the sidebar (not from boomark menu)
8. you should see it display correctly
9. go to other pages
10. select the yahoo page (from sidebar or bookmark)
11. you see the yahoo page display incorrectly
If you do step 7 by using bookmark menu then step 11 will be correct.
What happen is in step 8, we change the in-memory charset value in the bookmark
data source to UTF-8 because the focused window is the sidebar bookmark tree.
and the document of the sidebar bookmark tree is UTF-8. If you select it from
the bookmark menu, then the focused window is the content area and the document
charset is the one we load, which is EUC-JP.
| Assignee | ||
Comment 6•26 years ago
|
||
| Reporter | ||
Comment 7•26 years ago
|
||
r=ftang. Check it in.
Whiteboard: nsbeta3+ → nsbeta3+, fix in hand and reviewed. Wait till tree open
| Assignee | ||
Updated•26 years ago
|
Status: NEW → ASSIGNED
| Assignee | ||
Comment 8•26 years ago
|
||
fix checked in
Status: ASSIGNED → RESOLVED
Closed: 26 years ago
Resolution: --- → FIXED
Whiteboard: nsbeta3+, fix in hand and reviewed. Wait till tree open → nsbeta3+, fix checked in
Comment 9•26 years ago
|
||
I verified this in 2000-09-06-08 Win32 and Linux, and 2000-09-07-04 Mac build.
Status: RESOLVED → VERIFIED
You need to log in
before you can comment on or make changes to this bug.
Description
•