Closed Bug 18022 Opened 25 years ago Closed 24 years ago

Storing in bookmark character set setting

Categories

(Core :: Internationalization, enhancement, P3)

enhancement

Tracking

()

VERIFIED FIXED

People

(Reporter: ezh, Assigned: ftang)

References

Details

(Whiteboard: [nsbeta2+])

In cyrillic and some other languages we have some different character set (KOI-8, Win-1251 etc. for russian). It is good to have choosing between charcater sets in bookmarks (I open a bookmark and it opens in character set that's already set to see this page correctly). Also when I store a bookmark it alredy stores in this character set in which I'm looking it at the page then I storing it. Expl: I look at www.f1-racing.ru in Win-1251 I'm storing it. And when I text time open it it is already in win-1251.
Assignee: leger → ftang
Component: Browser-General → Internationalization
QA Contact: leger → teruko
Sending over to international folks.
Assignee: ftang → waterson
waterson- I remember someone said you plan to store the charset for History/bookmark ? Is that still in your list ? Once you store in somewhere, we can implement the part which listen to the stored value. I think this is a good FER but not a bug.
Assignee: waterson → rjc
rjc knows more.
Status: NEW → RESOLVED
Closed: 25 years ago
Resolution: --- → FIXED
In mozilla, we write out charset info which is always UTF-8
I think the suggestion is to store the charset of each bookmarked page (e.g., www.f1-racing.ru in the example), NOT the charset of the bookmark data itself. So when you click on the bookmark next time, the user would not have to use the View|Character Coding menu to select the appropriate encoding). ezh@infonet.ee, Is that what you want? If so, I think we need a clearer design. Do we do this for pages that are labeled via HTTP content-type header or HTML META tags? What if the encoding of the page changes (e.g., the author converts the page from koi8 to win-1251)?
Ah, my misunderstanding. bobj, as you point out, this sounds like a bigger issue than bookmarks. Why not sniff *every* web page visited (not just bookmarked URLS) and adjust the encoding accordingly.
bobj, you are right. That's I wanted to say. I think it must be in bookmark properties (for changing it if needed etc.) I had spoken to many people and they say it would be a big-big advantage over ie.
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Per Eugene Savitsky (ezh@infonet.ee) request, I need to reopen this. I would like to make clear the issue. 1. Go to http://www.fl-racing.ru/ 2. Need to change to Charset to Windows-1251 3. Select menu Bookmarks|Add Current Page 4. Open the Bookmarks by selecting Bookmarks|Manage Bookmarks... 5. Click on http://www.f1-racing.ru/ in the Bookmarks The problem is that page is not displayed correctly unless the user changes View|Characters set to Windows-1251.
Assignee: rjc → bobj
Status: REOPENED → NEW
Again, this sounds like a bigger issue than bookmarks. Why not sniff *every* web page visited (not just bookmarked URLS) and adjust the encoding accordingly? I don't believe this should be tied to bookmarks. I'm going to reasign it back to I18N as a RFE. bobj, can you point this bug at the proper person in I18N to consider it for implementation, if not now, then at some future point... ?
Assignee: bobj → rjc
rjc, I think you misunderstand the bug. The bug is a request to store the sniffed charset into bookmark (or hisotry) so the next time we visit that page we can use that data as additional informatoin. You can get the sniffed charset result from nsIDocument through GetDocumentCharacterSet. Once the sniffed charset is stored into bookmark (or history), then we can use that value instead of the default charset. If this value is the not present, then we will use the default charset value. I agree that I18N folks should do the sniffing part. But I think it is better you folks change the bookmark and history code to store the info. After that, i18ngrp can working on the code to use that info (after you tell me how to access it) . Does that make sense ?
Assignee: rjc → bobj
It makes sense, but I don't agree that it should be done via bookmarks. If its done in bookmarks, we have to worry about the data getting out-of-date (ex: becoming invalid if the page changes), etc... therefore, I'm not inclined to do it via bookmarks.
What I wamted was: 1. Go to http://www.fl-racing.ru/ 2. Need to change to Charset to Windows-1251 3. Select menu Bookmarks|Add Current Page 4. Open the Bookmarks by selecting Bookmarks|Manage Bookmarks... 5. Click on http://www.f1-racing.ru/ in the Bookmarks 6. <b>Here I wish to be able to change the charset in which this page opens manually.<b> The problem is that page is not displayed correctly unless the user changes View|Characters set to Windows-1251. And for some reason owner can change the charset set, so I can change it myself in bookmarks.
Assignee: bobj → rjc
rjc, how often you see an URL change it's charset ? And the priority of this information will be between the default charset and the meta charset, therefore, if the html do have a html meta tag or http charset, it will listen to them after it got it. But the info from the bookmark make it a good starting point.
Assignee: rjc → bobj
No. Have the browser sniff pages and set the charset.
Just to be clear, I don't believe that the user should have to add a URL into bookmarks to get the browser to remember the desired charset (when a user selects it from the menus). If you want to "remember" the charset when a user chooses one for a particular URL, you can use RDF to do that, all from JavaScript. Have a RDF file (stored in the user's profile directory) for remembering this info. Its fully scriptable from JavaScript, you shouldn't have to write any C++ code. The user won't have to clog up their bookmarks just for remembering the default charset to view a page in, and they won't get confused as to why it works for one page (when its bookmarked) but not for another (when it isn't bookmarked).
Status: NEW → ASSIGNED
Target Milestone: M15
rjc, The RFE is NOT to use bookmarks to "remember" the charset for random pages. That would be addressed by adding this info to the cache which is http://bugzilla.mozilla.org/show_bug.cgi?id=21313 This RFE it to "remember" the charset of (unlabeled) bookmarked pages. Since the user was most likely viewing the page when adding it to the bookmarks, we already know the charset and do not need to sniff for it. We need to grab the current charset and include it with other bookmark DB info and use it as the user charset pref when this bookmark entry is clicked on in the future. You have a good point about potentially this info becoming wrong if the page changes (bug ftang points out this is probably rare). Couldn't we purge the charset info if the modified date has changed. If you agree, then I18N can provide the code to give you the charset when adding a bookmark and the code to use it as the user preferred charset. I'd assume that you would also do the modified date check and purging code. And this is not needed for Beta1!
Bob, thanks for pointing out bug # 21313 to me, that clears up my concerns. I'll happily help you guys make this work for bookmarks.
ftang, You or someone that can help rjc with grabbing the charset info, need to work with rjc on this post-Beta1.
Assignee: bobj → ftang
Status: ASSIGNED → NEW
Status: NEW → ASSIGNED
reassign to jbetak since he now also own the charset in cache bug.
Assignee: ftang → jbetak
Status: ASSIGNED → NEW
Status: NEW → ASSIGNED
Keywords: beta2
Target Milestone: M15 → M16
Keywords: nsbeta2
Putting on [nsbeta2+][5/16] radar. This is a feature MUST complete work by 05/16 or we may pull this feature for PR2.
Whiteboard: [nsbeta2+][5/16]
I completed the storage part of the feature. We still need to find consensus on the implementation details, will contact rjc and waterson today. Hope to be able to checkin tonight. Still to do: - expose the doc charset to JS - fix UpdateBookmarksLastVisitedDate() in navigator.js (currently it's most likely not working at all) - hook up the bookmark charset info to the core app, this requires JS changes to OpenBookmarkURL() in navigator.js and some additional interfaces into the browser app (need to talk to Cata)
Whiteboard: [nsbeta2+][5/16] → [nsbeta2+][5/16] - fix in hand, need review from ftang, rjc and waterson
was nsbeta2+[05/16] - renominating for nsbeta2: we had a fix around noon on 05/16, but it only got reviewed today since rjc was on a Mac developer conference. The fix is squarely contained to the bookmarks service and some JS files with bookmarks caller functions. We really need this feature, since it provides "plumbing" for later improvements in the way we "sniff" unlabeled page character coding providing "a major advantage over IE" and better overall user experience.
Whiteboard: [nsbeta2+][5/16] - fix in hand, need review from ftang, rjc and waterson → fix in hand, reviewed by rjc today
I just saw this in the comments above: - fix UpdateBookmarksLastVisitedDate() in navigator.js (currently it's most likely not working at all) Can you provide more information regarding UpdateBookmarksLastVisitedDate()? It has been working for several months.
[nsbeta2+] This is on the I18N feature exception list.
Whiteboard: fix in hand, reviewed by rjc today → [nsbeta2+] fix in hand, reviewed by rjc today
Whiteboard: [nsbeta2+] fix in hand, reviewed by rjc today → [nsbeta2+] checked in June 1, not able to fully enable the feature - waiting for 41620 to close
M16 has been out for a while now, these bugs target milestones need to be updated.
The feature land. The depend bug closed. Now is the time to turn on it.
Assignee: jbetak → ftang
Status: ASSIGNED → NEW
Whiteboard: [nsbeta2+] checked in June 1, not able to fully enable the feature - waiting for 41620 to close → [nsbeta2+]
Status: NEW → ASSIGNED
I move the priority of the bookmark/cache up to beteen meta charset and auto detection now. Close this bug.
Status: ASSIGNED → RESOLVED
Closed: 25 years ago24 years ago
Resolution: --- → FIXED
I verified this in 2000-06-30-08 Win32, Mac, and Linux build.
Status: RESOLVED → VERIFIED
Can someone explane to me how can I verify this bug? I can't see any character set in bookmark properties...
You need to log in before you can comment on or make changes to this bug.