Re: [Q] Chardet library
Jean-Marc Desperrier <[email protected]> Thu, 31 Mar 2005 19:33:52 +0200
| Newsgroups | gmane.comp.mozilla.internationalization |
|---|---|
| Organization | Another Netscape Collabra Server User |
| Message-ID | <[email protected]> |
JongAm Park wrote: > Thank you for the URL. > > However, it doesn't really shows what headers and libraries should be > used for other projects. There are list of header files on the bottom of > the page. However it is not clear if those files are supposed to be > included in other project, or they are just used inside ofthe chardet > library. > > Can you give me Frank's and Shanjian's email addresses? Jong, I will a little contradict Momoi, but I think there's chances he'll approve after reading what I have to say on the subject. Neither Franck nor Shanjian are currently involved in the mozilla project, I'm not sure you will get a lot of help from them. I think the best choice for you would be not to attack the charset library generically, but to use directly the universal detector within it. If you do so, I can help you a bit. The whole charset library consist of many different charset detectors, most are dedicated to detecting some specifics charsets for several language group. This require that you know enough about the charset to select the right detector, which is not great. That's why I recommend you use only the universal detector within them. If you go this way you have two choice : - either you use the XPCOM interface around the universal detector. Going that way will be similar to what Momoi described, you just will just have to set the detector to universal. I can explain you how to do that simply, based for example on the UniversalChardetTest.exe sample included with mozilla. But the problem is that you will need to set up an XPCOM development environnement and include XPCOM libraries in your application. - or you talk directly the universal detector without the XPCOM layer. This is talked about in this page, http://www.mozilla.org/projects/intl/detectorsrc.html, and here https://bugzilla.mozilla.org/show_bug.cgi?id=178790 Unfortunately I can not at the moment give you detailled instruction for that method, but it will be much lighter to implement in your solution, so it might be a better choice.