Closed
Bug 66020
Opened 25 years ago
Closed 24 years ago
add CJK/intl support to GtkEmbed
Categories
(Core :: Internationalization, defect)
Tracking
()
VERIFIED
FIXED
mozilla0.9.1
People
(Reporter: bstell, Assigned: bstell)
References
Details
Attachments
(8 files)
|
1.81 KB,
patch
|
Details | Diff | Splinter Review | |
|
409 bytes,
text/plain
|
Details | |
|
1.93 KB,
patch
|
Details | Diff | Splinter Review | |
|
127.71 KB,
patch
|
Details | Diff | Splinter Review | |
|
New patch: only applicable for this bug. Using nsICategoryManager to start up the MetaCharsetService
2.96 KB,
patch
|
Details | Diff | Splinter Review | |
|
1.44 KB,
patch
|
Details | Diff | Splinter Review | |
|
1.68 KB,
patch
|
Details | Diff | Splinter Review | |
|
3.43 KB,
patch
|
Details | Diff | Splinter Review |
we need someway to support non-latin1 display and non-latin1 applications in
GtkEmbed.
- need converters to convert CJK, etc. to Unicode
- need ability to set default encoding (ie: a menu item)
- need ability to set override encoding (ie: a menu item)
- need abilit to set the font for a particular language
| Assignee | ||
Updated•25 years ago
|
Status: NEW → ASSIGNED
Target Milestone: --- → mozilla0.8
| Assignee | ||
Comment 1•25 years ago
|
||
missing i18n libs:
libchardet.so required for meta-charset to work
libucvcn.so required for Chinese
libucvibm.so required for IBM encodings
libucvja.so required for Japanese
libucvko.so required for Korean
libucvtw.so required for Chinese
libucvtw2.so required for Chinese
| Assignee | ||
Comment 2•25 years ago
|
||
these i18n libs need to be copied/symlinked into the
mozilla/dist/Embed/components dir.
Comment 3•25 years ago
|
||
is there some way to select the converters we need (at build time? perhaps
a built flag?) rather than dropping all of them in. gtkEmbed is a lightweight
example of embedding and if clients use it to do any sizing info, it would be
good if it didn't include extra libs.
| Assignee | ||
Comment 4•25 years ago
|
||
| Assignee | ||
Comment 5•25 years ago
|
||
| Assignee | ||
Comment 6•25 years ago
|
||
| Assignee | ||
Comment 7•25 years ago
|
||
The changes to Makefile.in, basebrowser-unix, and the new file
basebrowserintl-unix allows a developer to control the installation of the intl
converter libs.
The change to nsEmbedAPI.cpp starts/stops the metacharset detection service.
Comment 8•25 years ago
|
||
what exactly does the metacharset service do?
Comment 9•25 years ago
|
||
it seems to me that the parser would know when to fire up the meta charset
stuff; no?
| Assignee | ||
Comment 10•25 years ago
|
||
the windows equivlant of this bug is
http://bugzilla.mozilla.org/show_bug.cgi?id=66030
| Assignee | ||
Comment 11•25 years ago
|
||
there is a long (not always technical) history to the design.
a per document redesign would be nice.
Comment 12•25 years ago
|
||
I think there may be a better way to init this service. investigating.
| Assignee | ||
Comment 13•25 years ago
|
||
in mozilla the metacharset service gets called at startup:
Here is the stack when the metacharset gets started:
main (nsAppRunner.cpp#1198)
calls main1 at nsAppRunner.cpp#1272
main1 (nsAppRunner.cpp#811)
calls nsAppShellService::Initialize at nsAppRunner.cpp#933
nsAppShellService::Initialize (nsAppShellService.cpp#123)
calls NS_WITH_SERVICE(nsIMetaCharsetService,... at nsAppShellService.cpp#139
Comment 14•25 years ago
|
||
understood. doug and I are suggesting that this model is wrong though. isn't
there some lower level event that occurs that would be a more appropriate tie
in?
| Assignee | ||
Comment 15•25 years ago
|
||
Isn't this bug is about:
"a feature that works in mozilla does not work in embedding"
If we want to request a redesign of how it gets done in mozilla shouldn't we
open a separate bug?
Comment 16•25 years ago
|
||
bstell's right, this has morphed.
I've opened up seperate bugs for the bigger problem:
http://bugzilla.mozilla.org/show_bug.cgi?id=67576
http://bugzilla.mozilla.org/show_bug.cgi?id=67578
Comment 17•25 years ago
|
||
I've made 67576 a blocker of this one. the changes in nsEmbedAPI.cpp put build
time dependencies on low level services. embedAPI is for high level, app
specific, necessities.
| Assignee | ||
Updated•25 years ago
|
Target Milestone: mozilla0.8 → mozilla0.9
Comment 18•24 years ago
|
||
Changed QA Contact to andreasb@netscape.com for now.
QA Contact: teruko → andreasb
Comment 19•24 years ago
|
||
why 67576 is blocking this one ? IS this a meta tracking bug ? Can we do 67576
after moz 0.9 and finish other thing in this bug first ?
Comment 20•24 years ago
|
||
67576 blocks this because that needs to be done in order for observer
registration to occur implicitly. The mods to nsEmbedAPI.cpp are invalid. You
can't add random components to startup like this. 67576 could be removed as a
blocker of this, if the charset service used our new (almost checked in)
startup category. It's up to i18n which route they want to take, either 68720
blocks this, or 67576 blocks this.
Comment 21•24 years ago
|
||
Jud: Can you explain what the new startup category (2001-03-01 13:07) is?
I am finishing up the blocker 67576; but I am not sure if I am covering
your new stuff. Bug 67576 is simply to convert CharDet to use NS_GETMODULE().
Please let us know. :)
Comment 22•24 years ago
|
||
Got more info about thenew startup category. See
http://lxr.mozilla.org/seamonkey/search?string=APPSTARTUP_CATEG
Comment 23•24 years ago
|
||
Comment 24•24 years ago
|
||
Above patch includes the patch for the blocker 67576.
I am waiting for /sr= for 67576.
If you like to see what the patch for this bug, here it is.
(only few changes in nsCharDetModule.cpp and nsMetaCharsetObserver.cpp)
This works great. I tested in winEmbed. Now it automatically registers
the MetaCharsetDetector and it can display the www.netscape.com/ja correctly.
================ nsCharDetModule.cpp =======================================
+#include "nsIAppStartupNotifier.h"
+#include "nsICategoryManager.h"
+static NS_METHOD nsMetaCharsetObserverRegistrationProc(nsIComponentManager
*aCompMgr,
+ nsIFile *aPath,
+ const char *registryLocation,
+ const char *componentType,
+ const nsModuleComponentInfo *info)
+{
+ nsresult rv;
+ nsCOMPtr<nsICategoryManager>
+ categoryManager(do_GetService("@mozilla.org/categorymanager;1", &rv));
+ if (NS_SUCCEEDED(rv)) {
+ rv = categoryManager->AddCategoryEntry(APPSTARTUP_CATEGORY, "Meta Charset",
+ "service," NS_META_CHARSET_CONTRACTID,
+ PR_TRUE, PR_TRUE,
+ nsnull);
+ }
+ return rv;
+}
// Component Table
static nsModuleComponentInfo components[] =
{
{ "Meta Charset", NS_META_CHARSET_CID,
NS_META_CHARSET_CONTRACTID, nsMetaCharsetObserverConstructor,
- NULL, NULL},
+ nsMetaCharsetObserverRegistrationProc, NULL},
{ "Document Charset Info", NS_DOCUMENTCHARSETINFO_CID,
NS_DOCUMENTCHARSETINFO_CONTRACTID, nsDocumentCharsetInfoConstructor,
======== nsMetaCharsetObserver.cpp ===========================
NS_IMETHODIMP nsMetaCharsetObserver::Observe(nsISupports*, const PRUnichar*,
const PRUnichar*)
{
- return NS_ERROR_NOT_IMPLEMENTED;
+ // "app_startup" category calles nsIObserver::Observe method when app/embed
enumerates the members
+ return Start();
}
Comment 25•24 years ago
|
||
Could someone review the code? The patch for this bug only is fine with me. :)
[ie. above changes in nsCharDetModule.cpp and nsMetaCharsetObserver.cpp]
Valeski? Alecf?
Comment 26•24 years ago
|
||
thanks for switching to generic modules!
my only request is that you use nsCOMPtrs instead of raw pointers, and remove
uses of ReleaseService() as it's deprecated (and equivalent to NS_RELEASE())
Comment 27•24 years ago
|
||
Comment 28•24 years ago
|
||
alecf: Thank you for your valuable comment.
I've checked in the bug 67576 which includes your suggestions.
(ie. use of nsCOMPtrs instead of raw pointers and remove ReleaseService())
I have attached a new patch to use the category manager.
I am also going to remove the code from nsAppShellService::Initialize().
We don't need the code for nsIMetaCharsetService any longer.
dougt,valeski: can any of you /r=?
alecf: can you /sr=?
Thanks
Comment 29•24 years ago
|
||
looks good to me. r=valeski.
Comment 30•24 years ago
|
||
Comment 31•24 years ago
|
||
Comment 32•24 years ago
|
||
this is great - I'm glad to see the junk removed from apprunner.
my only request is that you make sure you're actually getting Observe() on the
app-startup topic, so that in case someone has registered you for other topics,
that you aren't called over and over
Comment 33•24 years ago
|
||
Comment 34•24 years ago
|
||
alecf: Is this good for check in? Can you /sr=? Thanks
Comment 35•24 years ago
|
||
sr=alecf
Comment 36•24 years ago
|
||
checked-in.
Comment 37•24 years ago
|
||
New checkin in 66030. (04/16/01 17:07) See comments.
MetaCharset detector should also be enabled in gtkEmbed.
| Assignee | ||
Updated•24 years ago
|
Target Milestone: mozilla0.9 → mozilla0.9.1
Comment 39•24 years ago
|
||
You have to do the following:
===========Comment from 66030===========
Now the meta charset detector is in place,
it is up to the embedder to include which language he/she
likes to support.
If he/she would like to support:
-Japanese, copy components/ucvja.dll
-korean, copy components/ucvko.dlland so on.
Comment 40•24 years ago
|
||
this has been fixed since at least march 23. I have inadvertantly been testing
the same bits each day since then.
marking fixed
Status: ASSIGNED → RESOLVED
Closed: 24 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•