Compare commits

..

581 Commits

Author SHA1 Message Date
alecf%netscape.com
6d3013435b syncing mac changes to uconv unification branch
git-svn-id: svn://10.0.0.236/branches/alecf_uconv_unification1@126361 18797224-902f-48f8-a5cc-f745e15eee43
2002-08-05 18:46:03 +00:00
alecf%netscape.com
2bd1c0b1f8 checkpointing changes - now we're building one big DLL
git-svn-id: svn://10.0.0.236/branches/alecf_uconv_unification1@126255 18797224-902f-48f8-a5cc-f745e15eee43
2002-08-02 22:57:29 +00:00
alecf%netscape.com
63011d0da4 checkpointing patch for bug 157993 to a branch so I can continue working on it
git-svn-id: svn://10.0.0.236/branches/alecf_uconv_unification1@126120 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-31 18:36:33 +00:00
(no author)
89c1ae6059 This commit was manufactured by cvs2svn to create branch
'alecf_uconv_unification1'.

git-svn-id: svn://10.0.0.236/branches/alecf_uconv_unification1@126001 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-29 18:41:53 +00:00
alecf%netscape.com
da8e37d088 for bug 157993 - completed merge of uconv libraries on mac
not part of build


git-svn-id: svn://10.0.0.236/trunk@126000 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-29 18:41:52 +00:00
morse%netscape.com
7e3387213b bug 159484, password stealing, r=mstoltz, sr=dveditz, a=chofmann
git-svn-id: svn://10.0.0.236/trunk@125999 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-29 18:17:32 +00:00
pinkerton%netscape.com
56cbdc8bf0 Remember the window title even if we don't have a window controller. (bug 157283)
git-svn-id: svn://10.0.0.236/trunk@125998 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-29 18:16:07 +00:00
alecf%netscape.com
35bf61cb88 oops, according to yokoyama, ucvcn belongs in ucvasia not ucvwestern
for bug 157993, still not part of build


git-svn-id: svn://10.0.0.236/trunk@125997 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-29 17:57:46 +00:00
dcone%netscape.com
463438b1e1 Backing out changes. Something is interacting wrong with scroll bars.. so I will investigate.
git-svn-id: svn://10.0.0.236/trunk@125996 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-29 17:48:22 +00:00
despotdaemon%netscape.com
2f1171125a Pseudo-automatic update of changes made by knous@mozilla.org.
git-svn-id: svn://10.0.0.236/trunk@125992 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-29 16:19:09 +00:00
pinkerton%netscape.com
728d4d5674 Fix cases where the bookmarks info window would remember the last selection,
even after it had been deleted. Also changes focus when losing key status so
the field editor gets properly released. We seem to have lost the outlets
in the bm sidebar for the info and edit buttons, re-add and re-attach them
and ensure that they are disabled when there is no selection (bug 159655).


git-svn-id: svn://10.0.0.236/trunk@125990 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-29 15:13:49 +00:00
alecf%netscape.com
9315bd3e6e initial version of combined intl libraries on mac for bug 157993 - not part of build - don't even try these, they don't build yet!
git-svn-id: svn://10.0.0.236/trunk@125989 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-29 14:40:50 +00:00
ccarlen%netscape.com
496652acb1 Bug 159014 - In PPEmbed, autoscroll when selecting text does not work when cursor leaves view. r=pink/sr=sfraser/a=chofmann
git-svn-id: svn://10.0.0.236/trunk@125988 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-29 13:53:26 +00:00
dcone%netscape.com
c3907f8985 b=148598 Very Slow scrolling. r=rods sr=kin a=asa. Fixed the update area for the background images. Improves scrolling 100%
git-svn-id: svn://10.0.0.236/trunk@125987 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-29 13:28:32 +00:00
aaronl%netscape.com
fff598f649 Not part of build. Bug 30088 - type ahead find, fix support of nsITypeAheadFind. Fix for showing link URL in status line in this checkin, but ifdef'd out for now
git-svn-id: svn://10.0.0.236/trunk@125986 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-29 05:59:32 +00:00
kin%netscape.com
73a7e6dade Fix for bug 157055 (Text doesn't show up on Lycos mail front page (layout broken by focus))
Removed |!aReflowState.path->mReflowCommand| check from |if| condition for the first block that attempts to incrementally reflow the block's absolute children.

This was preventing us from properly reflowing an absolute positioned child or one its children when the current reflow path tree contained both a reflow command targeted at the block and one targeted at the aboslutely positioned child or one of its children. This check shouldn't be necessary since nsAbsoluteContainingBlock::IncrementalReflow() does the necessary checks to see if it really should reflow any of the absolute children.

r=karnaze@netscape.com,waterson@netscape.com  sr=dbaron@fas.harvard.edu   a=asa@mozilla.org


git-svn-id: svn://10.0.0.236/trunk@125984 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-29 04:19:15 +00:00
mcafee%netscape.com
c0c5f77c5e don't need this comment here..
git-svn-id: svn://10.0.0.236/trunk@125983 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-29 04:18:15 +00:00
blizzard%redhat.com
bfb4ca528c Updating rpm build files. Not part of the build.
git-svn-id: svn://10.0.0.236/trunk@125982 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-29 03:22:52 +00:00
gerv%gerv.net
c99a02ceee Bug 159593 - usedependencies parameter must die. Patch by gerv; r=bbaetz.
git-svn-id: svn://10.0.0.236/trunk@125974 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-28 23:15:53 +00:00
blakeross%telocity.com
9d32b6f822 159477 - arrow key selection in tree has absurd delay. r=brendan sr=hyatt a=blizzard
git-svn-id: svn://10.0.0.236/trunk@125973 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-28 21:45:06 +00:00
jkeiser%netscape.com
bdd456e930 Add comments (bug 159065), r=sicking, sr=jst/bz, a=asa
git-svn-id: svn://10.0.0.236/trunk@125967 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-28 01:47:59 +00:00
darin%netscape.com
f0cbbd351e fixes bug 94734 - crash on a bugzilla search
patch=ajschult@eos.ncsu.edu r/sr=darin,blizzard a=brendan


git-svn-id: svn://10.0.0.236/trunk@125956 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-27 22:59:44 +00:00
gerv%gerv.net
d6194bc5c2 Merging from 2.16 branch.
git-svn-id: svn://10.0.0.236/trunk@125949 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-27 22:03:53 +00:00
gerv%gerv.net
f88c3c8f3a Merging new docs from 2.16 branch.
git-svn-id: svn://10.0.0.236/trunk@125947 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-27 22:01:14 +00:00
jkeiser%netscape.com
ed6384eef4 Finish checkin of bug 141410 for blake.
git-svn-id: svn://10.0.0.236/trunk@125946 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-27 20:56:06 +00:00
gerv%gerv.net
04d49975ed Bug 159687 - attachment/*.tmpl should use <label>. Patch by burnus; r=gerv.
git-svn-id: svn://10.0.0.236/trunk@125945 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-27 19:10:18 +00:00
gerv%gerv.net
b0abe9c44a Bug 159644 - bug/create/create.html.tmpl should use <label>. Patch by burnus; r=gerv.
git-svn-id: svn://10.0.0.236/trunk@125943 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-27 19:02:23 +00:00
leaf%mozilla.org
4ca776d022 Automated update
git-svn-id: svn://10.0.0.236/trunk@125942 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-27 14:55:17 +00:00
seawood%netscape.com
2a2435aaa1 Backing out solaris mapfile changes from bug 149152
git-svn-id: svn://10.0.0.236/trunk@125941 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-27 14:40:23 +00:00
bryner%netscape.com
ca7e352068 correcting comment spelling so mcafee can test tinderbox updating.
git-svn-id: svn://10.0.0.236/trunk@125938 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-27 07:16:35 +00:00
mcafee%netscape.com
794ecf09ae Adding chimera module so tinderbox can track trunk:mozilla/chimera when it is being mixed with branch:SeaMonkeyAll.
git-svn-id: svn://10.0.0.236/trunk@125937 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-27 06:34:25 +00:00
leaf%mozilla.org
ec1faf1f0b Automated update
git-svn-id: svn://10.0.0.236/trunk@125936 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-27 06:10:15 +00:00
seawood%netscape.com
ae92950689 This should have been tested against a gcc build before it went it.
Fixing tinderbox bustage (bug 149152)


git-svn-id: svn://10.0.0.236/trunk@125935 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-27 06:05:52 +00:00
jkeiser%netscape.com
7fb12b3d6a Add documentation comments (bug 159065), r=sicking, sr=bz/jst, a=asa
git-svn-id: svn://10.0.0.236/trunk@125934 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-27 05:02:38 +00:00
leaf%mozilla.org
27d28eebe6 Automated update
git-svn-id: svn://10.0.0.236/trunk@125932 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-27 02:55:14 +00:00
joe.chou%sun.com
c93164dcdb Bug149152-Add mapfile to Solaris to improve browser performance. r=cls@seawood.org, a=asa@mozilla.org
git-svn-id: svn://10.0.0.236/trunk@125930 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-27 02:45:51 +00:00
joe.chou%sun.com
3b6726e7b2 Bug 149152 - Add mapfile to solaris to improve browser performance. r=cls@seawood.org, a=asa@mozilla.org
git-svn-id: svn://10.0.0.236/trunk@125929 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-27 02:43:27 +00:00
jkeiser%netscape.com
4f471ffd8f Add comments (bug 159065), r=sicking, sr=jst/bz, a=asa
git-svn-id: svn://10.0.0.236/trunk@125928 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-27 02:33:47 +00:00
jkeiser%netscape.com
2da66a0941 Comment nsIHTMLContent.h (bug 159605). r=sicking, sr=jst/bz, a=asa
git-svn-id: svn://10.0.0.236/trunk@125927 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-27 02:00:03 +00:00
blakeross%telocity.com
bd85f7210f Reverting some changes that were for a different bug.
git-svn-id: svn://10.0.0.236/trunk@125926 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-27 01:27:02 +00:00
sfraser%netscape.com
e8e1d41771 Fixing bug 156893: strip control characters out of strings which are to become bookmark titles, to avoid saving corrupt XML.
git-svn-id: svn://10.0.0.236/trunk@125925 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-27 01:24:42 +00:00
sfraser%netscape.com
23d8247539 Added NSString+Utils.mm/.h
git-svn-id: svn://10.0.0.236/trunk@125924 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-27 01:22:32 +00:00
sfraser%netscape.com
188ed0ac25 New files adding a category on NSString with some useful cleanup functions.
git-svn-id: svn://10.0.0.236/trunk@125923 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-27 01:21:59 +00:00
darin%netscape.com
32cf5a8655 fixes bug 146884 - Mozilla sometimes consumes 100% CPU when pipelining is enabled...
r=dougt sr=rpotts a=asa


git-svn-id: svn://10.0.0.236/trunk@125922 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-27 01:06:05 +00:00
sfraser%netscape.com
473553d46e Fix bug 158927 -- controls not drawing correctly in QuickTime plugin. The problem was that the thread scheduling Timer Task would call WakeUpProcess() every time when we are blocked and not servicing NSPR threads (for example when tracking plugin controls). A side effect of this is to prevent Mac OS X from flushing the window back buffers, hence the drawing issues. Fix is to only call WakeUpProcess() if we've been through the scheduler since the last time. r=sdaglye, wtc. a=asa.
git-svn-id: svn://10.0.0.236/trunk@125921 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-27 01:01:36 +00:00
blakeross%telocity.com
27d76b37fd 141410 - download manager doesn't highlight the active transfer by default. r=caillon sr=ben a=asa
git-svn-id: svn://10.0.0.236/trunk@125919 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-27 00:47:18 +00:00
darin%netscape.com
90e6d51bf6 fixes bug 159583 - simple string bundle optimization
r=yokoyama sr=alecf a=asa


git-svn-id: svn://10.0.0.236/trunk@125918 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-27 00:46:21 +00:00
pete.zha%sun.com
9faa82fe3c Migrated UW IMAP UI: New Folder Dialog is not displaying completely for the FIRST time
bug=90734 r=naving sr=jst a=asa


git-svn-id: svn://10.0.0.236/trunk@125917 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-27 00:33:12 +00:00
sfraser%netscape.com
6232c32224 Cleanup some NSLogs and comments from last checkin.
git-svn-id: svn://10.0.0.236/trunk@125913 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-26 23:37:11 +00:00
sfraser%netscape.com
28f7c3b49e Fix bug 159461: make the progress window remember its position, and (bug 159460) have it appear in the Windows menu, with a useful name.
git-svn-id: svn://10.0.0.236/trunk@125912 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-26 23:37:10 +00:00
serge%netscape.com
16b06ae69f fix 152429, flash in an iframe crashes with Gdk-ERROR **: BadDrawable; r=bzbarsky, sr=jst, a=asa
git-svn-id: svn://10.0.0.236/trunk@125911 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-26 23:30:27 +00:00
sfraser%netscape.com
86c9fa6d83 Fix assumptions all over the code about the main window being a browser window; it can be a progress window, or the About window (and others in future). Ensure that the menu items that are enabled when a non-browser window is frontmost work as expected (e.g. Mange Bookmarks, opening a bookmark).
git-svn-id: svn://10.0.0.236/trunk@125910 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-26 23:29:49 +00:00
dprice%netscape.com
ccea66e526 157522 sr=dveditz a=asa
don't delete installed-chome.txt


git-svn-id: svn://10.0.0.236/trunk@125909 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-26 23:28:49 +00:00
sfraser%netscape.com
401d1f274c Minor tidyup of saveFrameUsingName/setFrameUsingName.
git-svn-id: svn://10.0.0.236/trunk@125908 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-26 23:26:30 +00:00
bzbarsky%mit.edu
28b1505b87 Fix bug 159268 (hiding and reshowing an iframe regression). r=sicking,
sr=jst, a=asa


git-svn-id: svn://10.0.0.236/trunk@125907 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-26 23:11:19 +00:00
jst%netscape.com
c99a7fc274 Fixing regression bug 159468. Hold a strong reference to the script context in nsCxPusher to make sure it stays alive as long as we need it. r=jkeiser@netscape.com, sr=rpotts@netscape.com, a=asa@mozilla.org
git-svn-id: svn://10.0.0.236/trunk@125906 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-26 23:10:36 +00:00
rginda%netscape.com
42f6f7246b bug 155328, r=bz, sr=jst
fix uninitialized return value in nsViewManager::Init


git-svn-id: svn://10.0.0.236/trunk@125905 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-26 23:09:06 +00:00
ssu%netscape.com
d29aa08df3 fixing bug 158199 - Mailnews Prefs dialogs are missing mnemonics. r=varada, sr=mscott a=drivers
git-svn-id: svn://10.0.0.236/trunk@125904 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-26 23:06:32 +00:00
pete.zha%sun.com
bcb3567454 Printing / Page settings reset themselves after print (no landscape printing)
bug=147605 r=petez sr=jst a=asa patch=Roland.Mainz@informatik.med.uni-giessen.de
Thanks Roland for this patch!


git-svn-id: svn://10.0.0.236/trunk@125903 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-26 22:58:24 +00:00
jkeiser%netscape.com
1675ed197f Add comments (bug 159065), r=sicking, sr=bz/jst, a=asa
git-svn-id: svn://10.0.0.236/trunk@125900 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-26 22:33:43 +00:00
gerv%gerv.net
4e1dced5ac Bug 159582 - search/knob.html.tmpl should use <label> for the radiobuttons. Patch by burnus; r=gerv.
git-svn-id: svn://10.0.0.236/trunk@125899 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-26 22:29:24 +00:00
gerv%gerv.net
90e7132a5c Bug 159629 - make users login to add quips. Patch by gerv; r=burnus.
git-svn-id: svn://10.0.0.236/trunk@125898 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-26 22:21:56 +00:00
yokoyama%netscape.com
cdebcf28d6 Bug 156979
XBL emulation of marquee
update the installed-chrome.txt for embedder
/r=adamlock, chak, /a=asa


git-svn-id: svn://10.0.0.236/trunk@125897 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-26 22:20:39 +00:00
cbiesinger%web.de
25cce6f6ab bug 155702 patch by sergei_d@fi.tartu.ee r=arougthopher@lizardland.net a=asa
nsWindowBeOS::QuitRequested always issues CLOSEWONDOW event


git-svn-id: svn://10.0.0.236/trunk@125895 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-26 22:09:54 +00:00
cbiesinger%web.de
4f69b52a8e bug 71343 patch by sergei_d@fi.tartu.ee r=arougthopher@lizardland.net a=asa
[BEOS] Windows are not brought to front when requested


git-svn-id: svn://10.0.0.236/trunk@125894 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-26 22:05:04 +00:00
ashishbhatt%netscape.com
e3b14c3f05 Updated to show profiles dialog at startup
git-svn-id: svn://10.0.0.236/trunk@125893 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-26 21:34:44 +00:00
jkeiser%netscape.com
325bff7164 Change ns(I)GfxTextControlFrame(2) -> ns(I)TextControlFrame (bug 129909), r=rods
@netscape.com, sr=bzbarsky@mit.edu, a=asa


git-svn-id: svn://10.0.0.236/trunk@125891 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-26 20:57:24 +00:00
gerv%gerv.net
f20e59a0fe Bug 158658 - relogin.cgi should use a template. This also adds the ability to localise messages. Patch by gerv; r=burnus.
git-svn-id: svn://10.0.0.236/trunk@125888 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-26 20:49:04 +00:00
gerv%gerv.net
11e488111d Bug 150776 - Remembered query options need regrouping. Patch by gerv; r=jouni, burnus.
git-svn-id: svn://10.0.0.236/trunk@125887 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-26 20:44:46 +00:00
jkeiser%netscape.com
b23089d0ce Move nsIHTMLContent.h into content/html/content/public (bug 77069), r=heikki, sr=jst, a=asa
git-svn-id: svn://10.0.0.236/trunk@125886 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-26 20:44:02 +00:00
gerv%gerv.net
53af493081 Bug 106640 - allow translation of system messages. Patch by gerv; r=burnus.
git-svn-id: svn://10.0.0.236/trunk@125883 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-26 20:39:17 +00:00
gerv%gerv.net
55840407d6 Bug 158497 - Templatise colchange.cgi. Patch by gerv; r=burnus.
git-svn-id: svn://10.0.0.236/trunk@125882 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-26 20:37:06 +00:00
pinkerton%netscape.com
88412f5cca Separating the personal toolbar from the sidebar selection. Bookmarks info
controller is now a singleton that lives forever. Personal toolbar context
menus do the right thing. (bug 148932).


git-svn-id: svn://10.0.0.236/trunk@125881 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-26 20:28:45 +00:00
leaf%mozilla.org
a305d85996 fix for bug 156577, r=chak. simple change to check for directory existence
before mkdir commands.


git-svn-id: svn://10.0.0.236/trunk@125879 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-26 19:31:06 +00:00
naving%netscape.com
781e9c65e2 42090 most of the work for this patch done by joshua.xia@sun.com r=naving sr=bienvenu a=asa Make cancel in
filterListDialog not remember changes.


git-svn-id: svn://10.0.0.236/trunk@125877 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-26 19:27:30 +00:00
mcafee%netscape.com
2169fd9093 fixing logic in pageload test for 2nd attempt case.
git-svn-id: svn://10.0.0.236/trunk@125875 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-26 19:10:58 +00:00
pinkerton%netscape.com
924efd456d Fixes crash when selecting text during URL load, adds undo/redo to url bar,
reduces the number of times we load about:blank to 1 per window, fixes
unicode characters in bookmarks. (bug 149198, 153263, 155710)


git-svn-id: svn://10.0.0.236/trunk@125873 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-26 18:50:01 +00:00
gerv%gerv.net
e18ec1cbb7 Bug 159565 - fix hash initialisation error caused by my duff patch for accesskeys. Patch by burnus; 2xr=gerv.
git-svn-id: svn://10.0.0.236/trunk@125870 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-26 18:22:18 +00:00
wtc%netscape.com
43d17bd1d6 Fixed the comment. The length of the secret may be larger than 64 bytes.
git-svn-id: svn://10.0.0.236/trunk@125869 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-26 18:20:59 +00:00
gerv%gerv.net
c2a07f8ca4 ... and = instead of =>.
git-svn-id: svn://10.0.0.236/trunk@125868 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-26 18:20:58 +00:00
gerv%gerv.net
1b57318c55 Fixing bustage caused by ; instead of , in burnus' patch.
git-svn-id: svn://10.0.0.236/trunk@125867 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-26 18:20:13 +00:00
gerv%gerv.net
e5f79c89d2 Bug 158651 - currenttime should use time2str. Patch by burnus@gmx.de; 2xr=gerv.
git-svn-id: svn://10.0.0.236/trunk@125865 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-26 18:16:39 +00:00
gerv%gerv.net
a8ca30121c Bug 123740 - Add <label> to email prefs. Patch by burnus@gmx.de; 2xr=gerv.
git-svn-id: svn://10.0.0.236/trunk@125864 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-26 18:11:45 +00:00
yokoyama%netscape.com
ff9f774c5b Bug 156979
XBL emulation of marquee.
/r=nhotta, timeless, /sr=jst, /a=asa


git-svn-id: svn://10.0.0.236/trunk@125863 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-26 17:47:16 +00:00
leaf%mozilla.org
f068dae85c adding new files from nsGfxTextControlFrame2.*; part of renaming in bug 129909
git-svn-id: svn://10.0.0.236/trunk@125861 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-26 17:17:00 +00:00
timeless%mac.com
03b6db2975 Bug 158790 - debug has printing prefs in a rendering group
patch by spiffonator@netscape.net r=timeless sr=alecf a=asa


git-svn-id: svn://10.0.0.236/trunk@125860 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-26 16:55:45 +00:00
nhotta%netscape.com
c49fae7638 Adding null check for mDocument before getting a document charset,
bug 159434, r=caillon, sr=jst, a=asa.


git-svn-id: svn://10.0.0.236/trunk@125859 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-26 16:45:45 +00:00
mikep%oeone.com
1456ece7b6 Fixes from OEoen calendar, removing duplicate and unused css attributes.
git-svn-id: svn://10.0.0.236/trunk@125858 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-26 15:19:22 +00:00
mikep%oeone.com
2651f6ccd4 Fixing so that outlook can import events mailed to other people.
Bug 159549.


git-svn-id: svn://10.0.0.236/trunk@125857 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-26 15:15:14 +00:00
ccarlen%netscape.com
a83072dd92 Bug 158126 - PPEmbed does not send activate events to Gecko. r=pink/sr=sfraser/a=asa.
git-svn-id: svn://10.0.0.236/trunk@125856 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-26 14:36:22 +00:00
mikep%oeone.com
fc977eaceb Fixing bug 159541.
git-svn-id: svn://10.0.0.236/trunk@125855 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-26 14:01:10 +00:00
mostafah%oeone.com
861d6bb2cb Checked in patch for bug 159458: [RFE] option to not save the Mozilla custom X- properties
git-svn-id: svn://10.0.0.236/trunk@125854 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-26 13:37:59 +00:00
cbiesinger%web.de
672499b3ae bug 155655 r=timeless sr=blake a=asa
Navigator preferences leave blank space where "make default browser" would be


git-svn-id: svn://10.0.0.236/trunk@125851 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-26 08:34:53 +00:00
peterlubczynski%netscape.com
725cbaf73e Fixing bug 152927: can't script any plugin in nested EMBED tag inside an OBJECT tag from onLoad handler -- CNET radio does not play with Real because SetSource is called from onLoad r=kmcclusk sr=dveditz a=asa
git-svn-id: svn://10.0.0.236/trunk@125845 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-26 03:48:24 +00:00
rginda%netscape.com
133a2f6ef8 bug 155328, "nsViewManager and nsPresShell are unaware of stacked event queues"
sr=jst, r=roc+mozilla@cs.cmu.edu, a=asa

make sure we always post new invalidate events to the topmost queue, and don't skip creating new reflow events just because we happen to have one an elder queue.


git-svn-id: svn://10.0.0.236/trunk@125843 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-26 03:31:56 +00:00
rginda%netscape.com
cd7bad237a bug 155328, "nsViewManager and nsPresShell are unaware of stacked event queues"
sr=rpotts, r=jst, a=asa

make sure we always post new reflow events to the topmost queue, and don't skip creating new reflow events just because we happen to have one an elder queue.


git-svn-id: svn://10.0.0.236/trunk@125842 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-26 03:29:07 +00:00
bzbarsky%mit.edu
59edb917bd Fix up the build stuff in there too. Not part of build.
git-svn-id: svn://10.0.0.236/trunk@125839 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-26 01:35:34 +00:00
bzbarsky%mit.edu
39acdb7a27 Updating interfaces to reflect new edition of the spec. Not part of build.
git-svn-id: svn://10.0.0.236/trunk@125838 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-26 01:30:33 +00:00
timeless%mac.com
518a0fb1b9 bug 157572 by alecf ports (os/2, xlib) bustage
git-svn-id: svn://10.0.0.236/trunk@125836 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-26 01:01:37 +00:00
bzbarsky%mit.edu
1ed31e83a7 Fix some build warnings. Bug 157378, patch by
Roland.Mainz@informatik.med.uni-giessen.de (Roland Mainz), r=bbaetz,
biesi, sr=bzbarsky, a=asa


git-svn-id: svn://10.0.0.236/trunk@125834 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-26 00:40:05 +00:00
bzbarsky%mit.edu
56707d69cd Backing out fix for bug 156072 due to regression bug 158792. r=caillon/sr=jst/a=asa
git-svn-id: svn://10.0.0.236/trunk@125833 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-26 00:35:15 +00:00
timeless%mac.com
cda8c2f36a bug 157572 by alecf busted bezilla
a=#bezilla,leaf for tinderbustage


git-svn-id: svn://10.0.0.236/trunk@125831 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-26 00:14:39 +00:00
cbiesinger%web.de
99426a9b40 bug 158789 patch by spiffonator@netscape.net r=blake sr=alecf a=asa
advanced has incomprehensible pref text


git-svn-id: svn://10.0.0.236/trunk@125822 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-25 22:03:13 +00:00
pinkerton%netscape.com
2a0f1b0336 Removing file, changed to .mm
git-svn-id: svn://10.0.0.236/trunk@125821 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-25 21:58:32 +00:00
pinkerton%netscape.com
910a803cc8 Move the pref controller to be a .mm file
git-svn-id: svn://10.0.0.236/trunk@125820 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-25 21:57:53 +00:00
pinkerton%netscape.com
8677e94998 Changing to be a .mm file so we can use c++ for writing out prefs
git-svn-id: svn://10.0.0.236/trunk@125819 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-25 21:56:33 +00:00
akkana%netscape.com
6a0a8efa86 142826: move to beginning of found pattern after a reverse find. Fix is from harry.lu@sun.com, r=me, sr=sfraser, a=asa
git-svn-id: svn://10.0.0.236/trunk@125818 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-25 21:49:42 +00:00
shrutiv%netscape.com
a1f6af4667 updating show example images
git-svn-id: svn://10.0.0.236/trunk@125817 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-25 21:48:14 +00:00
bryner%netscape.com
0c0cf9ecf3 Fix focus crasher resulting from the window's firstResponder pointing to a deleted NSView. Bug 159291, r/sr=hyatt. Not part of the build.
git-svn-id: svn://10.0.0.236/trunk@125815 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-25 21:31:51 +00:00
bryner%netscape.com
71e5a0d9ce Factor the nsIPromptService implementation out of CocoaBrowserService, and move it to using a generic factory. Clean up some #includes. Change AppComponents.cpp to a .mm file since it needs to include some cocoa headers. r=pinkerton.
git-svn-id: svn://10.0.0.236/trunk@125813 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-25 21:28:23 +00:00
shrutiv%netscape.com
56e1a45320 updating show example images
git-svn-id: svn://10.0.0.236/trunk@125811 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-25 21:10:39 +00:00
mostafah%oeone.com
b4d992cb02 Fixed bug 158957: DTSTAMP must use UTC time
and a bunch of indenting


git-svn-id: svn://10.0.0.236/trunk@125808 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-25 21:08:02 +00:00
smontagu%netscape.com
f0c487bee0 Fix crasher bug 158796, r=jkeiser, sr=jst, a=asa
git-svn-id: svn://10.0.0.236/trunk@125804 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-25 20:40:51 +00:00
timeless%mac.com
02bd51dca0 Bug 159070 installer claimed my everything install did not include PSM
r=ssu sr=dveditz a=asa


git-svn-id: svn://10.0.0.236/trunk@125803 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-25 20:40:32 +00:00
cbiesinger%web.de
a118c8a10f bug 158922 patch by spiffonator@netscape.net r=biesi sr=alecf a=asa
remove unused strings


git-svn-id: svn://10.0.0.236/trunk@125802 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-25 20:36:09 +00:00
timeless%mac.com
eb760368df Bug 158606 crash with -moz-opacity
patch by sergei_d@fi.tartu.ee r=timeless sr=blizzard (ports code) a=asa


git-svn-id: svn://10.0.0.236/trunk@125801 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-25 20:26:33 +00:00
dougt%netscape.com
93a121bec1 ProxyObjectCallInfo class is exported by many dso. r=darin, sr=alec, a=asa, b=158932
git-svn-id: svn://10.0.0.236/trunk@125800 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-25 20:13:06 +00:00
dougt%netscape.com
7383c167c4 nsICollection's nsQueryElementAt class is exported. r=darin, sr=alec, a=asa, b=158931
git-svn-id: svn://10.0.0.236/trunk@125798 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-25 20:12:18 +00:00
alecf%netscape.com
3c86efbaa2 fix for bug 159220 - make nsWindowDataSource be 64-bit friendly so we don't crash on Tru64
r=timeless, sr=brendan, a=asa


git-svn-id: svn://10.0.0.236/trunk@125797 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-25 20:02:33 +00:00
timeless%mac.com
9ba7855de7 Bug 157348 no AltGr recognised
patch by sergei_d@fi.tartu.ee r=timeless sr=blizzard (ports code) a=asa


git-svn-id: svn://10.0.0.236/trunk@125796 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-25 19:59:54 +00:00
alecf%netscape.com
6d5d0fa10e fix bustage by #including nsCOMPtr.h
git-svn-id: svn://10.0.0.236/trunk@125795 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-25 19:44:15 +00:00
bryner%netscape.com
7bc238d7a1 Change ShortVersion to be just the version number, not including the product name.
git-svn-id: svn://10.0.0.236/trunk@125794 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-25 19:05:56 +00:00
leaf%mozilla.org
94a5d7de0c Automated update
git-svn-id: svn://10.0.0.236/trunk@125793 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-25 18:40:14 +00:00
margaret.chan%sun.com
8cd5650005 Bug 149151 - Use -lazyload to distribute cost of loading objects throughout their life cycle. This checkin also includes another linker option -zcombreloc which will combine relocatable objects in one section. Both options are added for performance reason, and they are only for Solaris. r=cls, a=asa.
git-svn-id: svn://10.0.0.236/trunk@125792 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-25 18:37:34 +00:00
alecf%netscape.com
7e8aa74093 fix for bug 157572 - remove nsIAtom references from strings, and thus expicitly #include nsIAtom.h for consumers who are expecting it.
r=dmose, sr=jag, a=asa


git-svn-id: svn://10.0.0.236/trunk@125791 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-25 18:31:10 +00:00
tao%netscape.com
8f333523c8 Update instructions in README and provide link to a new file,
leve-xlation.html which has more explanation.


git-svn-id: svn://10.0.0.236/trunk@125790 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-25 17:38:28 +00:00
cmanske%netscape.com
dd2de77d93 Fixed Tab code in Composer dialogs, b=157778, r=neil@parkwaycc.co.uk, sr=alecf, a=asa/drivers
git-svn-id: svn://10.0.0.236/trunk@125789 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-25 17:32:12 +00:00
mikep%oeone.com
af4bc6cf21 Integrating license changes and other changes from OEone.
git-svn-id: svn://10.0.0.236/trunk@125787 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-25 17:05:46 +00:00
mikep%oeone.com
a728ae346c Patch 92744 from bug 156687.
git-svn-id: svn://10.0.0.236/trunk@125785 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-25 16:43:25 +00:00
mikep%oeone.com
369e8229d0 Fixing problem with long titles not wrapping in day view.
git-svn-id: svn://10.0.0.236/trunk@125784 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-25 14:28:21 +00:00
mikep%oeone.com
3692434a8e Fix from integrating changes for to items, bug 156687.
git-svn-id: svn://10.0.0.236/trunk@125783 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-25 14:26:22 +00:00
jdunn%netscape.com
28c54c8a52 moving extern statement out of function scope to fix bustage
r=dougt@netscape.com
sr=rpotts@netscape.com
a=asa@mozilla.org
# 141359


git-svn-id: svn://10.0.0.236/trunk@125782 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-25 14:21:00 +00:00
mikep%oeone.com
5a3999941d Adding in patch from bug 156687 from AJB.
git-svn-id: svn://10.0.0.236/trunk@125781 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-25 14:12:52 +00:00
mikep%oeone.com
cf8b475ee8 Adding tasks to button.
git-svn-id: svn://10.0.0.236/trunk@125780 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-25 14:11:33 +00:00
caillon%returnzero.com
97e3cd10d2 Bug 155752 - Use the XML parser for XHTML about: services
Patch contributed by Alexey Chernyak <alexey@ihug.com.au>
r=timeless, sr=jst, a=asa


git-svn-id: svn://10.0.0.236/trunk@125778 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-25 13:36:37 +00:00
caillon%returnzero.com
4767339f6c Bug 155752 - Use the XML parser for XHTML about: services
Patch contributed by Alexey Chernyak <alexey@ihug.com.au>
r=timeless, sr=jst, a=asa


git-svn-id: svn://10.0.0.236/trunk@125777 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-25 13:27:16 +00:00
mikep%oeone.com
dd6dc2263c Small fix for cutting events, bug 158604.
git-svn-id: svn://10.0.0.236/trunk@125776 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-25 12:32:36 +00:00
depstein%netscape.com
0d552e997c changed url
git-svn-id: svn://10.0.0.236/trunk@125775 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-25 08:19:35 +00:00
bzbarsky%mit.edu
e6f206c6ce Adding idl files needed for DOM3 Load/Save. Not part of build.
git-svn-id: svn://10.0.0.236/trunk@125774 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-25 06:38:57 +00:00
sfraser%netscape.com
d4abf23b1b Changing the 'Wrap' checkbox keyboard shortcut from Command-W to Command-R, to avoid conflict with Command-W closing the window.
git-svn-id: svn://10.0.0.236/trunk@125773 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-25 05:59:33 +00:00
sfraser%netscape.com
e5a16281a8 Fix for bug 159296 -- put the build ID in the about window. Also tweaked the scrolling text timer to fire much less fequently (and scroll more each time, but still remain smooth). Added dist/include to the include paths in the project (for nsBuildID.h), and fixed some file access paths to stuff in widget/src/cocoa.
git-svn-id: svn://10.0.0.236/trunk@125771 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-25 05:47:16 +00:00
pete.zha%sun.com
23127b1a98 Fix the foolish comments in previou check in.
Change "we are them" to "we enable them"
Will not effect the build


git-svn-id: svn://10.0.0.236/trunk@125769 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-25 05:20:14 +00:00
pete.zha%sun.com
2a3bf650f0 unix: should remove the Reveal Location & Launch File buttons from download progress dialog
bug=90008 r=jkeiser sr=bzbarsky a=asa


git-svn-id: svn://10.0.0.236/trunk@125768 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-25 05:10:46 +00:00
wtc%netscape.com
22622bc346 Removed unused ASN.1 templates and unnecessary declarations.
Modified Files: lowcert.c pcertt.h


git-svn-id: svn://10.0.0.236/trunk@125767 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-25 03:59:38 +00:00
henry.jia%sun.com
b3bfda0fb7 Fix for bug 138191
Description: Changing field focus with javascript and backspacing breaks tabbing
patch by Gilbert.Fang@sun.com
r=jkeiser, sr=bryner, a=asa


git-svn-id: svn://10.0.0.236/trunk@125766 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-25 03:14:29 +00:00
kaie%netscape.com
9132da9e54 b=141268 OCSP error messages should say OCSP, not OSCP (typo)
r=hixie sr=alecf a=asa


git-svn-id: svn://10.0.0.236/trunk@125764 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-25 02:48:33 +00:00
kaie%netscape.com
a9eeb6b688 b=145698 javascript strict warnings in msgCompSecurityInfo.js
r=javi sr=alecf a=asa


git-svn-id: svn://10.0.0.236/trunk@125763 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-25 02:45:51 +00:00
kaie%netscape.com
69975a03b0 b=156748 Incorrect stylesheet rule in message compose S/Mime overlay
r=dbaron sr=mscott a=asa


git-svn-id: svn://10.0.0.236/trunk@125762 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-25 02:38:06 +00:00
kaie%netscape.com
3232c2fc50 b=113844 "Load PKCS#11 Device" dialog sized incorrectly
r=kaie/javi  sr=alecf  a=asa


git-svn-id: svn://10.0.0.236/trunk@125761 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-25 02:26:52 +00:00
sfraser%netscape.com
c3e845b32f Fix for bug 158378: fix the bookmark info panel to behave correctly, support Undo, and not crash. Patch from David Hass, hacked on by me.
git-svn-id: svn://10.0.0.236/trunk@125760 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-25 02:07:43 +00:00
rods%netscape.com
717b70cb65 Hide the Page Setup btn on Linux until Bug 119491 is fixed
Bug 158282 r=sgehani sr=bryner a=asa


git-svn-id: svn://10.0.0.236/trunk@125759 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-25 01:48:42 +00:00
justdave%syndicomm.com
74ea63b790 Fix for bug 154008: some basic (but incomplete) maintenance on bug_email.pl, also fixes a possible security hole with a misuse
of a system() call.
Patches by Erik Anderson <erikba@teamworkgroup.com> and Brad Baetz <bbaetz@student.usyd.edu.au>
r= myk, justdave


git-svn-id: svn://10.0.0.236/trunk@125758 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-25 01:47:50 +00:00
sfraser%netscape.com
2e65f57aea Fix for bug 154895: fix Next/Previous tab to just cycle round through all tabs if you hit the start or end. That way, they are always enabled (when tabs are visible).
git-svn-id: svn://10.0.0.236/trunk@125756 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-25 01:16:36 +00:00
bryner%netscape.com
410ad0fd16 Factor out security dialogs from CocoaBrowserService, and provide a mechanism for using generic factories for application-provided XPCOM components (bug 158801). r=pinkerton, sfraser.
git-svn-id: svn://10.0.0.236/trunk@125755 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-25 00:57:27 +00:00
sfraser%netscape.com
60422765b0 Fix bug 157950: make sure that Find Again is disabled if there is no search string stored. Also changed the Find dialog behaviour to stay up when you hit Find (as it should, since it's a panel), to default to 'wrap' and 'ignore case' being on, and added key shortcuts for the checkboxes.
git-svn-id: svn://10.0.0.236/trunk@125753 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-25 00:42:53 +00:00
jrgm%netscape.com
30e5e68735 bug 158072: 'remove dead function selectLocale from strres.js', r=timeless, sr=jag, a=asa
git-svn-id: svn://10.0.0.236/trunk@125752 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-25 00:38:23 +00:00
bryner%netscape.com
2b1e437151 Make MachO mac build use Mac locale code (bug 158266). r=pinkerton, sr=sfraser, a=asa.
git-svn-id: svn://10.0.0.236/trunk@125750 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-25 00:28:29 +00:00
bryner%netscape.com
db891f00b1 fixing css syntax error (bug 158981). r=jkeiser, sr=bzbarsky, a=asa.
git-svn-id: svn://10.0.0.236/trunk@125749 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-25 00:12:04 +00:00
shrutiv%netscape.com
133bfab0b1 Including banner bmp for bookmarkscreen
git-svn-id: svn://10.0.0.236/trunk@125748 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-25 00:11:36 +00:00
sfraser%netscape.com
f83158bd8f Fix for bug 159170; when doing a Save, don't show the 'Leave open' button in the download progress window, and make sure that the window always closes at the end of the saving. r=pinkeron
Also fixed a refounting boo-boo with the downloader factor.


git-svn-id: svn://10.0.0.236/trunk@125747 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-25 00:00:51 +00:00
gerv%gerv.net
b25db35652 Bug 67950c - make quips.cgi compile without warnings, by use vars-ing $userid. Patch by gerv.
git-svn-id: svn://10.0.0.236/trunk@125745 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-24 23:38:50 +00:00
gerv%gerv.net
f0187522d7 Bug 67950b - quick fixes. Patch by gerv.
git-svn-id: svn://10.0.0.236/trunk@125744 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-24 23:32:41 +00:00
gerv%gerv.net
7998b638b7 Bug 67950 - Move the quip list into the database. Patch by davef@tetsubo.com; r=gerv, preed.
git-svn-id: svn://10.0.0.236/trunk@125742 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-24 23:23:00 +00:00
shrutiv%netscape.com
5089477442 Fix for bugscape bug 17314: remove bookmarks and sidebar from "Before
You Begin" (r=mitchf)


git-svn-id: svn://10.0.0.236/trunk@125741 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-24 23:21:40 +00:00
gerv%gerv.net
4d65990457 Bug 158660 - confirm_login in CGI.pl should use a template for the login dialog. Patch by gerv; 2xr=jouni.
git-svn-id: svn://10.0.0.236/trunk@125740 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-24 23:13:35 +00:00
pinkerton%netscape.com
fdea88a4db Changed "Save Link As..." in context menus to "Download Link Target..." (bug 159201)
git-svn-id: svn://10.0.0.236/trunk@125737 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-24 22:00:11 +00:00
pinkerton%netscape.com
6a614634bf localize d/l progress dialog and put strings in localizable.strings (bug 143093)
git-svn-id: svn://10.0.0.236/trunk@125736 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-24 21:48:08 +00:00
cltbld%netscape.com
1839a35cc1 Switching to pageload_server instead of hard-coded url for pageload test. -mcafee
git-svn-id: svn://10.0.0.236/trunk@125735 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-24 21:32:49 +00:00
alecf%netscape.com
31d3d623b4 lay some groundwork for bug 158003 - make some static constructors for the base classes that all the encoders/decoders can share
not part of build


git-svn-id: svn://10.0.0.236/trunk@125734 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-24 21:27:57 +00:00
alecf%netscape.com
ed041269b4 work for bug 158003 and bug 157993 - tweak base support classes with a fake inner interface in debug builds, so we can use QI to determine if the class is based off any of these support classes.
no reviewer, not part of build


git-svn-id: svn://10.0.0.236/trunk@125733 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-24 21:20:18 +00:00
cbiesinger%web.de
98a1043bbe bug 158937 r=timeless sr=bz a=asa
comment wrong


git-svn-id: svn://10.0.0.236/trunk@125732 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-24 20:53:50 +00:00
bzbarsky%mit.edu
4200beed9b Fix silly logic error in lazy lists. Bug 158948, r=jkeiser, sr=jst, a=asa
git-svn-id: svn://10.0.0.236/trunk@125731 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-24 20:43:48 +00:00
dprice%netscape.com
f25e227f7b 141056 r=hawara sr=dveditz a=asa
add error checking to fix top crasher


git-svn-id: svn://10.0.0.236/trunk@125730 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-24 20:42:22 +00:00
pinkerton%netscape.com
cdeb82a090 fix phantom checkbox and password field in prompt dialog (bug 156561)
git-svn-id: svn://10.0.0.236/trunk@125729 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-24 20:41:30 +00:00
ssu%netscape.com
a8c53c87f7 checking in patch for neil@parkwaycc.co.uk. fixes bug 158028 - The Mail Start Page does not load. r=ssu sr=sspitzer a=asa
git-svn-id: svn://10.0.0.236/trunk@125728 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-24 20:39:00 +00:00
gerv%gerv.net
b858190117 bug 159200 - support accesskey in search page. Patch by gerv; 2xr=timeless.
git-svn-id: svn://10.0.0.236/trunk@125727 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-24 20:25:08 +00:00
despotdaemon%netscape.com
c86bb44258 Pseudo-automatic update of changes made by curt@netscape.com.
git-svn-id: svn://10.0.0.236/trunk@125726 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-24 20:13:49 +00:00
locka%iol.ie
c35ec937f6 Fixup link tags as stylesheets or anchors according to the value in their "rel" attribute. b=148797 r=brade@netscape.com sr=kin@netscape.com a=asa@mozilla.org
git-svn-id: svn://10.0.0.236/trunk@125725 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-24 19:59:17 +00:00
gerv%gerv.net
54edcc88f8 Bug 102648 - a little more thought. We are changing Platform to Hardware (see the search page) for usability; if we do that, Product can be P and Hardware can be H. 2xr=timeless.
git-svn-id: svn://10.0.0.236/trunk@125724 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-24 19:53:00 +00:00
jkeiser%netscape.com
b6ca8fa2ed Add API Documentation comments (bug 159065), r=sicking, sr=jst/bzbarsky, a=asa
git-svn-id: svn://10.0.0.236/trunk@125722 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-24 19:40:03 +00:00
gerv%gerv.net
4626ac5418 Bug 102648 - Bugzilla should support accesskey. Patch by gerv; 2xr=timeless.
git-svn-id: svn://10.0.0.236/trunk@125721 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-24 19:14:07 +00:00
shrutiv%netscape.com
f9416d1e3b Fix for bug 158373: [REG] AOD is showing up on the end user's component
list (r=smeredith)


git-svn-id: svn://10.0.0.236/trunk@125720 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-24 18:31:38 +00:00
despotdaemon%netscape.com
a3c7a039f9 Pseudo-automatic update of changes made by leaf@mozilla.org.
git-svn-id: svn://10.0.0.236/trunk@125719 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-24 18:28:07 +00:00
cltbld%netscape.com
cbac512367 Setting pageload_server to more-appropriate default, spider. External people, please ask mcafee or jrgm for external ip. -mcafee
git-svn-id: svn://10.0.0.236/trunk@125718 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-24 18:08:15 +00:00
shrutiv%netscape.com
20283028ef Removing fix for bugscape bug 18020
git-svn-id: svn://10.0.0.236/trunk@125716 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-24 17:59:31 +00:00
pinkerton%netscape.com
5444122c25 Add aqua-like broken image icon
git-svn-id: svn://10.0.0.236/trunk@125715 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-24 17:48:48 +00:00
pinkerton%netscape.com
369b525690 aqua-looking broken image icon
git-svn-id: svn://10.0.0.236/trunk@125714 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-24 17:47:34 +00:00
shrutiv%netscape.com
ffb4b008bc Fix for bugscape bug 18020: Remove the CCKDocs folder from the installed
product (r=smeredith)


git-svn-id: svn://10.0.0.236/trunk@125713 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-24 17:41:29 +00:00
mcafee%netscape.com
ef253c4434 fixed slash problem
git-svn-id: svn://10.0.0.236/trunk@125711 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-24 16:04:03 +00:00
mikep%oeone.com
f44ecc8fb8 Fixing file type error.
git-svn-id: svn://10.0.0.236/trunk@125707 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-24 14:01:11 +00:00
mikep%oeone.com
c05391a935 Importing changes from OEone calendar, adding in UI for adding contacts to events.
git-svn-id: svn://10.0.0.236/trunk@125705 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-24 13:19:34 +00:00
mikep%oeone.com
6f5a20fe9d Start of adding in ability to link addresses to events.
git-svn-id: svn://10.0.0.236/trunk@125703 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-24 13:16:29 +00:00
mikep%oeone.com
e5c4c53135 Patch from ajbu@planet.nl for bug 159029.
git-svn-id: svn://10.0.0.236/trunk@125702 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-24 13:07:19 +00:00
bryner%netscape.com
9129fe1a67 Fixing static build bustage from sfraser's checkin for bug 145800:
- add all new source files to static build target
 - rename nsDownloader to CHDownloader to avoid symbol name conflicts with necko.


git-svn-id: svn://10.0.0.236/trunk@125690 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-24 08:23:52 +00:00
ssu%netscape.com
01886d9c66 fixing redness under Win32
git-svn-id: svn://10.0.0.236/trunk@125689 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-24 08:22:15 +00:00
gerv%gerv.net
2b84451550 bug 158498 - defparams.pl prints an error message in a check function instead of returning it. Patch by gerv; 2xr=zeroj.
git-svn-id: svn://10.0.0.236/trunk@125688 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-24 06:56:11 +00:00
ssu%netscape.com
6f65ef4a94 fixing bug 158187 - Support for Windows XP SP1 Integration (TRUNK merge). r=ssu,dprice,curt,law sr=jag,dveditz a=drivers
git-svn-id: svn://10.0.0.236/trunk@125687 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-24 06:43:19 +00:00
pete.zha%sun.com
c1bd7ab216 Translate nsIAccessible roles to ATK roles
bug=153816 r=aaronl sr=jst a=asa


git-svn-id: svn://10.0.0.236/trunk@125685 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-24 06:33:39 +00:00
jst%netscape.com
37e6116529 Fixing regression caused by bug 156452. Make sure the correct JS context is pushed onto the JS context stack before handling focus and blur code internally. This is needed since lots of focus and blur code rely on DOM range code that now does security checking when called to prevent from unauthorized use of a DOM range object. r=sicking@bigfoot.com, sr=bzbarsky@mit.edu, a=chofmann@netscape.com
git-svn-id: svn://10.0.0.236/trunk@125684 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-24 06:13:18 +00:00
jst%netscape.com
7da03ea51c Landing branch fix for bug 90757 on he trunk. There's a better fix for this, but we want to bake this on the trunk for a while before we possibly take this on the branch, once it's baked on the trunk we can land the real fix on the trunk... r=mstoltz@netscape.com, sr=rpotts@netscape.com, a=chofmann@netscape.com
git-svn-id: svn://10.0.0.236/trunk@125683 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-24 06:02:05 +00:00
leaf%mozilla.org
2f1683a246 Automated update
git-svn-id: svn://10.0.0.236/trunk@125681 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-24 05:55:40 +00:00
sfraser%netscape.com
0e88d0860a Fix bug 145800 -- implement downlod progress UI in chimera. These changes allow us to reuse the nsDownloadListener and progress dialog for both Saving (with an nsIWebBrowserPersist) and downloading (where necko creates an nsIDownload, which we implement). They are also factored so that other cocoa apps could reuse the downloading backend with their own progress dialog. r=pinkerton/bryner/ccarlen.
git-svn-id: svn://10.0.0.236/trunk@125680 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-24 05:53:14 +00:00
bryner%netscape.com
ae3ab7d37a Changes to allow Mozilla to build with new gcc3 developer tools on OS X (bug 153525). Patch by dbaron, r=cls, sr=bryner, a=asa.
git-svn-id: svn://10.0.0.236/trunk@125679 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-24 05:43:53 +00:00
sfraser%netscape.com
a962c21d41 Fixing the MachO (DARWIN) build, which broke when wtc checked in a patch in bug 153525. r=bryner.
git-svn-id: svn://10.0.0.236/trunk@125673 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-24 04:06:07 +00:00
cmanske%netscape.com
6a52761ff9 Disable 'Creat Link' when context menu launched on existing link, b=99541, r=brade, sr=kin, a=asa/drivers
git-svn-id: svn://10.0.0.236/trunk@125672 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-24 03:58:41 +00:00
cmanske%netscape.com
7771c9d127 Superscript and Subscript text styles should be mutually exclusive, b=100825, r=jfrancis, sr=kin, a=asa/drivers
git-svn-id: svn://10.0.0.236/trunk@125671 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-24 03:53:14 +00:00
cmanske%netscape.com
b1357f8a31 Part of fix to 'Fix right-click to edit link on an image', b=142042, r=neil@parkwaycc.co.uk, sr=alecf, a=asa/drivers
git-svn-id: svn://10.0.0.236/trunk@125669 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-24 03:47:01 +00:00
cmanske%netscape.com
5282cedd05 Reduce memory cost of using HTML Source multiple times by reducing undo buffer usage. b=158860, r=brade, sr=kin, a=asa/drivers
git-svn-id: svn://10.0.0.236/trunk@125667 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-24 03:35:40 +00:00
smeredith%netscape.com
02cadbb205 Fix for 18126 and 16956.
git-svn-id: svn://10.0.0.236/trunk@125666 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-24 03:04:12 +00:00
loadrunner%betak.net
0cec7b7c5a DNS: lookup regression, r=adamlock, sr=darin, a=asa, local fix for autodial by smeredith@netscape.com all credits to him
git-svn-id: svn://10.0.0.236/trunk@125665 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-24 02:43:22 +00:00
brendan%mozilla.org
3950b292ff Finally fix 137000, which requires working around an MSVC ISO-C violation ('identical COMDAT folding', 151066, r=brendan/jrgm, sr=bryner/shaver, a=asa).
git-svn-id: svn://10.0.0.236/trunk@125664 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-24 01:53:07 +00:00
naving%netscape.com
a8e7151bf4 158776 r=cavin sr=bienvenu a=asa fixing nsCRT::strtok uses in pop3 protocol code.
git-svn-id: svn://10.0.0.236/trunk@125663 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-24 01:50:57 +00:00
darin%netscape.com
bebde11822 fixes bug 157861 - have to hit Back twice to return to '300: multiple choices'
r=dougt sr=rpotts a=asa


git-svn-id: svn://10.0.0.236/trunk@125662 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-24 01:32:07 +00:00
bzbarsky%mit.edu
e62936a18e wallpaper for a bit of bug 120327; this should keep us from appending
".exe" all the time to things on Windows.  patch by me and
jruderman@hmc.edu, r=law, sr=jag, a=asa


git-svn-id: svn://10.0.0.236/trunk@125660 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-24 00:42:12 +00:00
nhotta%netscape.com
d12a957e19 Adding uconv to REQUIRES.
git-svn-id: svn://10.0.0.236/trunk@125659 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-24 00:34:14 +00:00
timeless%mac.com
2b4bbf7237 Bug 158092 Mozilla for BeOS is unable to show in browser proper international file/folder names.
patch by sergei_d@fi.tartu.ee r=timeless sr=darin a=asa


git-svn-id: svn://10.0.0.236/trunk@125655 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-24 00:01:31 +00:00
wtc%netscape.com
b01502356c Bug 153525: fixed build problems under gcc3 on Mac OS X. r=bryner.
Modified Files: _pth.h darwin.c


git-svn-id: svn://10.0.0.236/trunk@125653 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-23 23:54:12 +00:00
alecf%netscape.com
c3866b3a50 fix nhotta's bustage by adding "uconv" to the REQUIRES list
git-svn-id: svn://10.0.0.236/trunk@125652 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-23 23:47:30 +00:00
alecf%netscape.com
7ce57677ba more prep for bug 119923 - use chrome registry ContractID rather than CID, so that we can drop in a new embedding-only chrome registry
r=bnesse, sr=dveditz, a=asa


git-svn-id: svn://10.0.0.236/trunk@125651 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-23 23:30:04 +00:00
nhotta%netscape.com
7da2a94cbd Change nsJSProtocolHandler to listen to originCharset to apply conversion if necessary,
also changed the callers to set originCharset,
bug 137182, r=caillon, sr=jst, a=asa.


git-svn-id: svn://10.0.0.236/trunk@125650 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-23 23:28:28 +00:00
caillon%returnzero.com
eaa75bb394 Bug 104470 - Popup blocking breaks window.open()s which are targetted to frames or existing named windows
r=sicking sr=jst a=asa


git-svn-id: svn://10.0.0.236/trunk@125649 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-23 23:22:20 +00:00
bzbarsky%mit.edu
ff3b5f1bd2 Bug 158230. Clear out all the relevant style data when inline style
causes reframes.  r=dbaron, sr=hyatt, a=asa


git-svn-id: svn://10.0.0.236/trunk@125648 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-23 23:18:26 +00:00
depstein%netscape.com
97bfcc4686 Added web progress notification dialog; and additional flag to url dialog.
a=asa for QA checkins that are not part of the default builds


git-svn-id: svn://10.0.0.236/trunk@125646 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-23 22:31:23 +00:00
alecf%netscape.com
78fed2e87d add ucvasia module, which is a combination of ucvja, ucvtw, ucvtw2, and ucvko
not part of build, for bug 157993


git-svn-id: svn://10.0.0.236/trunk@125645 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-23 22:29:22 +00:00
alecf%netscape.com
9afdcf6fb2 add ucvwestern module, which is a combination of ucvcn, ucvlatin, and ucvibm
not part of build, for bug 157993


git-svn-id: svn://10.0.0.236/trunk@125644 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-23 22:28:10 +00:00
alecf%netscape.com
7611651ee7 fix typo for case-sensitive filesystems, not part of build
git-svn-id: svn://10.0.0.236/trunk@125643 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-23 22:25:20 +00:00
sicking%bigfoot.com
fdf8ae5b5f Make sure it is possible to get URI of xul elements even if they share nodeinfo with their prototype and are removed from the document tree.
b=156452 r=bz sr=jst a=asa


git-svn-id: svn://10.0.0.236/trunk@125642 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-23 22:16:45 +00:00
blakeross%telocity.com
ec222266a8 158419 - help back/fwd buttons broken. r=doron sr=ben a=brendan
git-svn-id: svn://10.0.0.236/trunk@125641 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-23 22:16:05 +00:00
alecf%netscape.com
f50250b92a add static utility library for bug 157993 - provides enhanced base classes for table-based converters
not part of build.. landing so I can test on multiple platforms.


git-svn-id: svn://10.0.0.236/trunk@125640 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-23 22:05:25 +00:00
rogerl%netscape.com
6042d2a155 Changed decimal escape handling to backward compatible rather than ECMA3
conforming. (Bug#158159)


git-svn-id: svn://10.0.0.236/trunk@125639 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-23 21:38:03 +00:00
shannond%netscape.com
9dc7d79806 Bugscape 17886 - Netscape.com recapture dialog should be unchecked by default
r=shrutiv@netscape.com


git-svn-id: svn://10.0.0.236/trunk@125637 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-23 20:53:38 +00:00
pinkerton%netscape.com
d21db24616 Change bookmark sidebar panel buttons to be "momentary change" to get
rid of icky border when depressed.


git-svn-id: svn://10.0.0.236/trunk@125636 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-23 20:42:39 +00:00
cbiesinger%web.de
8f356a3e7c bug 158245 patch by nick@technisys.com.ar r=db48x sr=bz a=scc
Page info should list the alt for images in the media-tab in the tree.


git-svn-id: svn://10.0.0.236/trunk@125635 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-23 20:40:17 +00:00
ftang%netscape.com
4298cf96c1 fix bug 156943. add cjk lang group check for mUnderlineSize computation
r=rbs sr=jst a=chofmann


git-svn-id: svn://10.0.0.236/trunk@125632 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-23 20:35:31 +00:00
mikep%oeone.com
ef9c61c74f Fixing bug 158885.
git-svn-id: svn://10.0.0.236/trunk@125629 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-23 19:23:20 +00:00
mitchf%netscape.com
29fd95aef2 Checking pref tree for remotely administered prefs now, and now auto-check
RemoteAdmin checkbox on following page if any are found.  Fixes bug 13657.


git-svn-id: svn://10.0.0.236/trunk@125628 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-23 17:26:22 +00:00
cbiesinger%web.de
9b368a5e1d address reviewer comments (whitespace)
git-svn-id: svn://10.0.0.236/trunk@125623 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-23 13:44:34 +00:00
cbiesinger%web.de
01e2d35c8b bug 145858 patch by sergei_d@fi.tartu.ee r=timeless a=asa
Imported NetPositive Bookmarks are not loaded properly anymore


git-svn-id: svn://10.0.0.236/trunk@125622 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-23 13:43:23 +00:00
cbiesinger%web.de
2ca860a6d3 fix typo (missing space)
git-svn-id: svn://10.0.0.236/trunk@125621 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-23 13:28:14 +00:00
cbiesinger%web.de
63f3c4f791 bug 129612 patch by neil@parkwaycc.co.uk r=doron sr=bz a=asa
add enable syntax highlighting checkbox to view source window


git-svn-id: svn://10.0.0.236/trunk@125620 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-23 13:22:28 +00:00
caillon%returnzero.com
ddfbc0ff4e Bug 152127 - Prevent tabs from getting renamed to "(Untitled)" at seemingly random times.
r=bzbarsky sr=jag a=asa

Also fixes bugs 101827, 101831, 102924, 108189, 108350, 108421, 111118, 124028, 134815, 141839, 144431, 144984, 150669, 158171


git-svn-id: svn://10.0.0.236/trunk@125619 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-23 10:24:14 +00:00
cltbld%netscape.com
14829a74ad Adding tests to chimera, I slammed this in here for now, need to rework build-seamonkey-utils.pl so tests can be called as functions. -mcafee
git-svn-id: svn://10.0.0.236/trunk@125615 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-23 07:54:18 +00:00
cltbld%netscape.com
e1af56bf1e Renaming RunTest to RunMozillaTests. Leaving in checks for RunTest for now. -mcafee
git-svn-id: svn://10.0.0.236/trunk@125614 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-23 07:52:30 +00:00
gerv%gerv.net
2d1c5ec9f0 Bug 96003 - buglist.cgi should not return all bugs if called without any parameters. Patch by gerv; r=myk.
git-svn-id: svn://10.0.0.236/trunk@125613 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-23 07:16:57 +00:00
kyle.yuan%sun.com
286ec8b7f4 Check in for bolian.yin@sun.com's fix
Bug 81473 The accesskey attribute does not work for the area element
r=dbaron, sr=jst, a=asa


git-svn-id: svn://10.0.0.236/trunk@125612 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-23 06:52:32 +00:00
kyle.yuan%sun.com
b5e7185c3c Bug 157183 Even though XUL Element Tree is focusable, Both the inspect tool and API return wrong value
r=jgaunt, sr=jag, a=asa


git-svn-id: svn://10.0.0.236/trunk@125609 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-23 05:32:39 +00:00
kyle.yuan%sun.com
e1f2c9c169 Bug 157485 Implement nsIAccessibleText for nsHTMLTextFieldAccessible
r=jgaunt, sr=jst, a=asa


git-svn-id: svn://10.0.0.236/trunk@125608 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-23 05:32:17 +00:00
kyle.yuan%sun.com
1a05f649c6 Bug 154521 In "Composer", all source I inputed will be removed by switching display mode between "<html>Source" and "Preview";
r=cmanske, sr=sfraser, a=asa
Harry Lu(harry.lu@sun.com)'s fix (part 2)


git-svn-id: svn://10.0.0.236/trunk@125607 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-23 05:31:42 +00:00
kyle.yuan%sun.com
00cb79e95a Bug 154521 In "Composer", all source I inputed will be removed by switching display mode between "<html>Source" and "Preview";
r=cmanske, sr=sfraser, a=asa
Harry Lu(harry.lu@sun.com)'s fix (part 1)


git-svn-id: svn://10.0.0.236/trunk@125606 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-23 05:30:16 +00:00
jkeiser%netscape.com
c728d3962c Fix uninitialized variable (bug 14445), r=timeless@mac.com, sr=jst@netscape.com, a=asa
git-svn-id: svn://10.0.0.236/trunk@125603 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-23 03:58:49 +00:00
bzbarsky%mit.edu
a844108e85 Fix tab switching in embedding apps. Bug 139294,
r=philipl@mail.utexas.edu, sr=jst, a=asa


git-svn-id: svn://10.0.0.236/trunk@125602 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-23 03:45:06 +00:00
stephend%netscape.com
a21496a361 Bug 158379. Align 'Filter Name' text with textfield in the Filter Rules dialog. r=naving@netscape.com/walk84@yahoo.com, sr=bryner@netscape.com, a=asa@mozilla.org
git-svn-id: svn://10.0.0.236/trunk@125601 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-23 03:25:34 +00:00
pavlov%netscape.com
b92f218827 bug 157989. patch from paper@animecity.nu. r=pavlov sr=tor@acm.org a=brendan/chofmann
git-svn-id: svn://10.0.0.236/trunk@125600 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-23 03:22:27 +00:00
henry.jia%sun.com
a880ad3702 First patch for bug 158080
Description: replace the hardcode of "@mozilla.org/embedcomp/window-watcher;1" with NS_WINDOWWATCHER_CONTRACTID
Patch by Henry.Jia@sun.com
r=blizzard, sr=alecf, a=asa(for trunk)


git-svn-id: svn://10.0.0.236/trunk@125597 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-23 02:27:19 +00:00
av%netscape.com
c2e34ab5d1 Fixing 157627 -- prevent unnecessary writing plugin info to registry which causes indefinite bloat, r=av, sr=dveditz, a=asa
git-svn-id: svn://10.0.0.236/trunk@125596 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-23 02:18:44 +00:00
kyle.yuan%sun.com
185d879123 Bug 157865 </HTML> at the beginning of the page followed by <HEAD> or <BODY> causes Mozilla to freeze
r=choess, sr=bzbarsky, a=asa
Check in for Jerry's fix.


git-svn-id: svn://10.0.0.236/trunk@125594 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-23 02:00:48 +00:00
relyea%netscape.com
5c374eed8b return certs in sorted order.
git-svn-id: svn://10.0.0.236/trunk@125590 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-23 00:34:20 +00:00
gerv%gerv.net
0130c12013 Bug 143650 - general template display system. Patch by gerv; 2xr=jouni.
git-svn-id: svn://10.0.0.236/trunk@125586 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-22 23:17:48 +00:00
cbiesinger%web.de
d2ccc8cf02 bug 155148 patch by calvin.liu@sun.com r=hwaara sr=bienvenu a=asa
Online/Offline indicator doesn't work in "Advanced Address Book  Search" dialog


git-svn-id: svn://10.0.0.236/trunk@125585 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-22 22:28:44 +00:00
cltbld%netscape.com
2fd95378c9 Renaming Settings::RunTest to Settings::RunMozillaTests to be more descriptive. Leaving in check for old RunTest variable for now, in case there are some clients relying on that. -mcafee
git-svn-id: svn://10.0.0.236/trunk@125582 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-22 21:45:52 +00:00
joki%netscape.com
a588052207 Fix for bug 157845: mCurrentTarget pointer should not be set in the ESM without setting the NS_FRAME_EXTERNAL_REFERENCE bit. r:saari, sr:jst, a:chofmann
git-svn-id: svn://10.0.0.236/trunk@125581 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-22 21:36:36 +00:00
shrutiv%netscape.com
e649540c60 Fix for bugscape bug 17315: Help menu customizations aren't in MacOSX
(r=smeredith)


git-svn-id: svn://10.0.0.236/trunk@125580 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-22 21:34:32 +00:00
cbiesinger%web.de
eb1ac066c6 last checkin was for nick@technisys.com.ar who created that patch
git-svn-id: svn://10.0.0.236/trunk@125578 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-22 19:52:04 +00:00
cbiesinger%web.de
4fe07a1562 bug 158435 r=ksosez sr=bz a=jesup
Page Info's label-control association is broken (should be by id).


git-svn-id: svn://10.0.0.236/trunk@125577 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-22 19:51:16 +00:00
mikep%oeone.com
fbcfda6ec2 Fixing problem with attachments, from OEOne.
git-svn-id: svn://10.0.0.236/trunk@125575 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-22 18:54:15 +00:00
leaf%mozilla.org
3fa9d44ed2 add taskbar icons for applications, r=kerz,a=asa,b=158684
git-svn-id: svn://10.0.0.236/trunk@125574 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-22 18:01:41 +00:00
tao%netscape.com
0c28c38cf0 Initial checkin of the suit of scripts and files needed to leverage
translations from localized mozilla/netscape language packs into embed.jar.


git-svn-id: svn://10.0.0.236/trunk@125573 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-22 17:23:58 +00:00
kairo%kairo.at
cf73a02489 bug 158678 - adding missed help_help.html file, r=oeschger, dispensation of drviers per bug 122806
git-svn-id: svn://10.0.0.236/trunk@125572 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-22 17:10:21 +00:00
aaronl%netscape.com
11e8f2ad33 Not part of build. Bug 30088. Minor tweaks, getting ready for review
git-svn-id: svn://10.0.0.236/trunk@125571 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-22 14:55:02 +00:00
aaronl%netscape.com
71a8c22e47 Not part of build. Bug 30088. Minor tweaks, getting ready for review
git-svn-id: svn://10.0.0.236/trunk@125570 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-22 14:55:01 +00:00
rods%netscape.com
039c30685d fixing up test for more variants
git-svn-id: svn://10.0.0.236/trunk@125569 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-22 14:43:17 +00:00
rods%netscape.com
c4adb46d80 adding hidden iframe test
git-svn-id: svn://10.0.0.236/trunk@125568 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-22 14:02:27 +00:00
mikep%oeone.com
f04f61355f Patch from bug 123583.
git-svn-id: svn://10.0.0.236/trunk@125567 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-22 12:42:34 +00:00
jouni%heikniemi.net
f9bb67be21 Tree bustage fix of bug 157074: a filter had the wrong name in hidden-fields template.
git-svn-id: svn://10.0.0.236/trunk@125566 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-22 11:09:06 +00:00
rods%netscape.com
798b734575 Added additional tests cases for printing
git-svn-id: svn://10.0.0.236/trunk@125565 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-22 10:58:21 +00:00
rods%netscape.com
4d051a96ff When a FrameSet Frame's contains a FrameSet the mFrameType for the PrintObject
is always set to an eFrame. Which is fine when printing "AsIs"
but is incorrect when when printing "Each Frame Separately".
When printing "Each Frame Separately" the Frame really acts like a frameset.
So we need to set it to an eFrame
Bug 157918 r=dcone sr=kin a=scc


git-svn-id: svn://10.0.0.236/trunk@125564 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-22 10:55:07 +00:00
kyle.yuan%sun.com
8a0e6bc6e7 Not part of build.
Bug 157298 make install does not work in mozilla/widget/src/gtk2/mai
r=kyle
Thanks for mpeseng@tin.it's fix


git-svn-id: svn://10.0.0.236/trunk@125563 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-22 06:58:28 +00:00
kyle.yuan%sun.com
ba262e33d4 Not part of build.
Bug 153298 Translate nsIAccessible events to ATK events
r=kyle
Thanks for John Sun (john.sun@sun.com)'s fix


git-svn-id: svn://10.0.0.236/trunk@125562 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-22 06:57:08 +00:00
kerz%netscape.com
d651ed432f New desktop icons, r=cls, sr=bryner, a=asa, bug 73712
git-svn-id: svn://10.0.0.236/trunk@125558 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-21 23:15:55 +00:00
kerz%netscape.com
3636c59169 New desktop icons, r=cls, sr=bryner, a=asa
git-svn-id: svn://10.0.0.236/trunk@125557 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-21 23:04:48 +00:00
aaronl%netscape.com
c6f90015df Not part of build. Bug 30088 - type ahead find. Add support for nsITypeAheadFind.
git-svn-id: svn://10.0.0.236/trunk@125555 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-21 22:36:51 +00:00
gerv%gerv.net
d81b80bc41 Bug 95426 - remove $onebug cruft. Patch by gerv; 2xr=timeless.
git-svn-id: svn://10.0.0.236/trunk@125554 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-21 21:47:43 +00:00
hwaara%chello.se
38157b25b7 #125887, fix some cases where whitespace would make window.open() and openDialog() to not work.
r=jkeiser, sr=bzbarsky, a=brendan


git-svn-id: svn://10.0.0.236/trunk@125553 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-21 18:12:38 +00:00
gerv%gerv.net
f5446f3c7e Fixing trivial but obvious bug where "and QA contact" was not displaying correctly; noticed on b.m.o. No bug number.
git-svn-id: svn://10.0.0.236/trunk@125551 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-21 14:14:41 +00:00
pete.zha%sun.com
e7e1db9698 Forget one line in previou check in. Just add it now.
Sorry for this!


git-svn-id: svn://10.0.0.236/trunk@125550 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-21 11:19:39 +00:00
pete.zha%sun.com
5e7b11afb7 Summary: print to file overwrites file without asking
bug=107484 r=rods sr=bzbarsky a=scc


git-svn-id: svn://10.0.0.236/trunk@125549 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-21 10:59:57 +00:00
caillon%returnzero.com
035dbe91ce Bug 107147. "Using middle button to close a tab also pastes+opens url in another tab".
r=sicking
sr=jag
a=brendan


git-svn-id: svn://10.0.0.236/trunk@125546 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-21 01:48:34 +00:00
jkeiser%netscape.com
5d2a4473b9 Damn, missed this file. Part of bug 14445 update just now.
git-svn-id: svn://10.0.0.236/trunk@125545 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-20 23:44:21 +00:00
jkeiser%netscape.com
01341d9e3c Make radio buttons work without forms (bug 14445), r=rods@netscape.com, sr=jst@netscape.com, a=asa.
git-svn-id: svn://10.0.0.236/trunk@125544 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-20 23:09:24 +00:00
morse%netscape.com
255ebc1837 bug 155114, back out all patches for fixing cookie-stealing bug, a=asa
git-svn-id: svn://10.0.0.236/trunk@125535 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-20 07:38:16 +00:00
cltbld%netscape.com
7bc97b064e fixing reset home dir logic, sorry. -mcafee
git-svn-id: svn://10.0.0.236/trunk@125532 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-20 06:19:15 +00:00
shanjian%netscape.com
41e6689d50 #156943 CJK text underline is positioned too near the text
raise baseline for CJK language groups.
r=rbs, sr=waterson, a=adt


git-svn-id: svn://10.0.0.236/trunk@125531 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-20 05:21:25 +00:00
sfraser%netscape.com
5dfe57abb3 Fixing bug 155334 -- zombie progress dialog left after doing a File | Save As in plain text format. We were checking the STATE_IS_NETWORK flag to decide when the download has finished, but this flag is not included for plain text saves (nsWebBrowserPersist doesn't give it to us). So we look at the start flags, and make sure the end flag matches on this bit. Also detabbed the file.
git-svn-id: svn://10.0.0.236/trunk@125530 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-20 03:22:36 +00:00
sicking%bigfoot.com
96ef7647c7 Allow "chromenodes" to access all domains.
b=158167 r=bzbarsky sr=jst a=asa


git-svn-id: svn://10.0.0.236/trunk@125528 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-20 01:40:02 +00:00
hwaara%chello.se
79c60ad859 #62157, "Document content is rendered even though version value is not '1.0'." Make us care about what version is specified and bail out on anything but "1.0".
r=bzbarsky, sr=heikki, a=asa


git-svn-id: svn://10.0.0.236/trunk@125527 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-20 01:18:52 +00:00
shrutiv%netscape.com
8e7d878186 Fix for bugscape bug 16676: Customized Sidebar tab not working on MacOS
(r=shannond)


git-svn-id: svn://10.0.0.236/trunk@125526 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-20 00:58:58 +00:00
stephend%netscape.com
3b89268071 Bug 158264. Prefix showOpenURLDialog() with http://. r=caillon@netscape.com, sr=hewitt@netscape.com (also Module Owner), a=asa@mozilla.org
git-svn-id: svn://10.0.0.236/trunk@125525 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-20 00:40:49 +00:00
bzbarsky%mit.edu
544e250544 fix startup assertions, bug 154503, r=sicking, sr=dbaron, a=asa
git-svn-id: svn://10.0.0.236/trunk@125524 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-19 23:58:10 +00:00
bishakhabanerjee%netscape.com
8b20fbdd82 Setting number of tests to 252 to take out warnings on nightly QA reports -Bug 156959
git-svn-id: svn://10.0.0.236/trunk@125523 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-19 23:46:10 +00:00
pavlov%netscape.com
1da87a90e5 fixing bug 157202 r=dougt sr=tor@acm.org a=asa
git-svn-id: svn://10.0.0.236/trunk@125521 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-19 23:21:48 +00:00
leaf%mozilla.org
9f7cf37f8c updating to 1.1b
git-svn-id: svn://10.0.0.236/trunk@125520 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-19 23:08:41 +00:00
bzbarsky%mit.edu
993a541873 Tabbing to an <area> should scroll to it in addition to focusing it.
Bug 124769, r=sicking, sr=bryner, a=scc


git-svn-id: svn://10.0.0.236/trunk@125518 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-19 22:36:52 +00:00
varga%netscape.com
01fcfc5ac4 Fix for bug 128809 - Mail layout goes into infinite loop when "view headers all" is activated
r=kin, sr=bryner, a=scc


git-svn-id: svn://10.0.0.236/trunk@125517 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-19 22:36:46 +00:00
brendan%mozilla.org
615fd435f4 Don't return 1 cast to JSProperty* for a property found in a non-LiveConnect prototype object (155740, r=rogerl, sr=jband, a=chofmann/blizzard/scc).
git-svn-id: svn://10.0.0.236/trunk@125516 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-19 22:00:03 +00:00
leaf%mozilla.org
d71824c07d backout dataloss-causing fixes for 143862 and 156719, a=asa
git-svn-id: svn://10.0.0.236/trunk@125515 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-19 21:58:09 +00:00
shanjian%netscape.com
3816d9f036 #155175 Certain truetype fonts crash mozilla
correct a misuse of parenthesis.
p=Andrew Schultz  , r=bstell, sr=rbs, a=brendan


git-svn-id: svn://10.0.0.236/trunk@125513 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-19 21:21:23 +00:00
dougt%netscape.com
3560250015 compreg.tmp is written out on every startup. r=rjc, sr=alec, a=scc
git-svn-id: svn://10.0.0.236/trunk@125512 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-19 21:12:04 +00:00
sfraser%netscape.com
8bffb2130f Fix bug 155664 -- make URLs opened from the Services menu in another app behave like those opened via Apple Events etc, obeying the prefs to load in new tabs/windows, possibly in the background.
git-svn-id: svn://10.0.0.236/trunk@125511 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-19 21:08:25 +00:00
cltbld%netscape.com
87a19fce64 Adding ResetHomeDirForTests variable, some builds won't want to do this (chimera, etc.)
git-svn-id: svn://10.0.0.236/trunk@125510 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-19 21:03:01 +00:00
ducarroz%netscape.com
508651d4ca Fix for bug 158334. Fix memory corruption created by using PL_strcat on a buffer not wide enough. R=varada, SR=bienvenu
git-svn-id: svn://10.0.0.236/trunk@125509 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-19 20:58:32 +00:00
nhotta%netscape.com
e98305c34a Changed nsPlainTextSerializer to try NCR if CER conversion fails,
bug 40350, r=akkana, sr=kin, a=asa.


git-svn-id: svn://10.0.0.236/trunk@125508 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-19 20:50:14 +00:00
wtc%netscape.com
632cf0781e Bug 158339: we should not call secmod_freeParams if RNG_RNGInit fails.
git-svn-id: svn://10.0.0.236/trunk@125504 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-19 18:31:30 +00:00
despotdaemon%netscape.com
0ec1511934 Pseudo-automatic update of changes made by yxia@netscape.com.
git-svn-id: svn://10.0.0.236/trunk@125503 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-19 18:26:38 +00:00
despotdaemon%netscape.com
d6e2febb61 Pseudo-automatic update of changes made by knous@mozilla.org.
git-svn-id: svn://10.0.0.236/trunk@125502 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-19 17:59:28 +00:00
timeless%mac.com
16c47f8a29 Bug 158202 crash opening venkman and closing navigator [@nsXULElement::GetOwnerDocument]
patch by sicking@bigfoot.com r=bz sr=jst a=scc checkin authorized by scc


git-svn-id: svn://10.0.0.236/trunk@125500 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-19 17:03:03 +00:00
aaronl%netscape.com
8305292a8a Not part of build. Bug 30088: typeaheadfind - make sure we're not enabled in mailnews message pane, because we conflict with shortcuts link n for next unread message
git-svn-id: svn://10.0.0.236/trunk@125499 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-19 16:07:23 +00:00
mikep%oeone.com
f55f8c3805 Integrating changes from OEone calendar.
git-svn-id: svn://10.0.0.236/trunk@125498 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-19 15:56:53 +00:00
bbaetz%student.usyd.edu.au
0aee0fe7f3 Bug 157074 - verify-new-product doubles comment linefeeds on Win32
r=myk, jouni


git-svn-id: svn://10.0.0.236/trunk@125497 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-19 14:04:15 +00:00
timeless%mac.com
295afaadb1 Bug 151770 Can't associate Mozilla with .XBM images
patch by ask@swva.net r=law sr=alecf a=scc


git-svn-id: svn://10.0.0.236/trunk@125496 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-19 10:12:16 +00:00
samuel%sieb.net
21b6c7ef39 Bug 146509 - allow tab completion to work with non-alphanumeric characters
r=rginda
a=asa


git-svn-id: svn://10.0.0.236/trunk@125495 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-19 05:56:29 +00:00
samuel%sieb.net
f144c703ef Bug 135937 - clean up connection status (limit decimal points)
r=rginda
a=asa


git-svn-id: svn://10.0.0.236/trunk@125494 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-19 05:53:27 +00:00
samuel%sieb.net
8600889897 Bug 152182 - allow multiple channels for /join
r=rginda
a=asa


git-svn-id: svn://10.0.0.236/trunk@125493 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-19 05:51:00 +00:00
pete.zha%sun.com
5f76121e77 [ps] CSS sans-serif prints as serif
bug=148411 r=dcone sr=bzbarsky a=asa
Correct some font name in map


git-svn-id: svn://10.0.0.236/trunk@125490 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-19 02:41:41 +00:00
sfraser%netscape.com
6e833ccc5b Making the Colors and Links tab the default (bug 158152).
git-svn-id: svn://10.0.0.236/trunk@125489 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-19 02:26:53 +00:00
sfraser%netscape.com
5df7b90ed4 Fix for bug 155560 -- renaming bookmark does not update menu/toolbar. Also fixes crash when deleting a toolbar bookmark (bug 157229). Patch from David Hass.
git-svn-id: svn://10.0.0.236/trunk@125488 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-19 02:20:30 +00:00
sfraser%netscape.com
877fb645db Fix bug 154904-- fixing [BookmarkItem url] to return the url instead of the name.
git-svn-id: svn://10.0.0.236/trunk@125486 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-19 01:47:15 +00:00
jshin%mailaps.org
f7c6fa9d21 Add two new characters(Euro and Registered trade mark sign) to
KS X 1001 based converters (EUC-KR, UHC, JOHAB, ISO-2022-KR):
bug 134749: r=yokoyama, sr=alecf, a=asa


git-svn-id: svn://10.0.0.236/trunk@125485 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-19 01:42:16 +00:00
bzbarsky%mit.edu
dbb888b255 Fix GetQuotedAttributeValue's parsing. Bug 106163, r=sicking, sr=jag, a=asa
git-svn-id: svn://10.0.0.236/trunk@125483 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-19 01:14:29 +00:00
jpierre%netscape.com
563706c60a Fix for 158221 - make crlutil save memory by using the new PK11_ImportCRL function with the CRL_DECODE_DONT_COPY_DER option
git-svn-id: svn://10.0.0.236/trunk@125482 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-19 01:07:27 +00:00
jpierre%netscape.com
a6c742786a 158005 - add new CRL decode and import functions . Benefits are :
- ability to import to any slot
- ability to specify decode options, such as "don't copy DER"
- ability to specify import options, such as "don't do CRL checks"
This patch also maps the existing functions SEC_NewCrl and CERT_ImportCRL
to this new function, eliminating the code duplication that existed


git-svn-id: svn://10.0.0.236/trunk@125481 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-19 00:59:34 +00:00
bryner%netscape.com
50f9170ec7 Enable full-screen mode for unix. Bug 126685, r=blizzard, sr=sfraser, a=asa.
git-svn-id: svn://10.0.0.236/trunk@125480 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-19 00:43:00 +00:00
nicolson%netscape.com
3c4986240c Fix 157998: unable to importCertToPerm
git-svn-id: svn://10.0.0.236/trunk@125478 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-19 00:20:24 +00:00
jpierre%netscape.com
66501867de Fix for 156802 - remove improper check in CRL decoding
git-svn-id: svn://10.0.0.236/trunk@125477 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-19 00:12:13 +00:00
jpierre%netscape.com
7f01d87246 Remove unreferenced variables
git-svn-id: svn://10.0.0.236/trunk@125476 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-18 23:50:03 +00:00
rginda%netscape.com
19d0492d88 - venkman only -
bug 158181, "this.tabs has no properties error when script is unloaded"
r=caillon, a=asa
null check for content before we actually try to use it (in source2 view)
also fixes spelling error, strict warning, and margin-clicking in the source2 view


git-svn-id: svn://10.0.0.236/trunk@125475 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-18 23:27:49 +00:00
jpierre%netscape.com
e635a3cd71 Fix for 139292 - NSS_NoDBInit regression
git-svn-id: svn://10.0.0.236/trunk@125474 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-18 23:08:55 +00:00
pavlov%netscape.com
9d33b5519d fix for bug 157202. r=dougt sr=tor@acm.org a=chofmann
git-svn-id: svn://10.0.0.236/trunk@125472 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-18 22:18:11 +00:00
shannond%netscape.com
1aac970cf4 Backing out bug 147978 - the copy of an existing config should use its own Workspace
since it causes regression
bug 157807 - Creating a new configuration in CCK duplicates fields ...
approval for backout from ariana and shrutiv


git-svn-id: svn://10.0.0.236/trunk@125469 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-18 20:15:02 +00:00
shannond%netscape.com
67dde85655 Backing out bug 147978 - The copy of an existing config should use its own Workspace
since it causes regression
bug 157807 - Creating a new configuration in CCK duplicates fields ...
approval for backout from ariana and shrutiv


git-svn-id: svn://10.0.0.236/trunk@125468 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-18 20:07:28 +00:00
aaronl%netscape.com
14aeefa20e Not part of build. Bug 30088: type ahead find. Support Accel+Shift+G for find previous
git-svn-id: svn://10.0.0.236/trunk@125467 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-18 19:11:54 +00:00
smeredith%netscape.com
9d364937d7 Disable the homepage buttons if the homepage pref is locked.
git-svn-id: svn://10.0.0.236/trunk@125466 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-18 18:42:44 +00:00
pschwartau%netscape.com
d61df3aa38 Initial add. Regression test for bug 141078.
git-svn-id: svn://10.0.0.236/trunk@125465 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-18 18:36:44 +00:00
aaronl%netscape.com
10b640ad3a Not part of build. Bug 30088 - type ahead find. Ctrl+G now respects linksonly setting
git-svn-id: svn://10.0.0.236/trunk@125464 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-18 18:32:54 +00:00
bienvenu%netscape.com
603ae8ef36 fix undo of delete of top level msg in thread r=cavin, antonio.xu@sun, sr=sspitzer, a=asa 157503
git-svn-id: svn://10.0.0.236/trunk@125463 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-18 14:48:38 +00:00
bienvenu%netscape.com
c15a216b07 fix crash selecting bogus line in thread pane for imap folder, r=cavin, sr=sspitzer 157503
git-svn-id: svn://10.0.0.236/trunk@125462 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-18 14:45:08 +00:00
dougt%netscape.com
4cb4da3135 attempting to fix the AIX bustage
git-svn-id: svn://10.0.0.236/trunk@125461 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-18 14:38:07 +00:00
aaronl%netscape.com
77c6e7b67c Not part of build. Bug 30088 - type ahead find. Fixes problem with type ahead find locking up
git-svn-id: svn://10.0.0.236/trunk@125460 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-18 14:19:31 +00:00
arougthopher%lizardland.net
1b134606f6 Bug#155404
File names generated in File Save As menu are incorrect in BeOS.

r=arougthopher
a=scc


git-svn-id: svn://10.0.0.236/trunk@125459 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-18 12:09:09 +00:00
rods%netscape.com
7d81f1b38d need to check BUSY_FLAGS_PAGE_LOADING before printing
Bug 157632 r=dcone sr=jst a=scc


git-svn-id: svn://10.0.0.236/trunk@125458 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-18 09:09:54 +00:00
jaggernaut%netscape.com
55af1e7936 Bug 107848: Wrong tab is closed when last but one tab is closed. r=caillon, sr=ben, a=asa
git-svn-id: svn://10.0.0.236/trunk@125457 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-18 07:31:10 +00:00
dougt%netscape.com
f7575b0db1 backout out change
git-svn-id: svn://10.0.0.236/trunk@125456 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-18 07:19:45 +00:00
dougt%netscape.com
e9d9254cc7 backing out
git-svn-id: svn://10.0.0.236/trunk@125454 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-18 06:58:27 +00:00
dougt%netscape.com
78e286b83d Dynamic loading is failing on linux. disabling
git-svn-id: svn://10.0.0.236/trunk@125453 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-18 06:49:48 +00:00
dougt%netscape.com
c2c2197ef6 fixing bustage
git-svn-id: svn://10.0.0.236/trunk@125452 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-18 06:49:05 +00:00
dougt%netscape.com
9a11c0aedc backing out that last change
git-svn-id: svn://10.0.0.236/trunk@125450 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-18 06:34:18 +00:00
dougt%netscape.com
eb41b992e3 best guess at how to fix gtk orangeness
git-svn-id: svn://10.0.0.236/trunk@125449 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-18 06:29:21 +00:00
sicking%bigfoot.com
c52d22c28d Reenable same-origin checks. Patch by me and jst.
b=156452 r=peterv/sicking/jst sr=bz/jst a=chofmann


git-svn-id: svn://10.0.0.236/trunk@125447 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-18 05:53:28 +00:00
henry.jia%sun.com
55ec460407 Fix bug 27002:
Cyrus IMAP: Send and Save as Draft/Template problems on Cyrus

Patch description:
Add personal namespace support for specific folders' uri. This patch can also solve the blocker bug 90494 which is related the same problems of Courier IMAP server.

patch by Henry.Jia@sun.com
r=cavin@netscape.com, sr=bienvenu@netscape.com, a=chofmann@netscape.com


git-svn-id: svn://10.0.0.236/trunk@125446 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-18 05:41:42 +00:00
despotdaemon%netscape.com
697f1a9465 Pseudo-automatic update of changes made by t_mutreja@yahoo.com.
git-svn-id: svn://10.0.0.236/trunk@125445 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-18 05:23:23 +00:00
dougt%netscape.com
ecdd8ab65f Fixes the following:
154047
This change cleans up the category manager in hopes to freeze it for 1.1 final.  This change removes dead and unsupported methods from the interface as well as removes the C++ code from the interface.  This should land for 1.1b since users of the current category manager will have to update their components.

157597
Make embedding base and examples use XPCOM Glue
This change makes our embedding samples use the XPCOM glue.

157625
nsLocalFile::Remove's file pointer is sometimes null afte...
This fixes a crash when we dereference null.  It is a bandaide fix as the real problems involves retooling the directory enumerator.

157801
This fixes a terrible state which you can get into whereby XPCOM will fail to startup regardless of what you do.  The fix is to cause autoreg to happen if the component registry (compreg.dat) is not found.

r/sr=alecf@netscape.com, rpotts@netscape.com.  a=scc@mozilla.org


git-svn-id: svn://10.0.0.236/trunk@125444 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-18 05:09:10 +00:00
jaggernaut%netscape.com
dfa9bd5ea2 Bug 140673: Some Arabic/Hebrew bitmap fonts printed way too small with Xprint. Patch by Roland.Mainz@informatik.med.uni-giessen.de, r=smontagu, sr=dveditz, a=scc
git-svn-id: svn://10.0.0.236/trunk@125443 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-18 04:26:35 +00:00
leaf%mozilla.org
d34eba106d Automated update
git-svn-id: svn://10.0.0.236/trunk@125442 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-18 04:25:47 +00:00
seawood%netscape.com
df86a25798 Remove DARWIN define from osx builds as it cripples the feature set provided by
OSX headers.
Bug #154232 r=wtc sr=scc a=scc


git-svn-id: svn://10.0.0.236/trunk@125441 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-18 04:11:48 +00:00
seawood%netscape.com
5a25868f3a Remove DARWIN define from osx builds as it cripples the feature set provided by OSX headers.
Bug #154232 r=wtc sr=scc a=scc


git-svn-id: svn://10.0.0.236/trunk@125440 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-18 04:09:30 +00:00
varga%netscape.com
8e87af728a Fix for bug 82840 - need treecolgroups to have fixed="true" be as wide as the column header
and bug 72513 - column header text not shown: Enabled (in fitler dialog) and Subscribed (in subscribe dialog)

r=bienvenu
sr=sspitzer
a=scc


git-svn-id: svn://10.0.0.236/trunk@125439 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-18 04:09:11 +00:00
jaggernaut%netscape.com
e7ec69df4b Bug 142623: No reload of Language strings due to XUL FastLoad. Patch by John Morrison <jrgm@netscape.com>, r=ben, sr=brendan, a=chofmann.
git-svn-id: svn://10.0.0.236/trunk@125437 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-18 04:00:31 +00:00
caillon%returnzero.com
208a6f8e3c Checkin for Mike Kowalski <mikejk@ameritech.net>
Bug 126600 - Reword the turbo preference.  r=caillon sr=bryner a=scc


git-svn-id: svn://10.0.0.236/trunk@125435 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-18 03:22:29 +00:00
pete.zha%sun.com
d2cab5173e Freeing mismatched memory in delete
bug=157184 r=naving sr=bienvenu a=scc patch=antonio.xu@sun.com


git-svn-id: svn://10.0.0.236/trunk@125433 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-18 02:48:52 +00:00
jshin%mailaps.org
195409b999 Combining EUC-KR and UHC decoders into one (bug 131388)
r=yokoyama, sr=alecf, a=scc


git-svn-id: svn://10.0.0.236/trunk@125432 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-18 02:40:19 +00:00
kyle.yuan%sun.com
73d1262924 Bug 131883 All filenames of attachment disappeared by resizing attachment area;
r=hewitt, sr=scc, a=scc
Force listitem's rect to be recalculated when its parent was going wider.


git-svn-id: svn://10.0.0.236/trunk@125430 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-18 02:19:12 +00:00
kyle.yuan%sun.com
1c01d792f8 Bug 134916 left arrow to select parent of currently selected row does not scroll to parent
r=varga, sr=bzbarsky, a=scc
Add ensureRowIsVisible in keypress handler when keycode="left"


git-svn-id: svn://10.0.0.236/trunk@125429 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-18 02:16:54 +00:00
kyle.yuan%sun.com
00aca9ccd9 Bug 140227 Strange shift+click and ctrl+click behaviour in single-selection listbox
r=neil@parkwaycc.co.uk, sr=bzbarsky, a=scc
Check "selType" in mouse click handler


git-svn-id: svn://10.0.0.236/trunk@125428 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-18 02:16:32 +00:00
hwaara%chello.se
cc965819e8 #156074, processing-instructions should be better denoted.
r=caillon, tim <riceman+bmo@mail.rit.edu>
sr=bzbarsky
a=scc

#156072, DOM inspector omits the #document node, and also doesn't show any sibling nodes to the root element (comments, text nodes, etc.)
r=caillon, tim <riceman+bmo@mail.rit.edu>
sr=bzbarsky
a=scc


git-svn-id: svn://10.0.0.236/trunk@125427 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-18 02:04:12 +00:00
bzbarsky%mit.edu
1365591a1e Make sure that painting is properly unsuppressed in XML docs. Bugs
156985, 81546, 157487, r=dbaron, sr=rbs, a=scc


git-svn-id: svn://10.0.0.236/trunk@125425 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-18 01:49:47 +00:00
naving%netscape.com
64e02d9ae6 157809 r=cavin sr=bienvenu a=scc fixing can't delete imap folders when using "mark as deleted" delete model
git-svn-id: svn://10.0.0.236/trunk@125422 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-18 01:18:14 +00:00
jkeiser%netscape.com
b5ecb6dda7 Make select clear when last option is removed from it (bug 154410), r=bzbarsky@mit.edu, sr=dbaron@fas.harvard.edu, a=asa
git-svn-id: svn://10.0.0.236/trunk@125421 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-18 00:58:31 +00:00
rginda%netscape.com
a0e80802d0 - venkman only -
bug 157638, "Land VENKMAN_FLOATS_MY_BOAT branch", a=scc
Landing the 3 month old branch, which fixes the following bugs...
121409, 103898, 116102, 116099, 127750, 127099, 121501, 127102, 127737, 127733, 150481, 156776, 156769, 153381, 153066, 152946, 127752, 116286, 143682, 130398, 129692, 156111, 127736, 130050, 139565, 128604, 127751, 127732, 127727, 103425, 85634, 139557, 125394


git-svn-id: svn://10.0.0.236/trunk@125420 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-18 00:54:32 +00:00
sfraser%netscape.com
0a23433cb9 Adding code to make stdout and stderr unbuffered, depending on the MOZ_UNBUFFERED_STDIO environment variable. This is needed for tests to run correctly.
git-svn-id: svn://10.0.0.236/trunk@125419 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-18 00:26:49 +00:00
jkeiser%netscape.com
77550ff3b4 Make form submission behave better in low-mem situations (bug 126941), r=sicking@bigfoot.com, sr=bzbarsky@mit.edu, a=asa
git-svn-id: svn://10.0.0.236/trunk@125418 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-18 00:23:09 +00:00
leaf%mozilla.org
080c774ee3 bug 154840, r=cls, sr=brendan, a=jesup update localeVersion strings
git-svn-id: svn://10.0.0.236/trunk@125417 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-17 23:51:49 +00:00
morse%netscape.com
b97395f839 bug 155114, stealing cookies based on path attribute, r=mstoltz, sr=jag, a=chofmann
git-svn-id: svn://10.0.0.236/trunk@125415 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-17 23:38:28 +00:00
nhotta%netscape.com
3773761d91 Restore my previous changes with mach-o build fix,
bug 108029, r=pinkerton, sr=sfraser, a=asa.


git-svn-id: svn://10.0.0.236/trunk@125410 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-17 23:05:30 +00:00
alecf%netscape.com
6a0f892905 remove .cvsignore from this empty directory - not part of the build in any way!
git-svn-id: svn://10.0.0.236/trunk@125408 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-17 22:56:34 +00:00
jpierre%netscape.com
01d9d47333 Fix usage
git-svn-id: svn://10.0.0.236/trunk@125407 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-17 22:53:33 +00:00
jpierre%netscape.com
20b1f3fa86 Fix for 157996 - add support for SEC_NewCrl browser emulation mode in crlutil
git-svn-id: svn://10.0.0.236/trunk@125405 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-17 22:22:26 +00:00
brade%netscape.com
49ccc35a74 bug 157851, 157923, 157811, 157440, and probably some others; cleanup attribute adding for meta tags and fix table api
git-svn-id: svn://10.0.0.236/trunk@125401 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-17 21:32:20 +00:00
wtc%netscape.com
8fb7a6ccd5 Bug 157946: removed the unused -m option. Added the -v option to Usage().
git-svn-id: svn://10.0.0.236/trunk@125397 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-17 18:39:02 +00:00
gerv%gerv.net
02ee939574 Bug 151648 - QA Contact stuff displayed even if you aren't using QA Contacts. 2xr=jouni.
git-svn-id: svn://10.0.0.236/trunk@125394 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-17 18:28:37 +00:00
pschwartau%netscape.com
1c0c54a637 Skip testcase for bug 157652. Will not fix this in Rhino; the OOM error is reasonable.
git-svn-id: svn://10.0.0.236/trunk@125393 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-17 18:20:58 +00:00
sfraser%netscape.com
b5c586f6ef Adding the Appearance.prefPane to the static target build settings.
git-svn-id: svn://10.0.0.236/trunk@125389 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-17 17:37:44 +00:00
karnaze%netscape.com
79e5539aec new regression tests, not affecting the build.
git-svn-id: svn://10.0.0.236/trunk@125388 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-17 16:51:52 +00:00
despotdaemon%netscape.com
a16e42c146 Pseudo-automatic update of changes made by knous@mozilla.org.
git-svn-id: svn://10.0.0.236/trunk@125387 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-17 16:42:02 +00:00
rods%netscape.com
1e79bb6ab0 Add additional test to printing test files
git-svn-id: svn://10.0.0.236/trunk@125386 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-17 13:37:59 +00:00
timeless%mac.com
3f5cca095a Bug 140630 LDAP should be in capital letters
patch by neil@parkwaycc.co.uk r=dmose sr=bienvenu a=asa


git-svn-id: svn://10.0.0.236/trunk@125385 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-17 13:19:16 +00:00
timeless%mac.com
3e602a9f04 Bug 156368 quicksearch fails if focus was in threadpane before search box
patch by neil@parkwaycc.co.uk r=naving sr=bienvenu a=asa


git-svn-id: svn://10.0.0.236/trunk@125384 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-17 13:06:09 +00:00
bryner%netscape.com
ba5e37b831 We don't need pippki.xpt either.
git-svn-id: svn://10.0.0.236/trunk@125382 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-17 08:52:43 +00:00
rbs%maths.uq.edu.au
13627c98ae re-enabling MathML after peterv's fixup
git-svn-id: svn://10.0.0.236/trunk@125381 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-17 07:23:16 +00:00
peterv%netscape.com
58298ba6cd Fixing MathML packaging bustage on Mac.
git-svn-id: svn://10.0.0.236/trunk@125380 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-17 07:17:05 +00:00
axel%pike.org
d1e791d134 adding an id to the QA menupopup, so one can overlay that. bug 157382, r=neil@parkwaycc.co.uk, sr=alecf, a=asa
git-svn-id: svn://10.0.0.236/trunk@125379 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-17 07:04:30 +00:00
bryner%netscape.com
98bebf9f26 Remove libpippki. This is only needed for the XUL implementation of the security dialogs.
git-svn-id: svn://10.0.0.236/trunk@125378 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-17 06:22:42 +00:00
wtc%netscape.com
3c02768be9 Bug 141614: restored Matthew Zahorik's net_server nonblocking connect
logic, which accidentally got deleted when the BONE changes were checked
in. This patch was contributed by Arougthopher
<arougthopher@lizardland.net>.
Modified Files: bfile.c bmisc.c bnet.c


git-svn-id: svn://10.0.0.236/trunk@125377 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-17 06:04:42 +00:00
mkaply%us.ibm.com
d78fa03226 #157770
r=dougt, sr=blizzard, a=asa
OS/2 only - up the numbre of file handles when starting Moz, and handle specific error with DosCopy


git-svn-id: svn://10.0.0.236/trunk@125373 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-17 05:46:34 +00:00
mkaply%us.ibm.com
beb0c00835 #157758
r=pedemont, sr=blizzard, a=asa
OS/2 only - always use facename rather than familyname for DBCS fonts


git-svn-id: svn://10.0.0.236/trunk@125372 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-17 05:42:07 +00:00
mkaply%us.ibm.com
281419934a #157383
r=pedemont, sr=blizzard, a=asa
OS/2 only - truncate title bar text to 256 to workaround OS bug


git-svn-id: svn://10.0.0.236/trunk@125370 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-17 05:36:04 +00:00
despotdaemon%netscape.com
30cf0df97e Pseudo-automatic update of changes made by t_mutreja@yahoo.com.
git-svn-id: svn://10.0.0.236/trunk@125368 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-17 05:33:09 +00:00
bzbarsky%mit.edu
02fd13d54d Bug 114627 -- ESC should dismiss default plugin dialog. Patch by
Andre  Dahlqvist <anedah-9@student.luth.se>, r=serge, sr=blizzard, a=asa


git-svn-id: svn://10.0.0.236/trunk@125364 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-17 04:36:13 +00:00
leaf%mozilla.org
2b20d4bbf7 Automated update
git-svn-id: svn://10.0.0.236/trunk@125358 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-17 02:40:21 +00:00
leaf%mozilla.org
59f26094d7 bug 157558, r=cls. version string updates for upcoming 1.1b
git-svn-id: svn://10.0.0.236/trunk@125357 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-17 02:39:51 +00:00
pete.zha%sun.com
3d85f30820 Implementation the nsIAccessibleTable for XUL tree table
bug=155866, r=kyle, sr=jst, a=asa


git-svn-id: svn://10.0.0.236/trunk@125356 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-17 02:32:17 +00:00
karnaze%netscape.com
e1b0af4e1d bug 153785 - Added function to undo splitting floaters when the line they are on gets moved to the next page. Cached the break type of the last floater that gets split in the block reflow state so that the frame afterh the floater's continuation can combine that break type with its own. a=asa, sr=kin, r=alexsavulov
git-svn-id: svn://10.0.0.236/trunk@125355 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-17 01:48:56 +00:00
wtc%netscape.com
8db48c9761 Bug 157347: deleted the code that tried to escape the quotes around
command-line arguments. The patch was contributed by Michael Kaply
<mkaply@us.ibm.com>. r=wtc.


git-svn-id: svn://10.0.0.236/trunk@125353 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-17 01:45:57 +00:00
kyle.yuan%sun.com
54b0837973 Bug 154089 "My Sidebar" in Address Book can't show at the first time
r=morse, sr=alecf, a=asa
Thanks for Robin Lu (robin.lu@sun.com)'s fix


git-svn-id: svn://10.0.0.236/trunk@125351 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-17 01:36:37 +00:00
glen.beasley%sun.com
7f5a5a618a typecast for AIX build proper way
git-svn-id: svn://10.0.0.236/trunk@125349 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-17 01:14:58 +00:00
akkana%netscape.com
03e46541b4 Add a target to make the xpi. Not part of the normal build.
git-svn-id: svn://10.0.0.236/trunk@125348 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-17 01:04:10 +00:00
nhotta%netscape.com
fb56d1e2c0 Back out my last changes for the mach-o build problem.
git-svn-id: svn://10.0.0.236/trunk@125347 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-17 00:38:33 +00:00
rbs%maths.uq.edu.au
ea6e894339 Turn off the build of MathML to attempt to fix the bustage
git-svn-id: svn://10.0.0.236/trunk@125346 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-17 00:31:47 +00:00
jpierre%netscape.com
85c326e9c8 Fix for 153245
git-svn-id: svn://10.0.0.236/trunk@125345 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-17 00:21:09 +00:00
rbs%maths.uq.edu.au
21c0ccc330 Attempt to fix Mac bustage
git-svn-id: svn://10.0.0.236/trunk@125344 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-17 00:09:59 +00:00
glen.beasley%sun.com
24132ce4c9 typecast for AIX build
git-svn-id: svn://10.0.0.236/trunk@125343 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-16 23:52:45 +00:00
rbs%maths.uq.edu.au
b074819e6d Whitespace to add a=drivers, b=155703, r=peterv, sr=sfraser, a=asa
git-svn-id: svn://10.0.0.236/trunk@125342 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-16 23:29:54 +00:00
rbs%maths.uq.edu.au
b0b7a20bdb Turn on MathML in the Mac build, b=155703, r=peterv, sr=sfraser
git-svn-id: svn://10.0.0.236/trunk@125340 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-16 23:25:55 +00:00
rbs%maths.uq.edu.au
178b6c2d5e Implement GetBoundingMetrics() on the Mac. p=schofield@wolfram.com, r=rbs, sr=sfraser, a=asa
git-svn-id: svn://10.0.0.236/trunk@125338 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-16 23:18:37 +00:00
curt%netscape.com
908b8255d4 Disabled functionality for refreshing icons because it was causing unacceptable
side effects.
  (Bug #154708, r=ssu, sr=dveditz, a=asa)


git-svn-id: svn://10.0.0.236/trunk@125336 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-16 23:07:24 +00:00
bryner%netscape.com
cab12511d4 Rework the x86 unix + gcc xptcall implementation to speed it up and allow it to work with gcc 3.1 (bug 140412). Patch by drepper@redhat.com, r=shaver, sr=blizzard.
git-svn-id: svn://10.0.0.236/trunk@125335 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-16 23:05:11 +00:00
bryner%netscape.com
9a806c60fe Implement activate and deactivate events for chimera (bug 157648). r=sfraser.
git-svn-id: svn://10.0.0.236/trunk@125334 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-16 22:55:36 +00:00
bryner%netscape.com
e7c2ffe30a Fix cookie chrome registration for embedding (bug 153581). r=pinkerton, sr=bzbarsky, a=asa.
git-svn-id: svn://10.0.0.236/trunk@125333 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-16 22:51:52 +00:00
bryner%netscape.com
6ada3edcd7 Implement nsIWidget::HideWindowChrome() for gtk (bug 157371). r=blizzard, sr=jag, a=asa.
git-svn-id: svn://10.0.0.236/trunk@125332 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-16 22:49:33 +00:00
jkeiser%netscape.com
701be434fb Make save/restore work for all forms, not just the first (bug 138892), r=rods@netscape.com, sr=attinasi@netscape.com, a=asa
git-svn-id: svn://10.0.0.236/trunk@125331 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-16 22:38:51 +00:00
aaronl%netscape.com
d4699db840 Not part of build. Bug 30088 - type ahead find. Fixes it so that you must type backspace to remove a character from the buffer.
git-svn-id: svn://10.0.0.236/trunk@125330 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-16 22:30:10 +00:00
jfrancis%netscape.com
50be087f7b fix for Bug 154932: Mozilla will not start on MacOS 8.6 if filesharing is on. Corrected the construction of an FSSpec in nsDirectoryService.cpp
r=ccarlen
sr=sfraser


git-svn-id: svn://10.0.0.236/trunk@125329 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-16 22:17:56 +00:00
aaronl%netscape.com
78ee60a834 Not part of build. Bug 30088 - type ahead find. Fixes it so that feature is not activated in isindex or input type=file. Typing / now indicates text only search, a quote now indicates link search. Fixes repeated character so it only cycles through links if the exact repeated characters cannot be found repeated like that in the text/links
git-svn-id: svn://10.0.0.236/trunk@125326 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-16 22:08:55 +00:00
pschwartau%netscape.com
bd64afa8ab Changing summary text.
git-svn-id: svn://10.0.0.236/trunk@125324 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-16 21:35:30 +00:00
nhotta%netscape.com
0c40fcbd93 For mailto URL, convert spec to UTF-8 (from origin charset) if necessary,
bug 141134, r=ducarroz, sr=bienvenu, a=asa.


git-svn-id: svn://10.0.0.236/trunk@125323 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-16 21:34:25 +00:00
pschwartau%netscape.com
223e70cbbd Initial add. Regression test for bug 157652.
git-svn-id: svn://10.0.0.236/trunk@125322 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-16 21:23:58 +00:00
ducarroz%netscape.com
71d5be248f Fix for bug 143882 (remaining problem). We need to remove internal headers when sending message as attachment. R=varada, SR=bienvenu, A=asa
git-svn-id: svn://10.0.0.236/trunk@125321 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-16 21:18:46 +00:00
igor%mir2.org
64213cbcf3 Serialization fixes to correctly restore members and related fields in NativeJavaClass.
git-svn-id: svn://10.0.0.236/trunk@125320 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-16 21:17:09 +00:00
igor%mir2.org
8b45eec30f Fixing the bug 157196: custom serialization of ScriptableObject not to save deleted/empty slot.
git-svn-id: svn://10.0.0.236/trunk@125319 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-16 21:15:51 +00:00
wtc%netscape.com
76a809a67c Bug 157750: handle the possibility that some certs do not have a label.
git-svn-id: svn://10.0.0.236/trunk@125316 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-16 21:13:40 +00:00
nhotta%netscape.com
f5796b5f71 Changed charset conversions for clipboard, D&D,
* copy from Mozilla, added fallback to try non system default scripts
* copy to Mozilla, check 'styl' and if available use that script instead of
using the system's default
bug 108029, r=pinkerton, sr=sfraser, a=asa.


git-svn-id: svn://10.0.0.236/trunk@125312 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-16 19:38:08 +00:00
despotdaemon%netscape.com
1b7caa10dc Pseudo-automatic update of changes made by knous@mozilla.org.
git-svn-id: svn://10.0.0.236/trunk@125308 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-16 18:45:22 +00:00
sfraser%netscape.com
111f6a2e8d Adding files for the Appearance prefs panel, and adding this panel to the static build target.
git-svn-id: svn://10.0.0.236/trunk@125305 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-16 17:47:23 +00:00
sfraser%netscape.com
01c46ae9cd Adding the Appearance prefs panel to the list of panels, fixing the prefs panel base class to use UTF-8 for prefs, and adding a changeFont handler on the window's controller that can forward changeFont() messages back to the current prefs pane (used by the Appearance pane).
git-svn-id: svn://10.0.0.236/trunk@125304 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-16 17:45:48 +00:00
sfraser%netscape.com
2a055af3f8 More changes for the fonts prefs panel.
git-svn-id: svn://10.0.0.236/trunk@125303 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-16 17:43:43 +00:00
igor%mir2.org
0b2c94950a Checking for 1.2 version in toString for objects and arrays is replaced by calling cx.hasFeature(Context.FEATURE_TO_STRING_AS_SOURCE) to allow to control toString from applications without switching on other JS 1.2 features.
git-svn-id: svn://10.0.0.236/trunk@125302 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-16 17:42:18 +00:00
igor%mir2.org
f3367c89e9 I removed startString/getString and their support code as TokenStream uses its own buffer and fixed the bug 151337 which was cause by incorrect getLine
git-svn-id: svn://10.0.0.236/trunk@125301 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-16 17:37:46 +00:00
relyea%netscape.com
48c6b9c1ce Automatically recover from database corruptions when importing new certs.
git-svn-id: svn://10.0.0.236/trunk@125299 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-16 16:44:22 +00:00
ian%hixie.ch
4dcb11a39f Some minor code fixups with no semantic change. Also, fixed the getArgumentsAsString method to not screw up the output when there are empty arrays in the arguments hash (as can happen when you call createArgument, which happens when getArgument is called and the argument is missing) and when the arguments hash contains scalars.
git-svn-id: svn://10.0.0.236/trunk@125298 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-16 15:50:14 +00:00
peterv%netscape.com
76b49d7465 Temporarily disable the code that caused the slowdown in Txul, Tp and Ts. Bug 156452.
git-svn-id: svn://10.0.0.236/trunk@125297 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-16 15:46:39 +00:00
ian%hixie.ch
690d2c0bef Add support for a command which does nothing but pass its argument to the output system. This is especially useful for templates that want to show other templates without actually doing anything else, and so the command is called 'showTemplate'.
git-svn-id: svn://10.0.0.236/trunk@125296 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-16 15:46:28 +00:00
dbaron%fas.harvard.edu
f9da4499fa Work around crashes at ChildIterator::get using bounds check on ChildIterator::seek. sr=waterson r=kin a=asa b=133219
git-svn-id: svn://10.0.0.236/trunk@125295 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-16 14:53:43 +00:00
sicking%bigfoot.com
7ef44d6e76 Add same-origin checks in a few DOM methods. Patch by me and jst.
b=156452, r=jst/me, sr=bz, a=pending


git-svn-id: svn://10.0.0.236/trunk@125294 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-16 13:09:15 +00:00
axel%pike.org
3495eca2d7 remove security checks from buster, it's chrome:// now. Not part of build
git-svn-id: svn://10.0.0.236/trunk@125293 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-16 11:58:26 +00:00
locka%iol.ie
4bd8981445 Move appstrings.properties into new docshell/resources dir. b=156988 r=brade@netscape.com sr=rpotts@netscape.com a=asa@mozilla.org
git-svn-id: svn://10.0.0.236/trunk@125292 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-16 11:54:44 +00:00
kairo%kairo.at
7d69abde8e reorder/split strings in language/content pref panel to better remind users of restarting, bug 137324, r=axel@pike.org, sr=alecf, a=asa
git-svn-id: svn://10.0.0.236/trunk@125291 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-16 09:38:42 +00:00
despotdaemon%netscape.com
4b278d819a Pseudo-automatic update of changes made by bugreport@peshkin.net.
git-svn-id: svn://10.0.0.236/trunk@125275 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-16 03:26:59 +00:00
dveditz%netscape.com
f2f1b42a6b Correct preference escaping for bug 143459, r=bnesse,mstoltz sr=alecf, a=asa
git-svn-id: svn://10.0.0.236/trunk@125273 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-16 02:09:34 +00:00
kyle.yuan%sun.com
98c1392734 Sorry, my previous checkin is not the final one. Fixed!
git-svn-id: svn://10.0.0.236/trunk@125272 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-16 01:45:38 +00:00
jkeiser%netscape.com
d0f3fe54a4 Make form.submit() work in onSubmit in standards mode (bug 155453), r=bzbarsky@mit.edu, sr=jst@netscape.com
git-svn-id: svn://10.0.0.236/trunk@125270 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-16 01:43:21 +00:00
sdagley%netscape.com
23ed5d660d Fix #143543 - Work around Nav Services 1.0 flaw so Save File dialogs works on Mac OS 8.6. r/sr=sfraser, a=asa
git-svn-id: svn://10.0.0.236/trunk@125269 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-16 01:39:39 +00:00
kyle.yuan%sun.com
ac37835845 Bug 154929 Wrong behavior when dragging splitter in mail thread pane
r=varga, sr=bryner, a=asa
omitted hidden columns when dragging


git-svn-id: svn://10.0.0.236/trunk@125268 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-16 01:23:43 +00:00
jpierre%netscape.com
5a725d3799 Make certutil use the new CERT_VerifyCertificate function when verifying certs
git-svn-id: svn://10.0.0.236/trunk@125265 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-16 00:45:50 +00:00
despotdaemon%netscape.com
d3b242d8b6 Pseudo-automatic update of changes made by knous@mozilla.org.
git-svn-id: svn://10.0.0.236/trunk@125261 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-16 00:03:14 +00:00
dougt%netscape.com
44e616bb84 Fixing bug 157192. r=me, sr=dbaron, a=asa.
git-svn-id: svn://10.0.0.236/trunk@125259 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-15 23:32:36 +00:00
despotdaemon%netscape.com
be927b60f1 Pseudo-automatic update of changes made by knous@mozilla.org.
git-svn-id: svn://10.0.0.236/trunk@125258 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-15 23:31:05 +00:00
despotdaemon%netscape.com
b72e38951c Pseudo-automatic update of changes made by knous@mozilla.org.
git-svn-id: svn://10.0.0.236/trunk@125257 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-15 23:21:01 +00:00
pschwartau%netscape.com
be4875d3c7 Initial add. Regression test for bug 58274.
git-svn-id: svn://10.0.0.236/trunk@125256 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-15 23:20:15 +00:00
pschwartau%netscape.com
4c78026770 Initial add. Testing identifiers with double-byte names; see bug 58274.
git-svn-id: svn://10.0.0.236/trunk@125254 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-15 23:15:52 +00:00
nhotta%netscape.com
ead545266a Changed to return a result code for conversions so the caller can try fallback,
also changed convert from Unicode to try keyscript in addition to the system default,
bug 108029, r=pinkerton, sr=sfraser, a=asa.


git-svn-id: svn://10.0.0.236/trunk@125253 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-15 23:01:17 +00:00
nhotta%netscape.com
29ca846b8b Adding new files for utitily functions to convert between native script and Unicode,
bug 108029, r=pinkerton, sr=sfraser, a=asa.


git-svn-id: svn://10.0.0.236/trunk@125251 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-15 22:57:35 +00:00
nicolson%netscape.com
202ab4d6e1 fix 157622: cleanup javadoc warnings.
Have the build system automatically copy overview-summary.html over
index.html so we get a frame-free version.


git-svn-id: svn://10.0.0.236/trunk@125249 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-15 22:52:58 +00:00
jst%netscape.com
4a5f28b71e Checking in alexey@ihug.com.au's fix for bug 144040. Make sure the enabled column in about:plugins contains correct information. r=peterl@netscape.com, sr=jst@netscape.com
git-svn-id: svn://10.0.0.236/trunk@125248 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-15 22:50:49 +00:00
nicolson%netscape.com
8c3d311cb9 Fix 157622: cleanup javadoc warnings.
These changes should only affect documentation. There should be no
functional effect of the changes.


git-svn-id: svn://10.0.0.236/trunk@125247 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-15 22:48:06 +00:00
mjudge%netscape.com
2210006d15 r=akkana sr=sfrasier 125146 a=asa This patch will make the embedding API's a better friend to all. It eliminates the use of multibyte strings in command names and also allows for simple command to not require the nsICommandParams interface to be filled.
git-svn-id: svn://10.0.0.236/trunk@125242 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-15 22:04:13 +00:00
cltbld%netscape.com
c05cd73c0a updating for mozilla1.1b, kysmith checking in as cltbld, sr=leaf, bugzilla 157557
git-svn-id: svn://10.0.0.236/trunk@125241 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-15 21:40:28 +00:00
cltbld%netscape.com
1c29191311 updating for mozilla1.1b, sr=leaf, kysmith checking in as cltbld, bugzilla 157557
git-svn-id: svn://10.0.0.236/trunk@125238 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-15 21:13:59 +00:00
shrutiv%netscape.com
fe40cb95cb updating images
git-svn-id: svn://10.0.0.236/trunk@125237 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-15 21:00:59 +00:00
pavlov%netscape.com
6998788589 checking in fix for bug 155222 r=pavlov sr=tor@acm.org
git-svn-id: svn://10.0.0.236/trunk@125235 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-15 20:17:09 +00:00
axel%pike.org
b5574b2a89 chromeing XSLT QA app buster, not removing security checks yet, though. Plus, adding stats and test display by peterv. Not part of build.
git-svn-id: svn://10.0.0.236/trunk@125234 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-15 19:51:27 +00:00
sicking%bigfoot.com
f0e2529596 Add sameorigin checks to treewalker
b=156452, r=mstoltz, sr=jst, a=chofmann


git-svn-id: svn://10.0.0.236/trunk@125233 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-15 19:25:27 +00:00
sfraser%netscape.com
48ac123446 Add implementation of the Fonts pref panel, and add the contents of the .nib file
git-svn-id: svn://10.0.0.236/trunk@125232 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-15 19:14:08 +00:00
locka%iol.ie
1c9690aa38 Ensure load error pages don't end up in the session history. b=157004 r=radha sr=rpotts a=asa
git-svn-id: svn://10.0.0.236/trunk@125231 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-15 19:10:13 +00:00
igor%mir2.org
55ae98c99d I changed TokenStream to use internal buffer in place of LineBuffer#startString/getString to store currently read characters for identifiers, strings and numbers. For the price of yet another character coping it allows to simplify code logic especially regarding interaction with LineBuffer.
I also fixed http://bugzilla.mozilla.org/show_bug.cgi?id=157509


git-svn-id: svn://10.0.0.236/trunk@125229 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-15 18:49:42 +00:00
depstein%netscape.com
7d4747a04e new string handling for webProg notification flags.
a=asa for QA checkins that are not part of the default builds


git-svn-id: svn://10.0.0.236/trunk@125228 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-15 18:25:47 +00:00
mostafah%oeone.com
5a20737e37 Checking in patch for bug 132231 ( leaving out changes to description/categories/locations/url ): No support for International characters
git-svn-id: svn://10.0.0.236/trunk@125226 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-15 17:31:40 +00:00
pschwartau%netscape.com
d896129cde Correcting two sections of test.
git-svn-id: svn://10.0.0.236/trunk@125225 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-15 17:28:05 +00:00
pschwartau%netscape.com
5fb9b41f57 Expanding a comment for one section in greater detail.
git-svn-id: svn://10.0.0.236/trunk@125224 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-15 17:04:38 +00:00
mostafah%oeone.com
55dbf25c70 Checked in patch for bug 156495: VCALENDAR objects of TODO items don't have 'version' and 'prodid' properties.
git-svn-id: svn://10.0.0.236/trunk@125220 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-15 16:20:29 +00:00
pschwartau%netscape.com
4bb036ffe0 Initial add. Regression test for bug 157509.
git-svn-id: svn://10.0.0.236/trunk@125219 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-15 15:22:35 +00:00
karnaze%netscape.com
3ce2c0f149 new regression tests not affecting the build.
git-svn-id: svn://10.0.0.236/trunk@125218 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-15 15:18:28 +00:00
pschwartau%netscape.com
e2aaf6643f Comment edit.
git-svn-id: svn://10.0.0.236/trunk@125217 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-15 15:07:33 +00:00
pschwartau%netscape.com
cd52e68590 Added revision date + comment clean-up.
git-svn-id: svn://10.0.0.236/trunk@125216 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-15 15:06:37 +00:00
karnaze%netscape.com
ed50f0e383 bug 154741 - use macros instead of NS_FRAME_COMPLETE, a=asa, sr=kin, r=alexsavulov.
git-svn-id: svn://10.0.0.236/trunk@125215 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-15 14:46:01 +00:00
kaie%netscape.com
a87d01f430 b=153232 Add better error message for -8182
r=javi sr=alecf a=asa


git-svn-id: svn://10.0.0.236/trunk@125211 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-15 13:39:13 +00:00
kaie%netscape.com
55bf8b4f06 b=151250 False warning posting to https site from http site.
r=javi sr=alecf a=asa


git-svn-id: svn://10.0.0.236/trunk@125210 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-15 13:37:22 +00:00
kaie%netscape.com
7c8854f3d0 b=114893 Can't send encrypted mail if encryption cert has not been imported. Smartcard issue.
r=javi sr=alecf a=asa


git-svn-id: svn://10.0.0.236/trunk@125209 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-15 13:35:30 +00:00
rods%netscape.com
09fb40aa17 Forgot to initialize the arg to false, and th js code needs to finsih PP in the catch if an error is passed back.
Bug 157129 r=carlen sr=waterson a=asa


git-svn-id: svn://10.0.0.236/trunk@125207 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-15 11:44:42 +00:00
pete.zha%sun.com
ea278357db Implementation of nsIAccessibleValue
bug=150606 r=kyle.yuan@sun.com sr=jag patch=gilbert.fang@sun.com


git-svn-id: svn://10.0.0.236/trunk@125194 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-15 02:23:23 +00:00
pschwartau%netscape.com
aa9222e54c Correcting an error in the test. See bug 155291.
git-svn-id: svn://10.0.0.236/trunk@125193 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-15 00:40:14 +00:00
pschwartau%netscape.com
2aa4367266 Correcting errors in test. See bug 155289.
git-svn-id: svn://10.0.0.236/trunk@125192 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-15 00:29:37 +00:00
pschwartau%netscape.com
05b930589a Correcting errors in the test. See bug 155289.
git-svn-id: svn://10.0.0.236/trunk@125191 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-15 00:04:22 +00:00
pschwartau%netscape.com
5a05ebc498 Correcting errors in the test. See bug 155289.
git-svn-id: svn://10.0.0.236/trunk@125190 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-14 23:57:03 +00:00
pschwartau%netscape.com
970893aaaf Correcting an error in one section of the test. See bug 155285.
git-svn-id: svn://10.0.0.236/trunk@125189 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-14 23:42:23 +00:00
pschwartau%netscape.com
e7e5a1677a Rhino has also decided to conform with SpiderMonkey on this test. Adding early return for Rhino as well.
git-svn-id: svn://10.0.0.236/trunk@125187 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-14 22:34:50 +00:00
pschwartau%netscape.com
3dd30e325a Rhino has also decided to conform with SpiderMonkey on this test. Removing early return for Rhino.
git-svn-id: svn://10.0.0.236/trunk@125186 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-14 22:23:52 +00:00
jshin%mailaps.org
a1c1e34624 bug 133216 - make multibyte decoder more robust for invalid octet sequence.
r=yokoyama, sr=alecf, a=asa


git-svn-id: svn://10.0.0.236/trunk@125182 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-14 10:45:54 +00:00
jshin%mailaps.org
a2468389cc bug 135850 - Make Korean JOHAB encoder (Compatibility Jamo part) aligned with
Adobe CMap and XFree86 font encoding file for JOHAB.
r=yokoyama,sr=alecf,a=asa


git-svn-id: svn://10.0.0.236/trunk@125181 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-14 10:28:48 +00:00
sfraser%netscape.com
eb22c6a272 Adding Appearance pref pane files to project.
git-svn-id: svn://10.0.0.236/trunk@125170 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-14 02:15:14 +00:00
sfraser%netscape.com
d37a90f0b3 Changing the Navigation prefs pane to use the common base class. Also changed the wording of the 'load tabs in background' checkbox to indicate that this pref affects new windows too.
git-svn-id: svn://10.0.0.236/trunk@125169 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-14 02:13:13 +00:00
sfraser%netscape.com
ff6fec4d67 New files for Appearance pref pane. The tiff is temporary.
git-svn-id: svn://10.0.0.236/trunk@125168 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-14 02:11:32 +00:00
sfraser%netscape.com
42dc561f4c New base class for Preference Pane implementations, provides methods for getting and setting mozilla prefs.
git-svn-id: svn://10.0.0.236/trunk@125167 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-14 02:10:30 +00:00
bryner%netscape.com
069dbfb68c Fix full-page plugins on static builds by registering the docloader factory via nsIComponentRegistrar::RegisterFactory, so we don't have to depend on there being a plugin shared library in the components directory. r=peterl, sr=shaver, a=chofmann.
git-svn-id: svn://10.0.0.236/trunk@125164 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-14 00:39:35 +00:00
bryner%netscape.com
0941d2ecdb On second thought, only allocate the extra space when determining the element size; still paint the indicator at its "real" size. Not part of the build.
git-svn-id: svn://10.0.0.236/trunk@125160 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-13 23:27:16 +00:00
bryner%netscape.com
92c533513a Put a hardcoded min size of 14px on checkbox and radio button indicators, since many themes have indicators that are larger than the default 10px indicator_size, but don't bother setting the property. Not part of the build.
git-svn-id: svn://10.0.0.236/trunk@125156 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-13 22:05:38 +00:00
locka%iol.ie
fc56222620 Support client specific manifests. b=154878 r=chak@netscape.com sr=rpotts@netscape.com a=asa@mozilla.org
git-svn-id: svn://10.0.0.236/trunk@125151 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-13 15:09:26 +00:00
locka%iol.ie
dd99f9e5bc Support client specific manifests. b=154878 r=chak@netscape.com sr=rpotts@netscape.com a=asa@mozilla.org
git-svn-id: svn://10.0.0.236/trunk@125150 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-13 14:41:45 +00:00
caillon%returnzero.com
bfa2307cf1 Bug 157083. Smart Browsing Advanced window is sized too small when no checkboxes checked.
r=bzbarsky sr=blake a=asa


git-svn-id: svn://10.0.0.236/trunk@125149 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-13 11:30:09 +00:00
mstoltz%netscape.com
436a8b02f7 bug 125725, part 2 - pass nsIURIs instead of char* URL specs into nsCookies.
That way, we won't try to get or set cookies on protocols that don't support host.
r=morse, sr=dveditz, a=asa


git-svn-id: svn://10.0.0.236/trunk@125142 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-13 03:45:05 +00:00
relyea%netscape.com
9dc2692721 Fix solaris signed/unsigned warnings.
On updating nicknames, create a nickname record if one doesn't exist (that is
somehow the database got corrupted).


git-svn-id: svn://10.0.0.236/trunk@125140 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-13 02:45:04 +00:00
ccarlen%netscape.com
8fe2ca829c Fixing bustage on planetoid.
git-svn-id: svn://10.0.0.236/trunk@125139 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-13 01:07:57 +00:00
waldemar%netscape.com
b2fd32511a Obsolete
git-svn-id: svn://10.0.0.236/trunk@125137 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-13 00:52:10 +00:00
despotdaemon%netscape.com
f80ad3f50f Pseudo-automatic update of changes made by endico@mozilla.org.
git-svn-id: svn://10.0.0.236/trunk@125136 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-13 00:26:25 +00:00
ccarlen%netscape.com
96a6b4aa46 Bug 154883 - Use session printing APIs on Mac OSX. r=pinkerton/sr=sfraser/a=asa
git-svn-id: svn://10.0.0.236/trunk@125133 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-13 00:18:46 +00:00
ccarlen%netscape.com
71ffff784e Adding new files for bug 154883 - using session printing APIs on OSX. r=pinkerton/sr=sfraser/a=asa
git-svn-id: svn://10.0.0.236/trunk@125132 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-13 00:08:42 +00:00
shrutiv%netscape.com
7e2893cc71 Fix for bug 155468: Installation of c11n build crash due to incorrect
attributes for Viewpoint (r=smeredith)


git-svn-id: svn://10.0.0.236/trunk@125131 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-12 23:48:13 +00:00
cltbld%netscape.com
3f1b90e393 Adding default, blank string for BuildNameExtra. -mcafee
git-svn-id: svn://10.0.0.236/trunk@125129 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-12 22:45:41 +00:00
brade%netscape.com
3b0fc8bc5c bug 156918; cleanup QI usage and fix some recent regressions (r=Neil, Akkana, sr=Simon)
git-svn-id: svn://10.0.0.236/trunk@125128 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-12 22:28:30 +00:00
brade%netscape.com
0dde44ee8b fix typo (r=akkana, sr=sfraser)
git-svn-id: svn://10.0.0.236/trunk@125127 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-12 22:24:39 +00:00
leaf%mozilla.org
c8844accd0 Automated update
git-svn-id: svn://10.0.0.236/trunk@125126 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-12 21:40:22 +00:00
dmose%netscape.com
e8c3820f63 Add a configure option and hack for Linux x86 to make existing plugin binaries (eg flash, real, ...) work with gcc 3.1 builds (bug 154206). r=bryner@netscape.com, serge@netscape.com; sr=blizzard@mozilla.org; a=asa@mozilla.org
git-svn-id: svn://10.0.0.236/trunk@125125 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-12 21:30:31 +00:00
rginda%netscape.com
175c89a2ea bug 155838, "Infinite loop caused by strange code", r=peterv, sr=brendan, a=roc+moz@cs.cmu.edu
don't leave gDeadScripts pointing at garbage.  May or may not fix the problem at hand, but is an improvement in either case.


git-svn-id: svn://10.0.0.236/trunk@125124 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-12 21:28:29 +00:00
shannond%netscape.com
a7311a64c7 Bug 147978 - The copy of an existing config should use its own Workspace
r=mitchf@netscape.com
This checkin to take into account if the administrator changed the path in the original configuration.


git-svn-id: svn://10.0.0.236/trunk@125123 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-12 21:27:34 +00:00
radha%netscape.com
8f44bb451e Fix for bug # 124245. javascript onload redirect breaks back button. r= rpotts sr=alecf, a=roc+moz
git-svn-id: svn://10.0.0.236/trunk@125122 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-12 21:15:51 +00:00
rbs%maths.uq.edu.au
7934fc0bf6 Align the bar of the radical on pixel boundaries to get a nicer & uniform spacing on stacked radicals, b=130282, r=roc+moz, sr=waterson, a=asa
git-svn-id: svn://10.0.0.236/trunk@125121 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-12 21:14:32 +00:00
nicolson%netscape.com
7a797251db put back the assertion check.
git-svn-id: svn://10.0.0.236/trunk@125119 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-12 21:12:22 +00:00
dougt%netscape.com
368181a95d nscore.h has unreachable MSVC #defines (mutually exclusive nested #if), r=dbaron sr=scc a=superfly asa
git-svn-id: svn://10.0.0.236/trunk@125118 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-12 21:08:56 +00:00
nicolson%netscape.com
0f1ab3ab0c Fix misspelled exception name.
git-svn-id: svn://10.0.0.236/trunk@125117 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-12 21:08:22 +00:00
nicolson%netscape.com
ad1a1e4c9c add default constructor
git-svn-id: svn://10.0.0.236/trunk@125116 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-12 21:07:40 +00:00
bzbarsky%mit.edu
050d8e8c55 Add some more Ethiopic list styles. Bug 154503, patch by yacob@geez.org
(Daniel Yacob), r=dbaron, rs=brendan, a=asa


git-svn-id: svn://10.0.0.236/trunk@125114 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-12 20:46:19 +00:00
nicolson%netscape.com
e8aaf9ad36 This test isn't working yet, but I may get it working at some point.
git-svn-id: svn://10.0.0.236/trunk@125113 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-12 20:33:39 +00:00
alecf%netscape.com
9abc7e5dc6 bug 156736 - reorganize basebrowser-* to make it easier for embeddors to pick & choose components
r=adamlock, sr=dveditz, a=asa


git-svn-id: svn://10.0.0.236/trunk@125112 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-12 20:33:12 +00:00
mkaply%us.ibm.com
1e8274b9b8 #67913
r=pedemont, sr=blizzard (platform specific code)
OS/2 only = 800x600 reports the workarea size incorrectly, so explictly use the height of warpcenter


git-svn-id: svn://10.0.0.236/trunk@125109 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-12 20:01:59 +00:00
igor%mir2.org
7368ef0536 Call to InterpretedFunction.construct is inlined to avoid argument array allocation.
git-svn-id: svn://10.0.0.236/trunk@125106 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-12 19:40:49 +00:00
igor%mir2.org
c95dcd43e0 Creation and initialization of new object in BaseFunction.construct is moved to a separated function createObject to simplify inlining of InterpretedFunction.construct in Interpreter
git-svn-id: svn://10.0.0.236/trunk@125105 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-12 19:39:57 +00:00
mikep%oeone.com
c9f6793cd8 Fixing bug 137513 for mouse wheel scrolling, and also fixing display time for alarms in alarm dialog (problme with repeating events.)
git-svn-id: svn://10.0.0.236/trunk@125104 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-12 19:39:37 +00:00
igor%mir2.org
63fd7c33bc Added ObjToIntMap.intern()
git-svn-id: svn://10.0.0.236/trunk@125103 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-12 19:37:20 +00:00
dmose%netscape.com
87d338aa27 Fix OSF/1 build bustage (bug 144280). Patch from shanmu@netscape.com; r=dmose@netscape.com, sr=bienvenu@netscape.com, a=roc+moz@cs.cmu.edu
git-svn-id: svn://10.0.0.236/trunk@125102 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-12 19:29:52 +00:00
alecf%netscape.com
2f59581288 bug 66759 - finally remove XPCOM_STANDALONE completely
r=dougt, rs=brendan, a=asa


git-svn-id: svn://10.0.0.236/trunk@125100 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-12 19:14:35 +00:00
dsirnapalli%netscape.com
5d8fa23aad Updated the test case.
git-svn-id: svn://10.0.0.236/trunk@125098 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-12 18:38:20 +00:00
mikep%oeone.com
38a5767562 Fixing bug 137513, problem with mouse scrolling after switching to week and day views.
git-svn-id: svn://10.0.0.236/trunk@125097 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-12 18:33:23 +00:00
naving%netscape.com
f44a2d8138 156368 patch by t.bugz@lament.cjb.net r=naving sr=bienvenu a=roc+moz fixing quicksearch fails if focus was in threadpane before search box
git-svn-id: svn://10.0.0.236/trunk@125093 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-12 17:57:02 +00:00
pinkerton%netscape.com
f1c996ad85 Replace the standard gecko 'image placeholder' with a more aqua-one from ugo
git-svn-id: svn://10.0.0.236/trunk@125092 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-12 15:22:28 +00:00
kaie%netscape.com
f8b44ebc4e b=135214 tentative fix for "signed icon in 3-pane isn't going away"
r=dbaron sr=mscott


git-svn-id: svn://10.0.0.236/trunk@125091 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-12 11:53:34 +00:00
rods%netscape.com
44a86dac88 changed all the DEVMODE allocating and freeing to native Windows calls HeapAlloc and HeapFree
nsPrintSettingsWin.cpp was creating and copying only the non-platform specific data by using the
"sizeof" of the DEVMODE struct, instead of checking the struct size with dmSize
and the size of the private (device-specific) data with dmDriverExtra. Now it
creates the correct size of memory and copies all the non-private data and private data.
Bug 156318 r=dcone sr=kin,waterson,rpotts a=asa


git-svn-id: svn://10.0.0.236/trunk@125089 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-12 11:48:38 +00:00
rods%netscape.com
e37e3dadbd Minor comment change
Bug 99619 r=kmcclusk sr=sspitzer a=jud adt=paw


git-svn-id: svn://10.0.0.236/trunk@125088 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-12 11:34:52 +00:00
aaronl%netscape.com
b992a26c12 Not part of build. Typeaheadfind: clean up emacsish/repeated character logic
git-svn-id: svn://10.0.0.236/trunk@125083 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-12 08:10:13 +00:00
aaronl%netscape.com
b8c854e6a8 Not part of build. Typeaheadfind (bug 30088): Prefer an exact match, if it exists, when the same character is repeated. Should make the emacs folks happy
git-svn-id: svn://10.0.0.236/trunk@125082 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-12 07:41:22 +00:00
aaronl%netscape.com
74eef6bba9 Not part of build. Fix for crash in typeaheadfind (bug 30088)
git-svn-id: svn://10.0.0.236/trunk@125081 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-12 07:23:09 +00:00
brendan%mozilla.org
90ad3b5df3 Emulate IE6 by making RegExp.prototype match the empty string (156355, r=rogerl, sr=shaver, a=dbaron).
git-svn-id: svn://10.0.0.236/trunk@125078 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-12 04:54:57 +00:00
bbaetz%student.usyd.edu.au
238bee30e8 Bug 155032 - Memory leak of 18 bytes from 1 block allocated in
nsSOCKSSocketInfo::GetProxyHost
r=smeredith, sr=alecf, a=roc+moz


git-svn-id: svn://10.0.0.236/trunk@125077 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-12 04:54:09 +00:00
bryner%netscape.com
5a608bcf5e Remove non-functional help menu item, add an Info menu item that goes to the download page.
git-svn-id: svn://10.0.0.236/trunk@125076 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-12 04:53:12 +00:00
pete.zha%sun.com
f8753fa9cf "Quote Message" menu item doesn't work on recently trunk. bug=156876 r=ducarroz sr=bienvenu a=roc+moz
git-svn-id: svn://10.0.0.236/trunk@125071 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-12 04:33:16 +00:00
nicolson%netscape.com
40b78d68bf Fix 98613: using SSLSocket after close causes crash.
Now the SSLSocket and SSLServerSocket close() methods only call PR_Close()
on the underlying fd. Freeing data structures is postponed until the
Java object is finalized.


git-svn-id: svn://10.0.0.236/trunk@125070 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-12 04:26:56 +00:00
nicolson%netscape.com
34f86dd48b clarify error message.
git-svn-id: svn://10.0.0.236/trunk@125069 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-12 04:09:14 +00:00
cltbld%netscape.com
5e83c9f0ea 154815 fixed, removing hack. -mcafee
git-svn-id: svn://10.0.0.236/trunk@125068 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-12 03:50:49 +00:00
mozilla.BenB%bucksch.org
67e2928527 same as previous. patch by Tuukka Tolvanen <t.bugz@lament.cjb.net>
git-svn-id: svn://10.0.0.236/trunk@125067 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-12 03:39:14 +00:00
mozilla.BenB%bucksch.org
2c5eb70b01 156984: Typo (missing "P"). r=rods, sr=kin, a=roc
git-svn-id: svn://10.0.0.236/trunk@125066 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-12 03:34:17 +00:00
relyea%netscape.com
52ca8acde6 Update the CERTDB_USER bits when our key gets imported through pkcs #12.
git-svn-id: svn://10.0.0.236/trunk@125064 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-12 03:27:44 +00:00
pete.zha%sun.com
ef2e3f111b mozilla1.1a core dump at PR_AtomicDecrement()
bug=154730 r=bryner sr=jst a=asa patch=antonio.xu@sun.com


git-svn-id: svn://10.0.0.236/trunk@125061 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-12 02:56:18 +00:00
jpierre%netscape.com
7b06b4f219 Make CERT_VerifyCertificate actually work . Oops.
git-svn-id: svn://10.0.0.236/trunk@125060 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-12 02:37:49 +00:00
dbaron%fas.harvard.edu
f397c8ab4e Fix crash when we do a ReconstructDocElementHierarchy on a XUL document, which destroys the nsDocElementBoxFrame (which constructs the popupset) but not the nsRootBoxFrame. b=156719 r=waterson sr=ben a=asa
git-svn-id: svn://10.0.0.236/trunk@125058 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-12 01:46:20 +00:00
bienvenu%netscape.com
051c35befa fix crash shutting down while offline r=dougt, sr=dveditz a=chofmann 156851
git-svn-id: svn://10.0.0.236/trunk@125055 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-12 01:00:08 +00:00
seawood%netscape.com
39c72e94a1 Create a symlink named "bin" in the dist/mozilla directory and then run pkgcp.pl using dist/mozilla as the srcdir. This will let us avoid accidentally stripping the files in dist/bin.
Thanks to Brian Ryner <bryner@netscape.com> for the patch.
Bug #156983 r=sgehani sr=leaf


git-svn-id: svn://10.0.0.236/trunk@125053 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-12 00:37:46 +00:00
caillon%returnzero.com
459e27115c New icons for composer and addressbook. Icons by marlon@netscape.com.
Bug 156822. Also see bugscape #16402.
moa=jag, a=asa.


git-svn-id: svn://10.0.0.236/trunk@125051 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-12 00:19:08 +00:00
dsirnapalli%netscape.com
79ae232008 Test Cases to test XUL Elements for Accessibility.
git-svn-id: svn://10.0.0.236/trunk@125049 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-11 23:33:04 +00:00
jkeiser%netscape.com
8dddb7432c Make mailto form submit work (bug 61893), r=alexsavulov@netscape.com, sr=dveditz@netscape.com, a=asa
git-svn-id: svn://10.0.0.236/trunk@125048 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-11 23:32:13 +00:00
shrutiv%netscape.com
57bf7291a9 Fix for bugscape bug 17654: Blank OS and Language-Region dropdown menu
using previous existing config files (r=mitchf)


git-svn-id: svn://10.0.0.236/trunk@125047 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-11 23:23:53 +00:00
oeschger%netscape.com
479087e18e added help content for http networking, brought over from ns help, bug=143590
git-svn-id: svn://10.0.0.236/trunk@125046 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-11 22:58:43 +00:00
edburns%acm.org
9ad9ff18de debug_options
git-svn-id: svn://10.0.0.236/trunk@125045 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-11 22:19:59 +00:00
edburns%acm.org
d2d0482cb1 debug_options
git-svn-id: svn://10.0.0.236/trunk@125044 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-11 22:15:46 +00:00
edburns%acm.org
89ce8241d1 debug_options
git-svn-id: svn://10.0.0.236/trunk@125043 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-11 22:12:10 +00:00
morse%netscape.com
ae7548953e bug 152694, cookies with spaces in the value get mangled, r=law, sr=jag, a=asa
git-svn-id: svn://10.0.0.236/trunk@125042 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-11 21:58:43 +00:00
801 changed files with 224961 additions and 17201 deletions

View File

@@ -0,0 +1,54 @@
#
# The contents of this file are subject to the Netscape Public
# License Version 1.1 (the "License"); you may not use this file
# except in compliance with the License. You may obtain a copy of
# the License at http://www.mozilla.org/NPL/
#
# Software distributed under the License is distributed on an "AS
# IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
# implied. See the License for the specific language governing
# rights and limitations under the License.
#
# The Original Code is mozilla.org code.
#
# The Initial Developer of the Original Code is Netscape
# Communications Corporation. Portions created by Netscape are
# Copyright (C) 1998 Netscape Communications Corporation. All
# Rights Reserved.
#
# Contributor(s):
# IBM Corporation
#
# This Original Code has been modified by IBM Corporation.
# Modifications made by IBM described herein are
# Copyright (c) International Business Machines
# Corporation, 1999
#
# Modifications to Mozilla code or documentation
# identified per MPL Section 3.3
#
# Date Modified by Description of modification
# 12/09/1999 IBM Corp. Support for IBM codepages - 850,852,855,857,862,864
#
DEPTH = ../..
topsrcdir = @top_srcdir@
srcdir = @srcdir@
VPATH = @srcdir@
include $(DEPTH)/config/autoconf.mk
DIRS = idl public util ucvja ucvcn ucvlatin ucvtw ucvtw2 ucvko ucvibm src
ifdef MOZ_MATHML
DIRS += ucvmath
endif
ifeq ($(OS_ARCH),WINNT)
ifdef ENABLE_TESTS
DIRS += tests
endif
endif
include $(topsrcdir)/config/rules.mk

View File

@@ -0,0 +1,57 @@
Directory Structure :
================================
public - public header file
src - source directory of charset converter manager and utility
tests - tests program and application for charset converter
The following directory are used to put different charset converter
ucvam - Armenian charsets
ucvar - Arabic charsets
ucvcn - Simplified chinese charsets- GB2312, HZ, ISO-2022-CN
ucvcy - Cyrillic charsets - ISO-8859-5, CP1251, KOI8-R, KOI8-U, Mac Cyrillic
ucvgr - Greek charsets - ISO-8859-7, CP1253
ucvhr - Hebrew charsets
ucvja - Japanese charsets Set 1 - Shift-JIS
ucvja2 - Japanese charsets Set 2 - ISO-2022-JP , EUC-JP
ucvko - Korean charsets - ISO-2022-KR, EUC-KR
ucvlatin - Latin charsets - ISO-8859-1,2,3,4,9,14,15, CP1250,1252,1254,
Mac Roman, Central European, Romanian, Icelandic,
etc
ucvmath - Mathematical charsets (symbols for MathML/scientific documents)
ucvth - Thai charsets
ucvtw - Traditional Chinese charsets Set 1 - Big5
ucvtw2 - Traditional Chinese charsets Set 2 - EUC-TW, ISO-2022-CN,
ucvutf - UTF-8, UTF-7
ucvvt - Vietnamese charsets
The following directory are obsolete and should not be used:
ufromam
ufromar
ufromcn
ufromcy
ufromgr
ufromhr
ufromja
ufromja2
ufromko
ufroml
ufromtw
ufromtw2
ufromutf
ufromvt
utoam
utoar
utocn
utocy
utogr
utohr
utoja
utoja2
utoko
utol
utotw
utotw2
utoutf
utovt

View File

@@ -0,0 +1,4 @@
nsITextToSubURI.idl
nsICurrentCharsetListener.idl
nsICharsetConverterManager2.idl
nsIScriptableUConv.idl

View File

@@ -26,7 +26,13 @@ VPATH = @srcdir@
include $(DEPTH)/config/autoconf.mk
DIRS = public src resources
MODULE = uconv
XPIDLSRCS = \
nsITextToSubURI.idl \
nsICurrentCharsetListener.idl \
nsICharsetConverterManager2.idl \
nsIScriptableUConv.idl \
$(NULL)
include $(topsrcdir)/config/rules.mk

View File

@@ -1,4 +1,4 @@
#!nmake
#!gmake
#
# The contents of this file are subject to the Netscape Public
# License Version 1.1 (the "License"); you may not use this file
@@ -19,9 +19,15 @@
#
# Contributor(s):
DEPTH=..\..\..\..
MODULE = uconv
DIRS= locale
DEPTH = ..\..\..
include <$(DEPTH)\config\rules.mak>
XPIDLSRCS = \
.\nsITextToSubURI.idl \
.\nsICurrentCharsetListener.idl \
.\nsICharsetConverterManager2.idl \
.\nsIScriptableUConv.idl \
$(NULL)
include <$(DEPTH)/config/rules.mak>

View File

@@ -0,0 +1,143 @@
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/* ***** BEGIN LICENSE BLOCK *****
* Version: NPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Netscape Public License
* Version 1.1 (the "License"); you may not use this file except in
* compliance with the License. You may obtain a copy of the License at
* http://www.mozilla.org/NPL/
*
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the
* License.
*
* The Original Code is mozilla.org code.
*
* The Initial Developer of the Original Code is
* Netscape Communications Corporation.
* Portions created by the Initial Developer are Copyright (C) 1998
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
*
*
* Alternatively, the contents of this file may be used under the terms of
* either the GNU General Public License Version 2 or later (the "GPL"), or
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
* in which case the provisions of the GPL or the LGPL are applicable instead
* of those above. If you wish to allow use of your version of this file only
* under the terms of either the GPL or the LGPL, and not to allow others to
* use your version of this file under the terms of the NPL, indicate your
* decision by deleting the provisions above and replace them with the notice
* and other provisions required by the GPL or the LGPL. If you do not delete
* the provisions above, a recipient may use your version of this file under
* the terms of any one of the NPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
#include "nsISupports.idl"
#include "nsISupportsArray.idl"
#include "nsIAtom.idl"
%{ C++
#include "nsIUnicodeDecoder.h"
#include "nsIUnicodeEncoder.h"
#include "nsString.h"
%}
[ptr] native nsDecoderPtr(nsIUnicodeDecoder);
[ptr] native nsEncoderPtr(nsIUnicodeEncoder);
[ptr] native nsStringPtr(nsString);
/**
* Replacement interface for nsICharsetConverterManager.
*
* Here Charsets are indentified by nsIAtom's. I know, we could have our own
* interface for charsets (something like nsICharacterSet). But for now, I
* will attempt to use Atom's. That is because it requires minimal work, all
* the support stuff is already there. The drawback is that we might have some
* performance loss from going to the Atom engine. Another possible problem is
* people creating directly the Atom instead of going through GetCharsetAtom()
* If these problems will hurt us, we'll switch to nsICharacterSet. The
* implementation of this interface is ment to be quite flexible.
*
* I provide here some nonscriptable "friendly methods". They accept nsString
* as params and assign the result to them, freeing the received memory result.
* These methods are prone to optimisation, in order to elliminate any
* allocation when it is not strictly necessary.
*
* @created 21/Feb/2000
* @author Catalin Rotaru [CATA]
*/
[scriptable, uuid(8BAFE891-E4CC-11d3-9D0D-0050040007B2)]
interface nsICharsetConverterManager2 : nsISupports
{
/**
* Get the Unicode decoder for the given charset.
*/
[noscript] nsDecoderPtr GetUnicodeDecoder([const] in nsIAtom charset);
/**
* Get the Unicode encoder for the given charset.
*/
[noscript] nsEncoderPtr GetUnicodeEncoder([const] in nsIAtom charset);
/**
* Get the complete list of available decoders.
*/
nsISupportsArray GetDecoderList();
/**
* Get the complete list of available encoders.
*/
nsISupportsArray GetEncoderList();
/**
* Get the complete list of available charset detectors.
*/
nsISupportsArray GetCharsetDetectorList();
/**
* Get the Atom representing the a given character set. PLEASE USE THIS
* METHOD!!! Do not create Atoms directly by going to NS_NewAtom(), because
* here we also do alias resolution...
*
* Just to let you know, this method will first attempt to resolve this
* charset as an alias. If that failed, the original string will be used.
* Then an atom is created and returned.
*/
nsIAtom GetCharsetAtom([const] in wstring charset);
/**
* Friendlier version.
*/
nsIAtom GetCharsetAtom2([const] in string charset);
/**
* Get the human-readable name for the given charset.
*/
wstring GetCharsetTitle([const] in nsIAtom charset);
/**
* Friendlier but non scriptable version.
*/
[noscript] void GetCharsetTitle2([const] in nsIAtom charset,
in nsStringPtr str);
/**
* Get some data about the given charset.
*/
wstring GetCharsetData([const] in nsIAtom charset,
[const] in wstring prop);
/**
* Friendlier but non scriptable version.
*/
[noscript] void GetCharsetData2([const] in nsIAtom charset,
[const] in wstring prop, in nsStringPtr str);
/**
* Get the language group for the given charset.
*/
nsIAtom GetCharsetLangGroup([const] in nsIAtom charset);
};

View File

@@ -0,0 +1,54 @@
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/* ***** BEGIN LICENSE BLOCK *****
* Version: NPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Netscape Public License
* Version 1.1 (the "License"); you may not use this file except in
* compliance with the License. You may obtain a copy of the License at
* http://www.mozilla.org/NPL/
*
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the
* License.
*
* The Original Code is mozilla.org code.
*
* The Initial Developer of the Original Code is
* Netscape Communications Corporation.
* Portions created by the Initial Developer are Copyright (C) 1998
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
*
*
* Alternatively, the contents of this file may be used under the terms of
* either the GNU General Public License Version 2 or later (the "GPL"), or
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
* in which case the provisions of the GPL or the LGPL are applicable instead
* of those above. If you wish to allow use of your version of this file only
* under the terms of either the GPL or the LGPL, and not to allow others to
* use your version of this file under the terms of the NPL, indicate your
* decision by deleting the provisions above and replace them with the notice
* and other provisions required by the GPL or the LGPL. If you do not delete
* the provisions above, a recipient may use your version of this file under
* the terms of any one of the NPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
#include "nsISupports.idl"
%{C++
// {CF9428C1-DF50-11d3-9D0C-0050040007B2}
#define NS_CURRENTCHARSETLISTENER_CID { 0xcf9428c1, 0xdf50, 0x11d3, { 0x9d, 0xc, 0x0, 0x50, 0x4, 0x0, 0x7, 0xb2 } }
#define NS_ICURRENTCHARSETLISTENER_CONTRACTID "@mozilla.org/intl/currentcharsetlistener;1"
%}
[scriptable, uuid(CF9428C1-DF50-11d3-9D0C-0050040007B2)]
interface nsICurrentCharsetListener : nsISupports
{
void SetCurrentCharset(in wstring charset);
void SetCurrentMailCharset(in wstring charset);
void SetCurrentComposerCharset(in wstring charset);
};

View File

@@ -0,0 +1,70 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* ***** BEGIN LICENSE BLOCK *****
* Version: NPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Netscape Public License
* Version 1.1 (the "License"); you may not use this file except in
* compliance with the License. You may obtain a copy of the License at
* http://www.mozilla.org/NPL/
*
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the
* License.
*
* The Original Code is Mozilla Communicator client code.
*
* The Initial Developer of the Original Code is
* Netscape Communications Corporation.
* Portions created by the Initial Developer are Copyright (C) 1998
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
*
*
* Alternatively, the contents of this file may be used under the terms of
* either the GNU General Public License Version 2 or later (the "GPL"), or
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
* in which case the provisions of the GPL or the LGPL are applicable instead
* of those above. If you wish to allow use of your version of this file only
* under the terms of either the GPL or the LGPL, and not to allow others to
* use your version of this file under the terms of the NPL, indicate your
* decision by deleting the provisions above and replace them with the notice
* and other provisions required by the GPL or the LGPL. If you do not delete
* the provisions above, a recipient may use your version of this file under
* the terms of any one of the NPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
#include "nsISupports.idl"
%{C++
// {0A698C44-3BFF-11d4-9649-00C0CA135B4E}
#define NS_ISCRIPTABLEUNICODECONVERTER_CID { 0x0A698C44, 0x3BFF, 0x11d4, { 0x96, 0x49, 0x00, 0xC0, 0xCA, 0x13, 0x5B, 0x4E } }
#define NS_ISCRIPTABLEUNICODECONVERTER_CONTRACTID "@mozilla.org/intl/scriptableunicodeconverter"
%}
/**
* This interface is unicode encoder using from script
*
* @created 8/Jun/2000
* @author Makoto Kato [m_kato@ga2.so-net.ne.jp]
*/
[scriptable, uuid(0A698C44-3BFF-11d4-9649-00C0CA135B4E)]
interface nsIScriptableUnicodeConverter : nsISupports
{
/**
* Converts the data from Unicode to one Charset.
*/
string ConvertFromUnicode([const] in wstring aSrc);
/**
* Converts the data from one Charset to Unicode.
*/
wstring ConvertToUnicode([const] in string aSrc);
/**
* Current charactor set
*/
attribute wstring charset;
};

View File

@@ -0,0 +1,53 @@
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/* ***** BEGIN LICENSE BLOCK *****
* Version: NPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Netscape Public License
* Version 1.1 (the "License"); you may not use this file except in
* compliance with the License. You may obtain a copy of the License at
* http://www.mozilla.org/NPL/
*
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the
* License.
*
* The Original Code is mozilla.org code.
*
* The Initial Developer of the Original Code is
* Netscape Communications Corporation.
* Portions created by the Initial Developer are Copyright (C) 1998
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
*
*
* Alternatively, the contents of this file may be used under the terms of
* either the GNU General Public License Version 2 or later (the "GPL"), or
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
* in which case the provisions of the GPL or the LGPL are applicable instead
* of those above. If you wish to allow use of your version of this file only
* under the terms of either the GPL or the LGPL, and not to allow others to
* use your version of this file under the terms of the NPL, indicate your
* decision by deleting the provisions above and replace them with the notice
* and other provisions required by the GPL or the LGPL. If you do not delete
* the provisions above, a recipient may use your version of this file under
* the terms of any one of the NPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
#include "nsISupports.idl"
%{C++
// {8B042E22-6F87-11d3-B3C8-00805F8A6670}
#define NS_TEXTTOSUBURI_CID { 0x8b042e22, 0x6f87, 0x11d3, { 0xb3, 0xc8, 0x0, 0x80, 0x5f, 0x8a, 0x66, 0x70 } }
#define NS_ITEXTTOSUBURI_CONTRACTID "@mozilla.org/intl/texttosuburi;1"
%}
[scriptable, uuid(8B042E24-6F87-11d3-B3C8-00805F8A6670)]
interface nsITextToSubURI : nsISupports
{
string ConvertAndEscape(in string charset, in wstring text);
wstring UnEscapeAndConvert(in string charset, in string text);
};

Binary file not shown.

File diff suppressed because it is too large Load Diff

View File

@@ -65,16 +65,6 @@
<SETTING><NAME>InterpretDOSAndUnixPaths</NAME><VALUE>false</VALUE></SETTING>
<SETTING><NAME>RequireFrameworkStyleIncludes</NAME><VALUE>false</VALUE></SETTING>
<SETTING><NAME>UserSearchPaths</NAME>
<SETTING>
<SETTING><NAME>SearchPath</NAME>
<SETTING><NAME>Path</NAME><VALUE>:</VALUE></SETTING>
<SETTING><NAME>PathFormat</NAME><VALUE>MacOS</VALUE></SETTING>
<SETTING><NAME>PathRoot</NAME><VALUE>Project</VALUE></SETTING>
</SETTING>
<SETTING><NAME>Recursive</NAME><VALUE>true</VALUE></SETTING>
<SETTING><NAME>FrameworkPath</NAME><VALUE>false</VALUE></SETTING>
<SETTING><NAME>HostFlags</NAME><VALUE>All</VALUE></SETTING>
</SETTING>
<SETTING>
<SETTING><NAME>SearchPath</NAME>
<SETTING><NAME>Path</NAME><VALUE>::public:</VALUE></SETTING>
@@ -87,7 +77,17 @@
</SETTING>
<SETTING>
<SETTING><NAME>SearchPath</NAME>
<SETTING><NAME>Path</NAME><VALUE>:::::dist:idl:</VALUE></SETTING>
<SETTING><NAME>Path</NAME><VALUE>::::dist:idl:</VALUE></SETTING>
<SETTING><NAME>PathFormat</NAME><VALUE>MacOS</VALUE></SETTING>
<SETTING><NAME>PathRoot</NAME><VALUE>Project</VALUE></SETTING>
</SETTING>
<SETTING><NAME>Recursive</NAME><VALUE>true</VALUE></SETTING>
<SETTING><NAME>FrameworkPath</NAME><VALUE>false</VALUE></SETTING>
<SETTING><NAME>HostFlags</NAME><VALUE>All</VALUE></SETTING>
</SETTING>
<SETTING>
<SETTING><NAME>SearchPath</NAME>
<SETTING><NAME>Path</NAME><VALUE>::idl:</VALUE></SETTING>
<SETTING><NAME>PathFormat</NAME><VALUE>MacOS</VALUE></SETTING>
<SETTING><NAME>PathRoot</NAME><VALUE>Project</VALUE></SETTING>
</SETTING>
@@ -125,7 +125,7 @@
<SETTING><NAME>PostLinker</NAME><VALUE></VALUE></SETTING>
<SETTING><NAME>Targetname</NAME><VALUE>headers</VALUE></SETTING>
<SETTING><NAME>OutputDirectory</NAME>
<SETTING><NAME>Path</NAME><VALUE>:::::dist:xpfe:components:</VALUE></SETTING>
<SETTING><NAME>Path</NAME><VALUE>::::dist:uconv:</VALUE></SETTING>
<SETTING><NAME>PathFormat</NAME><VALUE>MacOS</VALUE></SETTING>
<SETTING><NAME>PathRoot</NAME><VALUE>Project</VALUE></SETTING>
</SETTING>
@@ -715,14 +715,35 @@
<SETTING><NAME>MWProject_X86_minsize</NAME><VALUE>4</VALUE></SETTING>
<SETTING><NAME>MWProject_X86_importlib</NAME><VALUE></VALUE></SETTING>
<PANELDATA><NAME>xpidl Settings</NAME><VALUE>
00010001010111626F6F6B6D61726B732E686561646572730000000000000000
0001000101010C75636E762E6865616465727364657273727373000000000000
0000000000000000
</VALUE></PANELDATA>
</SETTINGLIST>
<FILELIST>
<FILE>
<PATHTYPE>Name</PATHTYPE>
<PATH>nsIBookmarksService.idl</PATH>
<PATH>nsITextToSubURI.idl</PATH>
<PATHFORMAT>MacOS</PATHFORMAT>
<FILEKIND>Text</FILEKIND>
<FILEFLAGS></FILEFLAGS>
</FILE>
<FILE>
<PATHTYPE>Name</PATHTYPE>
<PATH>nsICurrentCharsetListener.idl</PATH>
<PATHFORMAT>MacOS</PATHFORMAT>
<FILEKIND>Text</FILEKIND>
<FILEFLAGS></FILEFLAGS>
</FILE>
<FILE>
<PATHTYPE>Name</PATHTYPE>
<PATH>nsICharsetConverterManager2.idl</PATH>
<PATHFORMAT>MacOS</PATHFORMAT>
<FILEKIND>Text</FILEKIND>
<FILEFLAGS></FILEFLAGS>
</FILE>
<FILE>
<PATHTYPE>Name</PATHTYPE>
<PATH>nsIScriptableUConv.idl</PATH>
<PATHFORMAT>MacOS</PATHFORMAT>
<FILEKIND>Text</FILEKIND>
<FILEFLAGS></FILEFLAGS>
@@ -731,13 +752,28 @@
<LINKORDER>
<FILEREF>
<PATHTYPE>Name</PATHTYPE>
<PATH>nsIBookmarksService.idl</PATH>
<PATH>nsITextToSubURI.idl</PATH>
<PATHFORMAT>MacOS</PATHFORMAT>
</FILEREF>
<FILEREF>
<PATHTYPE>Name</PATHTYPE>
<PATH>nsICurrentCharsetListener.idl</PATH>
<PATHFORMAT>MacOS</PATHFORMAT>
</FILEREF>
<FILEREF>
<PATHTYPE>Name</PATHTYPE>
<PATH>nsICharsetConverterManager2.idl</PATH>
<PATHFORMAT>MacOS</PATHFORMAT>
</FILEREF>
<FILEREF>
<PATHTYPE>Name</PATHTYPE>
<PATH>nsIScriptableUConv.idl</PATH>
<PATHFORMAT>MacOS</PATHFORMAT>
</FILEREF>
</LINKORDER>
</TARGET>
<TARGET>
<NAME>bookmarks.xpt</NAME>
<NAME>uconv.xpt</NAME>
<SETTINGLIST>
<!-- Settings for "Source Trees" panel -->
@@ -748,16 +784,6 @@
<SETTING><NAME>InterpretDOSAndUnixPaths</NAME><VALUE>false</VALUE></SETTING>
<SETTING><NAME>RequireFrameworkStyleIncludes</NAME><VALUE>false</VALUE></SETTING>
<SETTING><NAME>UserSearchPaths</NAME>
<SETTING>
<SETTING><NAME>SearchPath</NAME>
<SETTING><NAME>Path</NAME><VALUE>:</VALUE></SETTING>
<SETTING><NAME>PathFormat</NAME><VALUE>MacOS</VALUE></SETTING>
<SETTING><NAME>PathRoot</NAME><VALUE>Project</VALUE></SETTING>
</SETTING>
<SETTING><NAME>Recursive</NAME><VALUE>true</VALUE></SETTING>
<SETTING><NAME>FrameworkPath</NAME><VALUE>false</VALUE></SETTING>
<SETTING><NAME>HostFlags</NAME><VALUE>All</VALUE></SETTING>
</SETTING>
<SETTING>
<SETTING><NAME>SearchPath</NAME>
<SETTING><NAME>Path</NAME><VALUE>::public:</VALUE></SETTING>
@@ -770,7 +796,17 @@
</SETTING>
<SETTING>
<SETTING><NAME>SearchPath</NAME>
<SETTING><NAME>Path</NAME><VALUE>:::::dist:idl:</VALUE></SETTING>
<SETTING><NAME>Path</NAME><VALUE>::::dist:idl:</VALUE></SETTING>
<SETTING><NAME>PathFormat</NAME><VALUE>MacOS</VALUE></SETTING>
<SETTING><NAME>PathRoot</NAME><VALUE>Project</VALUE></SETTING>
</SETTING>
<SETTING><NAME>Recursive</NAME><VALUE>true</VALUE></SETTING>
<SETTING><NAME>FrameworkPath</NAME><VALUE>false</VALUE></SETTING>
<SETTING><NAME>HostFlags</NAME><VALUE>All</VALUE></SETTING>
</SETTING>
<SETTING>
<SETTING><NAME>SearchPath</NAME>
<SETTING><NAME>Path</NAME><VALUE>::idl:</VALUE></SETTING>
<SETTING><NAME>PathFormat</NAME><VALUE>MacOS</VALUE></SETTING>
<SETTING><NAME>PathRoot</NAME><VALUE>Project</VALUE></SETTING>
</SETTING>
@@ -806,7 +842,7 @@
<SETTING><NAME>Linker</NAME><VALUE>xpt Linker</VALUE></SETTING>
<SETTING><NAME>PreLinker</NAME><VALUE></VALUE></SETTING>
<SETTING><NAME>PostLinker</NAME><VALUE></VALUE></SETTING>
<SETTING><NAME>Targetname</NAME><VALUE>bookmarks.xpt</VALUE></SETTING>
<SETTING><NAME>Targetname</NAME><VALUE>uconv.xpt</VALUE></SETTING>
<SETTING><NAME>OutputDirectory</NAME>
<SETTING><NAME>Path</NAME><VALUE>:</VALUE></SETTING>
<SETTING><NAME>PathFormat</NAME><VALUE>MacOS</VALUE></SETTING>
@@ -1002,7 +1038,7 @@
<SETTING><NAME>MWFTP_Post_username</NAME><VALUE></VALUE></SETTING>
<SETTING><NAME>MWFTP_Post_password</NAME><VALUE>0</VALUE></SETTING>
<SETTING><NAME>MWFTP_Post_remoteDir</NAME><VALUE></VALUE></SETTING>
<SETTING><NAME>MWFTP_Post_ftp_PathVersion</NAME><VALUE>0</VALUE></SETTING>
<SETTING><NAME>MWFTP_Post_ftp_PathVersion</NAME><VALUE>1</VALUE></SETTING>
<SETTING><NAME>MWFTP_Post_ftp_PathType</NAME><VALUE>0</VALUE></SETTING>
<SETTING><NAME>MWFTP_Post_ftp_PathFormat</NAME><VALUE>0</VALUE></SETTING>
<SETTING><NAME>MWFTP_Post_ftp_tree</NAME><VALUE></VALUE></SETTING>
@@ -1398,14 +1434,35 @@
<SETTING><NAME>MWProject_X86_minsize</NAME><VALUE>4</VALUE></SETTING>
<SETTING><NAME>MWProject_X86_importlib</NAME><VALUE></VALUE></SETTING>
<PANELDATA><NAME>xpidl Settings</NAME><VALUE>
0001000301010D626F6F6B6D61726B732E787074000000000000000000000000
0001000301010975636F6E762E78707478707470747400000000000000000000
0000000000000000
</VALUE></PANELDATA>
</SETTINGLIST>
<FILELIST>
<FILE>
<PATHTYPE>Name</PATHTYPE>
<PATH>nsIBookmarksService.idl</PATH>
<PATH>nsITextToSubURI.idl</PATH>
<PATHFORMAT>MacOS</PATHFORMAT>
<FILEKIND>Text</FILEKIND>
<FILEFLAGS></FILEFLAGS>
</FILE>
<FILE>
<PATHTYPE>Name</PATHTYPE>
<PATH>nsICurrentCharsetListener.idl</PATH>
<PATHFORMAT>MacOS</PATHFORMAT>
<FILEKIND>Text</FILEKIND>
<FILEFLAGS></FILEFLAGS>
</FILE>
<FILE>
<PATHTYPE>Name</PATHTYPE>
<PATH>nsICharsetConverterManager2.idl</PATH>
<PATHFORMAT>MacOS</PATHFORMAT>
<FILEKIND>Text</FILEKIND>
<FILEFLAGS></FILEFLAGS>
</FILE>
<FILE>
<PATHTYPE>Name</PATHTYPE>
<PATH>nsIScriptableUConv.idl</PATH>
<PATHFORMAT>MacOS</PATHFORMAT>
<FILEKIND>Text</FILEKIND>
<FILEFLAGS></FILEFLAGS>
@@ -1414,7 +1471,22 @@
<LINKORDER>
<FILEREF>
<PATHTYPE>Name</PATHTYPE>
<PATH>nsIBookmarksService.idl</PATH>
<PATH>nsITextToSubURI.idl</PATH>
<PATHFORMAT>MacOS</PATHFORMAT>
</FILEREF>
<FILEREF>
<PATHTYPE>Name</PATHTYPE>
<PATH>nsICurrentCharsetListener.idl</PATH>
<PATHFORMAT>MacOS</PATHFORMAT>
</FILEREF>
<FILEREF>
<PATHTYPE>Name</PATHTYPE>
<PATH>nsICharsetConverterManager2.idl</PATH>
<PATHFORMAT>MacOS</PATHFORMAT>
</FILEREF>
<FILEREF>
<PATHTYPE>Name</PATHTYPE>
<PATH>nsIScriptableUConv.idl</PATH>
<PATHFORMAT>MacOS</PATHFORMAT>
</FILEREF>
</LINKORDER>
@@ -1423,14 +1495,32 @@
<TARGETORDER>
<ORDEREDTARGET><NAME>headers</NAME></ORDEREDTARGET>
<ORDEREDTARGET><NAME>bookmarks.xpt</NAME></ORDEREDTARGET>
<ORDEREDTARGET><NAME>uconv.xpt</NAME></ORDEREDTARGET>
</TARGETORDER>
<GROUPLIST>
<FILEREF>
<TARGETNAME>headers</TARGETNAME>
<PATHTYPE>Name</PATHTYPE>
<PATH>nsIBookmarksService.idl</PATH>
<PATH>nsITextToSubURI.idl</PATH>
<PATHFORMAT>MacOS</PATHFORMAT>
</FILEREF>
<FILEREF>
<TARGETNAME>headers</TARGETNAME>
<PATHTYPE>Name</PATHTYPE>
<PATH>nsICurrentCharsetListener.idl</PATH>
<PATHFORMAT>MacOS</PATHFORMAT>
</FILEREF>
<FILEREF>
<TARGETNAME>headers</TARGETNAME>
<PATHTYPE>Name</PATHTYPE>
<PATH>nsICharsetConverterManager2.idl</PATH>
<PATHFORMAT>MacOS</PATHFORMAT>
</FILEREF>
<FILEREF>
<TARGETNAME>headers</TARGETNAME>
<PATHTYPE>Name</PATHTYPE>
<PATH>nsIScriptableUConv.idl</PATH>
<PATHFORMAT>MacOS</PATHFORMAT>
</FILEREF>
</GROUPLIST>

View File

@@ -20,7 +20,6 @@
* Contributor(s):
*/
/* Defining the following causes NS_APPSHELL to be defined as NS_EXPORT. */
#define _IMPL_NS_APPSHELL
#include "MacSharedPrefix.h"
#define _IMPL_NS_UCONV 1
#define __STDC__
#include "MacPrefix_debug.h"

View File

@@ -20,7 +20,6 @@
* Contributor(s):
*/
/* Defining the following causes NS_APPSHELL to be defined as NS_EXPORT. */
#define _IMPL_NS_APPSHELL
#include "MacSharedPrefix_debug.h"
#define _IMPL_NS_UCONV 1
#define __STDC__
#include "MacSharedPrefix.h"

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,53 @@
#!nmake
#
# The contents of this file are subject to the Netscape Public
# License Version 1.1 (the "License"); you may not use this file
# except in compliance with the License. You may obtain a copy of
# the License at http://www.mozilla.org/NPL/
#
# Software distributed under the License is distributed on an "AS
# IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
# implied. See the License for the specific language governing
# rights and limitations under the License.
#
# The Original Code is mozilla.org code.
#
# The Initial Developer of the Original Code is Netscape
# Communications Corporation. Portions created by Netscape are
# Copyright (C) 1998 Netscape Communications Corporation. All
# Rights Reserved.
#
# Contributor(s):
# IBM Corporation
#
# This Original Code has been modified by IBM Corporation.
# Modifications made by IBM described herein are
# Copyright (c) International Business Machines
# Corporation, 1999
#
# Modifications to Mozilla code or documentation
# identified per MPL Section 3.3
#
# Date Modified by Description of modification
# 12/09/1999 IBM Corp. Support for IBM codepages - 850,852,855,857,862,864
DEPTH=..\..
include <$(DEPTH)/config/config.mak>
DIRS=idl public src \
ucvlatin \
!ifdef MOZ_MATHML
ucvmath \
!endif
ucvibm \
ucvja \
ucvcn \
ucvtw \
ucvtw2 \
ucvko \
!if !defined(DISABLE_TESTS)
tests \
!endif
$(NULL)
include <$(DEPTH)\config\rules.mak>

View File

@@ -0,0 +1,11 @@
nsICharsetAlias.h
nsICharsetConverterManager.h
nsIPlatformCharset.h
nsIUnicodeDecodeHelper.h
nsIUnicodeDecoder.h
nsIUnicodeEncodeHelper.h
nsIUnicodeEncoder.h
uconvutil.h
nsIMappingCache.h
nsICharRepresentable.h
nsIConverterInputStream.h

View File

@@ -19,36 +19,28 @@
# Contributor(s):
#
DEPTH = ../../../..
DEPTH = ../../..
topsrcdir = @top_srcdir@
srcdir = @srcdir@
VPATH = @srcdir@
include $(DEPTH)/config/autoconf.mk
MODULE = appcomps
LIBRARY_NAME = bookmarks_s
REQUIRES = xpcom \
string \
rdf \
appshell \
widget \
necko \
nkcache \
uconv \
pref \
dom \
intl \
webshell \
windowwatcher \
unicharutil \
$(NULL)
MODULE = uconv
CPPSRCS = nsBookmarksService.cpp
# we don't want the shared lib, but we want to force the creation of a
# static lib.
FORCE_STATIC_LIB = 1
EXPORTS = \
nsICharsetAlias.h \
nsICharsetConverterManager.h \
nsIPlatformCharset.h \
nsIUnicodeDecodeHelper.h \
nsIUnicodeDecoder.h \
nsIUnicodeEncodeHelper.h \
nsIUnicodeEncoder.h \
nsICharRepresentable.h \
nsIMappingCache.h \
nsIConverterInputStream.h \
uconvutil.h \
$(NULL)
include $(topsrcdir)/config/rules.mk

View File

@@ -21,6 +21,21 @@
DEPTH=..\..\..
DIRS=public src resources
EXPORTS = \
nsICharsetAlias.h \
nsICharsetConverterManager.h \
nsIPlatformCharset.h \
nsIUnicodeDecodeHelper.h \
nsIUnicodeDecoder.h \
nsIUnicodeEncodeHelper.h \
nsIUnicodeEncoder.h \
nsIMappingCache.h \
nsICharRepresentable.h \
nsIConverterInputStream.h \
uconvutil.h \
$(NULL)
MODULE=uconv
include <$(DEPTH)\config\rules.mak>

View File

@@ -0,0 +1,72 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* ***** BEGIN LICENSE BLOCK *****
* Version: NPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Netscape Public License
* Version 1.1 (the "License"); you may not use this file except in
* compliance with the License. You may obtain a copy of the License at
* http://www.mozilla.org/NPL/
*
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the
* License.
*
* The Original Code is Mozilla Communicator client code.
*
* The Initial Developer of the Original Code is
* Netscape Communications Corporation.
* Portions created by the Initial Developer are Copyright (C) 1998
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
*
*
* Alternatively, the contents of this file may be used under the terms of
* either the GNU General Public License Version 2 or later (the "GPL"), or
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
* in which case the provisions of the GPL or the LGPL are applicable instead
* of those above. If you wish to allow use of your version of this file only
* under the terms of either the GPL or the LGPL, and not to allow others to
* use your version of this file under the terms of the NPL, indicate your
* decision by deleting the provisions above and replace them with the notice
* and other provisions required by the GPL or the LGPL. If you do not delete
* the provisions above, a recipient may use your version of this file under
* the terms of any one of the NPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
#ifndef nsICharRepresentable_h__
#define nsICharRepresentable_h__
#include "nscore.h"
#include "nsISupports.h"
// {A4D9A521-185A-11d3-B3BD-00805F8A6670}
#define NS_ICHARREPRESENTABLE_IID \
{ 0xa4d9a521, 0x185a, 0x11d3, { 0xb3, 0xbd, 0x0, 0x80, 0x5f, 0x8a, 0x66, 0x70 } }
/*
The following two macro have been duplicate in umap.c.
You need to change both place to make it work
*/
#define IS_REPRESENTABLE(info, c) (((info)[(c) >> 5] >> ((c) & 0x1f)) & 1L)
#define SET_REPRESENTABLE(info, c) (info)[(c) >> 5] |= (1L << ((c) & 0x1f))
#define CLEAR_REPRESENTABLE(info, c) (info)[(c) >> 5] &= (~(1L << ((c) & 0x1f)))
// number of PRUint32 in the 64Kbit char map
#define UCS2_MAP_LEN 2048
/**
*/
class nsICharRepresentable : public nsISupports
{
public:
NS_DEFINE_STATIC_IID_ACCESSOR(NS_ICHARREPRESENTABLE_IID)
NS_IMETHOD FillInfo(PRUint32* aInfo) = 0;
};
#endif /* nsIUnicodeDecoder_h__ */

View File

@@ -0,0 +1,77 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* ***** BEGIN LICENSE BLOCK *****
* Version: NPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Netscape Public License
* Version 1.1 (the "License"); you may not use this file except in
* compliance with the License. You may obtain a copy of the License at
* http://www.mozilla.org/NPL/
*
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the
* License.
*
* The Original Code is Mozilla Communicator client code.
*
* The Initial Developer of the Original Code is
* Netscape Communications Corporation.
* Portions created by the Initial Developer are Copyright (C) 1998
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
*
*
* Alternatively, the contents of this file may be used under the terms of
* either the GNU General Public License Version 2 or later (the "GPL"), or
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
* in which case the provisions of the GPL or the LGPL are applicable instead
* of those above. If you wish to allow use of your version of this file only
* under the terms of either the GPL or the LGPL, and not to allow others to
* use your version of this file under the terms of the NPL, indicate your
* decision by deleting the provisions above and replace them with the notice
* and other provisions required by the GPL or the LGPL. If you do not delete
* the provisions above, a recipient may use your version of this file under
* the terms of any one of the NPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
#ifndef nsICharsetAlias_h___
#define nsICharsetAlias_h___
#include "nscore.h"
#include "nsString.h"
#include "nsISupports.h"
// {CCD4D374-CCDC-11d2-B3B1-00805F8A6670}
#define NS_ICHARSETALIAS_IID \
{ 0xccd4d374, 0xccdc, 0x11d2, { 0xb3, 0xb1, 0x0, 0x80, 0x5f, 0x8a, 0x66, 0x70 }}
static NS_DEFINE_IID(kICharsetAliasIID, NS_ICHARSETALIAS_IID);
// {98D41C21-CCF3-11d2-B3B1-00805F8A6670}
#define NS_CHARSETALIAS_CID \
{ 0x98d41c21, 0xccf3, 0x11d2, { 0xb3, 0xb1, 0x0, 0x80, 0x5f, 0x8a, 0x66, 0x70 }}
static NS_DEFINE_IID(kCharsetAliasCID, NS_CHARSETALIAS_CID);
#define NS_CHARSETALIAS_CID \
{ 0x98d41c21, 0xccf3, 0x11d2, { 0xb3, 0xb1, 0x0, 0x80, 0x5f, 0x8a, 0x66, 0x70 }}
#define NS_CHARSETALIAS_CONTRACTID "@mozilla.org/intl/charsetalias;1"
class nsICharsetAlias : public nsISupports
{
public:
NS_DEFINE_STATIC_IID_ACCESSOR(NS_ICHARSETALIAS_IID)
NS_IMETHOD GetPreferred(const nsAString& aAlias, nsAString& aResult) = 0;
NS_IMETHOD GetPreferred(const PRUnichar* aAlias, const PRUnichar** aResult) = 0;
NS_IMETHOD GetPreferred(const char* aAlias, char* aResult, PRInt32 aBufLength) = 0;
NS_IMETHOD Equals(const nsAString& aCharset1, const nsAString& aCharset2, PRBool* aResult) = 0;
NS_IMETHOD Equals(const PRUnichar* aCharset1, const PRUnichar* aCharset2, PRBool* aResult) = 0;
NS_IMETHOD Equals(const char* aCharset1, const char* aCharset2, PRBool* aResult) = 0;
};
#endif /* nsICharsetAlias_h___ */

View File

@@ -0,0 +1,230 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* ***** BEGIN LICENSE BLOCK *****
* Version: NPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Netscape Public License
* Version 1.1 (the "License"); you may not use this file except in
* compliance with the License. You may obtain a copy of the License at
* http://www.mozilla.org/NPL/
*
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the
* License.
*
* The Original Code is Mozilla Communicator client code.
*
* The Initial Developer of the Original Code is
* Netscape Communications Corporation.
* Portions created by the Initial Developer are Copyright (C) 1998
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
* Morten Nilsen <morten@nilsen.com>
*
*
* Alternatively, the contents of this file may be used under the terms of
* either the GNU General Public License Version 2 or later (the "GPL"), or
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
* in which case the provisions of the GPL or the LGPL are applicable instead
* of those above. If you wish to allow use of your version of this file only
* under the terms of either the GPL or the LGPL, and not to allow others to
* use your version of this file under the terms of the NPL, indicate your
* decision by deleting the provisions above and replace them with the notice
* and other provisions required by the GPL or the LGPL. If you do not delete
* the provisions above, a recipient may use your version of this file under
* the terms of any one of the NPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
#ifndef nsICharsetConverterManager_h___
#define nsICharsetConverterManager_h___
#include "nsString.h"
#include "nsError.h"
#include "nsISupports.h"
#include "nsIAtom.h"
#include "nsIUnicodeEncoder.h"
#include "nsIUnicodeDecoder.h"
#include "nsICategoryManager.h"
#define NS_ICHARSETCONVERTERMANAGER_IID \
{0x3c1c0161, 0x9bd0, 0x11d3, { 0x9d, 0x9, 0x0, 0x50, 0x4, 0x0, 0x7, 0xb2}}
// XXX change to NS_CHARSETCONVERTERMANAGER_CID
#define NS_ICHARSETCONVERTERMANAGER_CID \
{0x3c1c0163, 0x9bd0, 0x11d3, { 0x9d, 0x9, 0x0, 0x50, 0x4, 0x0, 0x7, 0xb2}}
// XXX change to NS_CHARSETCONVERTERMANAGER_PID
#define NS_CHARSETCONVERTERMANAGER_CONTRACTID "@mozilla.org/charset-converter-manager;1"
#define NS_DATA_BUNDLE_CATEGORY "uconv-charset-data"
#define NS_TITLE_BUNDLE_CATEGORY "uconv-charset-titles"
#define NS_ERROR_UCONV_NOCONV \
NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_UCONV, 0x01)
#define NS_SUCCESS_USING_FALLBACK_LOCALE \
NS_ERROR_GENERATE_SUCCESS(NS_ERROR_MODULE_UCONV, 0x02)
#ifdef DEBUG
#define REGSELF_PRINTF(x,y) \
fprintf(stderr,"RegSelf %s to %s converter complete\n", \
x, y)
#else
#define REGSELF_PRINTF(x,y)
#endif
#define NS_UNICODEDECODER_NAME "Charset Decoders"
#define NS_UNICODEENCODER_NAME "Charset Encoders"
struct nsConverterRegistryInfo {
PRBool isEncoder; // PR_TRUE = encoder, PR_FALSE = decoder
const char *charset;
nsCID cid;
};
#define NS_CONVERTER_REGISTRY_START \
static const nsConverterRegistryInfo gConverterRegistryInfo[] = {
#define NS_CONVERTER_REGISTRY_END \
};
#define NS_IMPL_NSUCONVERTERREGSELF \
static NS_IMETHODIMP \
nsUConverterRegSelf(nsIComponentManager *aCompMgr, \
nsIFile *aPath, \
const char* registryLocation, \
const char* componentType, \
const nsModuleComponentInfo *info) \
{ \
nsresult rv; \
nsCOMPtr<nsICategoryManager> catman = \
do_GetService(NS_CATEGORYMANAGER_CONTRACTID, &rv); \
if (NS_FAILED(rv)) return rv; \
\
nsXPIDLCString previous; \
PRUint32 i; \
for (i=0; i<sizeof(gConverterRegistryInfo)/sizeof(gConverterRegistryInfo[0]); i++) { \
const nsConverterRegistryInfo* entry = &gConverterRegistryInfo[i]; \
const char *category; \
const char *key; \
\
if (entry->isEncoder) { \
category = NS_UNICODEENCODER_NAME; \
} else { \
category = NS_UNICODEDECODER_NAME; \
} \
key = entry->charset; \
\
rv = catman->AddCategoryEntry(category, key, "", \
PR_TRUE, \
PR_TRUE, \
getter_Copies(previous)); \
} \
return rv; \
} \
static NS_IMETHODIMP \
nsUConverterUnregSelf(nsIComponentManager *aCompMgr, \
nsIFile *aPath, \
const char*, \
const nsModuleComponentInfo *info) \
{ \
nsresult rv; \
nsCOMPtr<nsICategoryManager> catman = \
do_GetService(NS_CATEGORYMANAGER_CONTRACTID, &rv); \
if (NS_FAILED(rv)) return rv; \
\
nsXPIDLCString previous; \
PRUint32 i; \
for (i=0; i<sizeof(gConverterRegistryInfo)/sizeof(gConverterRegistryInfo[0]); i++) { \
const nsConverterRegistryInfo* entry = &gConverterRegistryInfo[i]; \
const char *category; \
const char *key; \
\
if (entry->isEncoder) { \
category = NS_UNICODEDECODER_NAME; \
} else { \
category = NS_UNICODEENCODER_NAME; \
} \
key = entry->charset; \
\
char * value = entry->cid.ToString(); \
\
rv = catman->DeleteCategoryEntry(category, key, PR_TRUE); \
CRTFREEIF(value); \
} \
return rv; \
}
#define NS_UCONV_REG_UNREG_DECODER(_Charset, _CID) \
{ \
PR_FALSE, \
_Charset, \
_CID, \
},
#define NS_UCONV_REG_UNREG_ENCODER(_Charset, _CID) \
{ \
PR_TRUE, \
_Charset, \
_CID, \
},
// this needs to be written out per some odd cpp behavior that
// I could not work around - the behavior is document in the cpp
// info page however, so I'm not the only one to hit this!
#define NS_UCONV_REG_UNREG(_Charset, _DecoderCID, _EncoderCID) \
{ \
PR_FALSE, \
_Charset, \
_DecoderCID, \
}, \
{ \
PR_TRUE, \
_Charset, \
_EncoderCID, \
},
/**
* Interface for a Manager of Charset Converters.
*
* This Manager's data is a cache of the stuff available directly through
* Registry and Extensible String Bundles. Plus a set of convenient APIs.
*
* Note: The term "Charset" used in the classes, interfaces and file names
* should be read as "Coded Character Set". I am saying "charset" only for
* length considerations: it is a much shorter word. This convention is for
* source-code only, in the attached documents I will be either using the
* full expression or I'll specify a different convention.
*
* A DECODER converts from a random encoding into Unicode.
* An ENCODER converts from Unicode into a random encoding.
* All our data structures and APIs are divided like that.
* However, when you have a charset data, you may have 3 cases:
* a) the data is charset-dependet, but it is common for encoders and decoders
* b) the data is different for the two of them, thus needing different APIs
* and different "aProp" identifying it.
* c) the data is relevant only for one: encoder or decoder; its nature making
* the distinction.
*
* @created 15/Nov/1999
* @author Catalin Rotaru [CATA]
*/
class nsICharsetConverterManager : public nsISupports
{
public:
NS_DEFINE_STATIC_IID_ACCESSOR(NS_ICHARSETCONVERTERMANAGER_IID)
NS_IMETHOD GetUnicodeEncoder(const nsString * aDest,
nsIUnicodeEncoder ** aResult) = 0;
NS_IMETHOD GetUnicodeDecoder(const nsString * aSrc,
nsIUnicodeDecoder ** aResult) = 0;
NS_IMETHOD GetCharsetLangGroup(nsString * aCharset, nsIAtom ** aResult) = 0;
};
#endif /* nsICharsetConverterManager_h___ */

View File

@@ -1,4 +1,4 @@
/* -*- Mode: Java; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/* ***** BEGIN LICENSE BLOCK *****
* Version: NPL 1.1/GPL 2.0/LGPL 2.1
*
@@ -20,7 +20,6 @@
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
* Ben Goodger <ben@netscape.com> (Original Author)
*
* Alternatively, the contents of this file may be used under the terms of
* either the GNU General Public License Version 2 or later (the "GPL"), or
@@ -36,29 +35,19 @@
*
* ***** END LICENSE BLOCK ***** */
#include "nsISupports.h"
#include "nsIUnicharInputStream.h"
////////////////////////////////////////////////////////////////////////////////
// Get the two bookmarks utility libraries running, attach controllers, focus
// tree widget, etc.
function Startup()
{
var bookmarksView = document.getElementById("bookmarks-view");
bookmarksView.treeBoxObject.selection.select(0);
}
// {FC66FFB6-5404-4908-A4A3-27F92FA0579D}
#define NS_ICONVERTERSTREAM_IID \
{ 0xfc66ffb6, 0x5404, 0x4908, \
{ 0xa4, 0xa3, 0x27, 0xf9, 0x2f, 0xa0, 0x57, 0x9d } }
function manageBookmarks() {
openDialog("chrome://communicator/content/bookmarks/bookmarks.xul", "", "chrome,dialog=no,resizable=yes");
}
class nsIConverterInputStream : public nsIUnicharInputStream {
public:
NS_DEFINE_STATIC_IID_ACCESSOR(NS_ICONVERTERSTREAM_IID)
NS_IMETHOD Init(nsIInputStream *aStream, const PRUnichar *aCharset,
PRInt32 aBufferSize) = 0;
};
function addBookmark() {
var contentArea = top.document.getElementById('content');
if (contentArea) {
const browsers = contentArea.browsers;
if (browsers.length > 1)
BookmarksUtils.addBookmarkForTabBrowser(contentArea);
else
BookmarksUtils.addBookmarkForBrowser(contentArea.webNavigation, true);
}
else
BookmarksUtils.addBookmark(null, null, undefined, true);
}

View File

@@ -0,0 +1,52 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* ***** BEGIN LICENSE BLOCK *****
* Version: NPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Netscape Public License
* Version 1.1 (the "License"); you may not use this file except in
* compliance with the License. You may obtain a copy of the License at
* http://www.mozilla.org/NPL/
*
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the
* License.
*
* The Original Code is Mozilla Communicator client code.
*
* The Initial Developer of the Original Code is
* Netscape Communications Corporation.
* Portions created by the Initial Developer are Copyright (C) 1998
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
*
*
* Alternatively, the contents of this file may be used under the terms of
* either the GNU General Public License Version 2 or later (the "GPL"), or
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
* in which case the provisions of the GPL or the LGPL are applicable instead
* of those above. If you wish to allow use of your version of this file only
* under the terms of either the GPL or the LGPL, and not to allow others to
* use your version of this file under the terms of the NPL, indicate your
* decision by deleting the provisions above and replace them with the notice
* and other provisions required by the GPL or the LGPL. If you do not delete
* the provisions above, a recipient may use your version of this file under
* the terms of any one of the NPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
#ifndef nsIMappingCache_h__
#define nsIMappingCache_h__
typedef void* nsIMappingCache;
typedef enum {
kMappingCacheType64 = 0x003F,
kMappingCacheType128 = 0x007F,
kMappingCacheType256 = 0x00FF,
kMappingCacheType512 = 0x01FF
} nsMappingCacheType;
#endif /* nsIMappingCache_h__ */

View File

@@ -0,0 +1,77 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* ***** BEGIN LICENSE BLOCK *****
* Version: NPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Netscape Public License
* Version 1.1 (the "License"); you may not use this file except in
* compliance with the License. You may obtain a copy of the License at
* http://www.mozilla.org/NPL/
*
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the
* License.
*
* The Original Code is Mozilla Communicator client code.
*
* The Initial Developer of the Original Code is
* Netscape Communications Corporation.
* Portions created by the Initial Developer are Copyright (C) 1998
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
*
*
* Alternatively, the contents of this file may be used under the terms of
* either the GNU General Public License Version 2 or later (the "GPL"), or
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
* in which case the provisions of the GPL or the LGPL are applicable instead
* of those above. If you wish to allow use of your version of this file only
* under the terms of either the GPL or the LGPL, and not to allow others to
* use your version of this file under the terms of the NPL, indicate your
* decision by deleting the provisions above and replace them with the notice
* and other provisions required by the GPL or the LGPL. If you do not delete
* the provisions above, a recipient may use your version of this file under
* the terms of any one of the NPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
#ifndef nsIPlatformCharset_h__
#define nsIPlatformCharset_h__
#include "nsString.h"
#include "nsISupports.h"
// Interface ID for our nsIPlatformCharset interface
#define NS_IPLATFORMCHARSET_IID \
{ 0x84b0f181, 0xc6c7, 0x11d2, {0xb3, 0xb0, 0x0, 0x80, 0x5f, 0x8a, 0x66, 0x70 }}
#define NS_PLATFORMCHARSET_CID \
{ 0x84b0f182, 0xc6c7, 0x11d2, {0xb3, 0xb0, 0x0, 0x80, 0x5f, 0x8a, 0x66, 0x70 }}
#define NS_PLATFORMCHARSET_CONTRACTID "@mozilla.org/intl/platformcharset;1"
typedef enum {
kPlatformCharsetSel_PlainTextInClipboard = 0,
kPlatformCharsetSel_FileName = 1,
kPlatformCharsetSel_Menu = 2,
kPlatformCharsetSel_4xBookmarkFile = 3,
kPlatformCharsetSel_KeyboardInput = 4,
kPlatformCharsetSel_WindowManager = 5,
kPlatformCharsetSel_4xPrefsJS = 6
} nsPlatformCharsetSel;
class nsIPlatformCharset : public nsISupports
{
public:
NS_DEFINE_STATIC_IID_ACCESSOR(NS_IPLATFORMCHARSET_IID)
NS_IMETHOD GetCharset(nsPlatformCharsetSel selector, nsAString& oResult) = 0;
NS_IMETHOD GetDefaultCharsetForLocale(const PRUnichar* localeName, PRUnichar** _retValue) = 0;
};
#endif /* nsIPlatformCharset_h__ */

View File

@@ -0,0 +1,118 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* ***** BEGIN LICENSE BLOCK *****
* Version: NPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Netscape Public License
* Version 1.1 (the "License"); you may not use this file except in
* compliance with the License. You may obtain a copy of the License at
* http://www.mozilla.org/NPL/
*
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the
* License.
*
* The Original Code is Mozilla Communicator client code.
*
* The Initial Developer of the Original Code is
* Netscape Communications Corporation.
* Portions created by the Initial Developer are Copyright (C) 1998
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
*
*
* Alternatively, the contents of this file may be used under the terms of
* either the GNU General Public License Version 2 or later (the "GPL"), or
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
* in which case the provisions of the GPL or the LGPL are applicable instead
* of those above. If you wish to allow use of your version of this file only
* under the terms of either the GPL or the LGPL, and not to allow others to
* use your version of this file under the terms of the NPL, indicate your
* decision by deleting the provisions above and replace them with the notice
* and other provisions required by the GPL or the LGPL. If you do not delete
* the provisions above, a recipient may use your version of this file under
* the terms of any one of the NPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
#ifndef nsIUnicodeDecodeHelper_h___
#define nsIUnicodeDecodeHelper_h___
#include "nscore.h"
#include "uconvutil.h"
#include "nsISupports.h"
#include "nsIMappingCache.h"
// Interface ID for our Unicode Decode Helper interface
// {9CC39FF0-DD5D-11d2-8AAC-00600811A836}
#define NS_IUNICODEDECODEHELPER_IID \
{ 0x9cc39ff0, 0xdd5d, 0x11d2, {0x8a, 0xac, 0x0, 0x60, 0x8, 0x11, 0xa8, 0x36}}
// Class ID for our UnicodeDecoderHelper implementation
// {9CC39FF1-DD5D-11d2-8AAC-00600811A836}
#define NS_UNICODEDECODEHELPER_CID \
{ 0x9cc39ff1, 0xdd5d, 0x11d2, {0x8a, 0xac, 0x0, 0x60, 0x8, 0x11, 0xa8, 0x36}}
#define NS_UNICODEDECODEHELPER_CONTRACTID "@mozilla.org/intl/unicode/decodehelper;1"
#define NS_ERROR_UDEC_NOHELPER \
NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_UCONV, 0x41)
//----------------------------------------------------------------------
// Class nsIUnicodeDecodeHelper [declaration]
/**
* Interface for a Unicode Decode Helper object.
*
* @created 22/Feb/1999
* @author Catalin Rotaru [CATA]
*/
class nsIUnicodeDecodeHelper : public nsISupports
{
public:
NS_DEFINE_STATIC_IID_ACCESSOR(NS_IUNICODEDECODEHELPER_IID)
/**
* Converts data using a lookup table.
*/
NS_IMETHOD ConvertByTable(const char * aSrc, PRInt32 * aSrcLength,
PRUnichar * aDest, PRInt32 * aDestLength, uShiftTable * aShiftTable,
uMappingTable * aMappingTable) = 0;
/**
* Converts data using a set of lookup tables.
*/
NS_IMETHOD ConvertByMultiTable(const char * aSrc, PRInt32 * aSrcLength,
PRUnichar * aDest, PRInt32 * aDestLength, PRInt32 aTableCount,
uRange * aRangeArray, uShiftTable ** aShiftTable,
uMappingTable ** aMappingTable) = 0;
/**
* Converts data using a fast lookup table.
*/
NS_IMETHOD ConvertByFastTable(const char * aSrc, PRInt32 * aSrcLength,
PRUnichar * aDest, PRInt32 * aDestLength, PRUnichar * aFastTable,
PRInt32 aTableSize) = 0;
/**
* Create a Mapping Cache
*/
NS_IMETHOD CreateCache(nsMappingCacheType aType, nsIMappingCache* aResult) = 0;
/**
* Destroy a Mapping Cache
*/
NS_IMETHOD DestroyCache(nsIMappingCache aCache) = 0;
/**
* Create a cache-like fast lookup table from a normal one.
*/
NS_IMETHOD CreateFastTable( uShiftTable * aShiftTable,
uMappingTable * aMappingTable, PRUnichar * aFastTable,
PRInt32 aTableSize) = 0;
};
#endif /* nsIUnicodeDecodeHelper_h___ */

View File

@@ -0,0 +1,172 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* ***** BEGIN LICENSE BLOCK *****
* Version: NPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Netscape Public License
* Version 1.1 (the "License"); you may not use this file except in
* compliance with the License. You may obtain a copy of the License at
* http://www.mozilla.org/NPL/
*
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the
* License.
*
* The Original Code is Mozilla Communicator client code.
*
* The Initial Developer of the Original Code is
* Netscape Communications Corporation.
* Portions created by the Initial Developer are Copyright (C) 1998
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
*
*
* Alternatively, the contents of this file may be used under the terms of
* either the GNU General Public License Version 2 or later (the "GPL"), or
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
* in which case the provisions of the GPL or the LGPL are applicable instead
* of those above. If you wish to allow use of your version of this file only
* under the terms of either the GPL or the LGPL, and not to allow others to
* use your version of this file under the terms of the NPL, indicate your
* decision by deleting the provisions above and replace them with the notice
* and other provisions required by the GPL or the LGPL. If you do not delete
* the provisions above, a recipient may use your version of this file under
* the terms of any one of the NPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
#ifndef nsIUnicodeDecoder_h___
#define nsIUnicodeDecoder_h___
#include "nscore.h"
#include "nsISupports.h"
// Interface ID for our Unicode Decoder interface
// {B2F178E1-832A-11d2-8A8E-00600811A836}
//NS_DECLARE_ID(kIUnicodeDecoderIID,
// 0xb2f178e1, 0x832a, 0x11d2, 0x8a, 0x8e, 0x0, 0x60, 0x8, 0x11, 0xa8, 0x36);
#define NS_IUNICODEDECODER_IID \
{ 0xb2f178e1, 0x832a, 0x11d2, \
{ 0x8a, 0x8e, 0x0, 0x60, 0x8, 0x11, 0xa8, 0x36 }}
static NS_DEFINE_IID(kIUnicodeDecoderIID, NS_IUNICODEDECODER_IID);
// XXX deprecated
/*---------- BEGIN DEPRECATED */
#define NS_EXACT_LENGTH \
NS_ERROR_GENERATE_SUCCESS(NS_ERROR_MODULE_UCONV, 11)
#define NS_PARTIAL_MORE_INPUT \
NS_ERROR_GENERATE_SUCCESS(NS_ERROR_MODULE_UCONV, 12)
#define NS_PARTIAL_MORE_OUTPUT \
NS_ERROR_GENERATE_SUCCESS(NS_ERROR_MODULE_UCONV, 13)
#define NS_ERROR_ILLEGAL_INPUT \
NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_UCONV, 14)
/*---------- END DEPRECATED */
// XXX make us hex! (same digits though)
#define NS_OK_UDEC_EXACTLENGTH \
NS_ERROR_GENERATE_SUCCESS(NS_ERROR_MODULE_UCONV, 11)
#define NS_OK_UDEC_MOREINPUT \
NS_ERROR_GENERATE_SUCCESS(NS_ERROR_MODULE_UCONV, 12)
#define NS_OK_UDEC_MOREOUTPUT \
NS_ERROR_GENERATE_SUCCESS(NS_ERROR_MODULE_UCONV, 13)
#define NS_ERROR_UDEC_ILLEGALINPUT \
NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_UCONV, 14)
#define NS_UNICODEDECODER_CONTRACTID_BASE "@mozilla.org/intl/unicode/decoder;1?charset="
/**
* Interface for a Converter from a Charset into Unicode.
*
* @created 23/Nov/1998
* @author Catalin Rotaru [CATA]
*/
class nsIUnicodeDecoder : public nsISupports
{
public:
NS_DEFINE_STATIC_IID_ACCESSOR(NS_IUNICODEDECODER_IID)
enum {
kOnError_Recover, // on an error, recover and continue
kOnError_Signal // on an error, stop and signal
};
/**
* Converts the data from one Charset to Unicode.
*
* About the byte ordering:
* - For input, if the converter cares (that depends of the charset, for
* example a singlebyte will ignore the byte ordering) it should assume
* network order. If necessary and requested, we can add a method
* SetInputByteOrder() so that the reverse order can be used, too. That
* method would have as default the assumed network order.
* - The output stream is Unicode, having the byte order which is internal
* for the machine on which the converter is running on.
*
* Unless there is not enough output space, this method must consume all the
* available input data! The eventual incomplete final character data will be
* stored internally in the converter and used when the method is called
* again for continuing the conversion. This way, the caller will not have to
* worry about managing incomplete input data by mergeing it with the next
* buffer.
*
* Error conditions:
* If the read value does not belong to this character set, one should
* replace it with the Unicode special 0xFFFD. When an actual input error is
* encountered, like a format error, the converter stop and return error.
* Hoever, we should keep in mind that we need to be lax in decoding.
*
* Converter required behavior:
* In this order: when output space is full - return right away. When input
* data is wrong, return input pointer right after the wrong byte. When
* partial input, it will be consumed and cached. All the time input pointer
* will show how much was actually consumed and how much was actually
* written.
*
* @param aSrc [IN] the source data buffer
* @param aSrcLength [IN/OUT] the length of source data buffer; after
* conversion will contain the number of bytes read
* @param aDest [OUT] the destination data buffer
* @param aDestLength [IN/OUT] the length of the destination data buffer;
* after conversion will contain the number of Unicode
* characters written
* @return NS_PARTIAL_MORE_INPUT if only a partial conversion was
* done; more input is needed to continue
* NS_PARTIAL_MORE_OUTPUT if only a partial conversion
* was done; more output space is needed to continue
* NS_ERROR_ILLEGAL_INPUT if an illegal input sequence
* was encountered and the behavior was set to "signal"
*/
NS_IMETHOD Convert(const char * aSrc, PRInt32 * aSrcLength,
PRUnichar * aDest, PRInt32 * aDestLength) = 0;
/**
* Returns a quick estimation of the size of the buffer needed to hold the
* converted data. Remember: this estimation is >= with the actual size of
* the buffer needed. It will be computed for the "worst case"
*
* @param aSrc [IN] the source data buffer
* @param aSrcLength [IN] the length of source data buffer
* @param aDestLength [OUT] the needed size of the destination buffer
* @return NS_EXACT_LENGTH if an exact length was computed
* NS_OK is all we have is an approximation
*/
NS_IMETHOD GetMaxLength(const char * aSrc, PRInt32 aSrcLength,
PRInt32 * aDestLength) = 0;
/**
* Resets the charset converter so it may be recycled for a completely
* different and urelated buffer of data.
*/
NS_IMETHOD Reset() = 0;
};
#endif /* nsIUnicodeDecoder_h___ */

View File

@@ -0,0 +1,111 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* ***** BEGIN LICENSE BLOCK *****
* Version: NPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Netscape Public License
* Version 1.1 (the "License"); you may not use this file except in
* compliance with the License. You may obtain a copy of the License at
* http://www.mozilla.org/NPL/
*
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the
* License.
*
* The Original Code is Mozilla Communicator client code.
*
* The Initial Developer of the Original Code is
* Netscape Communications Corporation.
* Portions created by the Initial Developer are Copyright (C) 1998
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
*
*
* Alternatively, the contents of this file may be used under the terms of
* either the GNU General Public License Version 2 or later (the "GPL"), or
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
* in which case the provisions of the GPL or the LGPL are applicable instead
* of those above. If you wish to allow use of your version of this file only
* under the terms of either the GPL or the LGPL, and not to allow others to
* use your version of this file under the terms of the NPL, indicate your
* decision by deleting the provisions above and replace them with the notice
* and other provisions required by the GPL or the LGPL. If you do not delete
* the provisions above, a recipient may use your version of this file under
* the terms of any one of the NPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
#ifndef nsIUnicodeEncodeHelper_h___
#define nsIUnicodeEncodeHelper_h___
#include "nscore.h"
#include "uconvutil.h"
#include "nsISupports.h"
#include "nsIMappingCache.h"
// Interface ID for our Unicode Encode Helper interface
// {D8E6B700-CA9D-11d2-8AA9-00600811A836}
#define NS_IUNICODEENCODEHELPER_IID \
{ 0xd8e6b700, 0xca9d, 0x11d2, {0x8a, 0xa9, 0x0, 0x60, 0x8, 0x11, 0xa8, 0x36}}
// Class ID for our UnicodeEncoderHelper implementation
// {1767FC50-CAA4-11d2-8AA9-00600811A836}
#define NS_UNICODEENCODEHELPER_CID \
{ 0x1767fc50, 0xcaa4, 0x11d2, {0x8a, 0xa9, 0x0, 0x60, 0x8, 0x11, 0xa8, 0x36}}
#define NS_UNICODEENCODEHELPER_CONTRACTID "@mozilla.org/intl/unicode/encodehelper;1"
#define NS_ERROR_UENC_NOHELPER \
NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_UCONV, 0x31)
//----------------------------------------------------------------------
// Class nsIUnicodeEncodeHelper [declaration]
/**
* Interface for a Unicode Encode Helper object.
*
* @created 22/Feb/1999
* @author Catalin Rotaru [CATA]
*/
class nsIUnicodeEncodeHelper : public nsISupports
{
public:
NS_DEFINE_STATIC_IID_ACCESSOR(NS_IUNICODEENCODEHELPER_IID)
/**
* Converts data using a lookup table.
*/
NS_IMETHOD ConvertByTable(const PRUnichar * aSrc, PRInt32 * aSrcLength,
char * aDest, PRInt32 * aDestLength, uShiftTable * aShiftTable,
uMappingTable * aMappingTable) = 0;
/**
* Converts data using a set of lookup tables.
*/
NS_IMETHOD ConvertByMultiTable(const PRUnichar * aSrc, PRInt32 * aSrcLength,
char * aDest, PRInt32 * aDestLength, PRInt32 aTableCount,
uShiftTable ** aShiftTable, uMappingTable ** aMappingTable) = 0;
/**
* Create a Mapping Cache
*/
NS_IMETHOD CreateCache(nsMappingCacheType aType, nsIMappingCache* aResult) = 0;
/**
* Destroy a Mapping Cache
*/
NS_IMETHOD DestroyCache(nsIMappingCache aCache) = 0;
/**
* Create Char Representable Info
*/
NS_IMETHOD FillInfo(PRUint32* aInfo, uMappingTable * aMappingTable) = 0;
NS_IMETHOD FillInfo(PRUint32* aInfo, PRInt32 aTableCount, uMappingTable ** aMappingTable) = 0;
};
#endif /* nsIUnicodeEncodeHelper_h___ */

View File

@@ -0,0 +1,222 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* ***** BEGIN LICENSE BLOCK *****
* Version: NPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Netscape Public License
* Version 1.1 (the "License"); you may not use this file except in
* compliance with the License. You may obtain a copy of the License at
* http://www.mozilla.org/NPL/
*
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the
* License.
*
* The Original Code is Mozilla Communicator client code.
*
* The Initial Developer of the Original Code is
* Netscape Communications Corporation.
* Portions created by the Initial Developer are Copyright (C) 1998
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
*
*
* Alternatively, the contents of this file may be used under the terms of
* either the GNU General Public License Version 2 or later (the "GPL"), or
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
* in which case the provisions of the GPL or the LGPL are applicable instead
* of those above. If you wish to allow use of your version of this file only
* under the terms of either the GPL or the LGPL, and not to allow others to
* use your version of this file under the terms of the NPL, indicate your
* decision by deleting the provisions above and replace them with the notice
* and other provisions required by the GPL or the LGPL. If you do not delete
* the provisions above, a recipient may use your version of this file under
* the terms of any one of the NPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
#ifndef nsIUnicodeEncoder_h___
#define nsIUnicodeEncoder_h___
#include "nscore.h"
#include "nsError.h"
#include "nsISupports.h"
// Interface ID for our Unicode Encoder interface
// {2B2CA3D0-A4C9-11d2-8AA1-00600811A836}
#define NS_IUNICODEENCODER_IID \
{ 0x2b2ca3d0, 0xa4c9, 0x11d2, \
{ 0x8a, 0xa1, 0x0, 0x60, 0x8, 0x11, 0xa8, 0x36 }}
static NS_DEFINE_IID(kIUnicodeEncoderIID, NS_IUNICODEENCODER_IID);
// Interface ID for our Unicode Character Encoder interface
// {299BCCD0-C6DF-11d2-8AA8-00600811A836}
#define NS_IUNICHARENCODER_IID \
{ 0x299bccd0, 0xc6df, 0x11d2, \
{0x8a, 0xa8, 0x0, 0x60, 0x8, 0x11, 0xa8, 0x36 }}
static NS_DEFINE_IID(kIUnicharEncoderIID, NS_IUNICHARENCODER_IID);
#define NS_OK_UENC_EXACTLENGTH \
NS_ERROR_GENERATE_SUCCESS(NS_ERROR_MODULE_UCONV, 0x21)
#define NS_OK_UENC_MOREOUTPUT \
NS_ERROR_GENERATE_SUCCESS(NS_ERROR_MODULE_UCONV, 0x22)
#define NS_ERROR_UENC_NOMAPPING \
NS_ERROR_GENERATE_SUCCESS(NS_ERROR_MODULE_UCONV, 0x23)
#define NS_OK_UENC_MOREINPUT \
NS_ERROR_GENERATE_SUCCESS(NS_ERROR_MODULE_UCONV, 0x24)
#define NS_UNICODEENCODER_CONTRACTID_BASE "@mozilla.org/intl/unicode/encoder;1?charset="
/**
* Interface which converts a single character from Unicode into a given
* charset.
*
* @created 17/Feb/1999
* @author Catalin Rotaru [CATA]
*/
class nsIUnicharEncoder : public nsISupports
{
public:
NS_DEFINE_STATIC_IID_ACCESSOR(NS_IUNICHARENCODER_IID)
/**
* Converts a character from Unicode to a Charset.
*/
NS_IMETHOD Convert(PRUnichar aChar, char * aDest, PRInt32 * aDestLength) = 0;
};
//
// Malloc an Encoder (unicode -> charset) buffer if the
// result won't fit in the static buffer
//
// p = the buffer pointer (char*)
// e = encoder (nsIUnicodeEncoder*)
// s = string (PRUnichar*)
// l = string length (PRInt32)
// sb = static buffer (char[])
// sbl = static buffer length (PRUint32)
// al = actual buffer length (PRInt32)
//
#define ENCODER_BUFFER_ALLOC_IF_NEEDED(p,e,s,l,sb,sbl,al) \
PR_BEGIN_MACRO \
if (e \
&& NS_SUCCEEDED((e)->GetMaxLength((s), (l), &(al)))\
&& ((al) > (PRInt32)(sbl)) \
&& (nsnull!=((p)=(char*)nsMemory::Alloc((al)+1))) \
) { \
} \
else { \
(p) = (char*)(sb); \
(al) = (sbl); \
} \
PR_END_MACRO
//
// Free the Encoder buffer if it was allocated
//
#define ENCODER_BUFFER_FREE_IF_NEEDED(p,sb) \
PR_BEGIN_MACRO \
if ((p) != (char*)(sb)) \
nsMemory::Free(p); \
PR_END_MACRO
/**
* Interface for a Converter from Unicode into a Charset.
*
* @created 23/Nov/1998
* @author Catalin Rotaru [CATA]
*/
class nsIUnicodeEncoder : public nsISupports
{
public:
NS_DEFINE_STATIC_IID_ACCESSOR(NS_IUNICODEENCODER_IID)
enum {
kOnError_Signal, // on an error, stop and signal
kOnError_CallBack, // on an error, call the error handler
kOnError_Replace // on an error, replace with a different character
};
/**
* Converts the data from Unicode to a Charset.
*
* About the byte ordering:
* - The input stream is Unicode, having the byte order which is internal
* for the machine on which the converter is running on.
* - For output, if the converter cares (that depends of the charset, for
* example a singlebyte will ignore the byte ordering) it should assume
* network order. If necessary and requested, we can add a method
* SetOutputByteOrder() so that the reverse order can be used, too. That
* method would have as default the assumed network order.
*
* Unless there is not enough output space, this method must consume all the
* available input data! We don't have partial input for the Unicode charset.
* And for the last converted char, even if there is not enought output
* space, a partial ouput must be done until all available space will be
* used. The rest of the output should be buffered until more space becomes
* available. But this is not also true about the error handling method!!!
* So be very, very careful...
*
* @param aSrc [IN] the source data buffer
* @param aSrcLength [IN/OUT] the length of source data buffer; after
* conversion will contain the number of Unicode
* characters read
* @param aDest [OUT] the destination data buffer
* @param aDestLength [IN/OUT] the length of the destination data buffer;
* after conversion will contain the number of bytes
* written
* @return NS_OK_UENC_MOREOUTPUT if only a partial conversion
* was done; more output space is needed to continue
* NS_ERROR_UENC_NOMAPPING if character without mapping
* was encountered and the behavior was set to "signal".
*/
NS_IMETHOD Convert(const PRUnichar * aSrc, PRInt32 * aSrcLength,
char * aDest, PRInt32 * aDestLength) = 0;
/**
* Finishes the conversion. The converter has the possibility to write some
* extra data and flush its final state.
*
* @param aDest [OUT] the destination data buffer
* @param aDestLength [IN/OUT] the length of destination data buffer; after
* conversion it will contain the number of bytes written
* @return NS_OK_UENC_MOREOUTPUT if only a partial conversion
* was done; more output space is needed to continue
*/
NS_IMETHOD Finish(char * aDest, PRInt32 * aDestLength) = 0;
/**
* Returns a quick estimation of the size of the buffer needed to hold the
* converted data. Remember: this estimation is >= with the actual size of
* the buffer needed. It will be computed for the "worst case"
*
* @param aSrc [IN] the source data buffer
* @param aSrcLength [IN] the length of source data buffer
* @param aDestLength [OUT] the needed size of the destination buffer
* @return NS_OK_UENC_EXACTLENGTH if an exact length was computed
* NS_OK if all we have is an approximation
*/
NS_IMETHOD GetMaxLength(const PRUnichar * aSrc, PRInt32 aSrcLength,
PRInt32 * aDestLength) = 0;
/**
* Resets the charset converter so it may be recycled for a completely
* different and urelated buffer of data.
*/
NS_IMETHOD Reset() = 0;
/**
* Specify what to do when a character cannot be mapped into the dest charset
*
* @param aOrder [IN] the behavior; taken from the enum
*/
NS_IMETHOD SetOutputErrorBehavior(PRInt32 aBehavior,
nsIUnicharEncoder * aEncoder, PRUnichar aChar) = 0;
};
#endif /* nsIUnicodeEncoder_h___ */

View File

@@ -0,0 +1,120 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* ***** BEGIN LICENSE BLOCK *****
* Version: NPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Netscape Public License
* Version 1.1 (the "License"); you may not use this file except in
* compliance with the License. You may obtain a copy of the License at
* http://www.mozilla.org/NPL/
*
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the
* License.
*
* The Original Code is Mozilla Communicator client code.
*
* The Initial Developer of the Original Code is
* Netscape Communications Corporation.
* Portions created by the Initial Developer are Copyright (C) 1998
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
* jeroen.dobbelaere@acunia.com
*
*
* Alternatively, the contents of this file may be used under the terms of
* either the GNU General Public License Version 2 or later (the "GPL"), or
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
* in which case the provisions of the GPL or the LGPL are applicable instead
* of those above. If you wish to allow use of your version of this file only
* under the terms of either the GPL or the LGPL, and not to allow others to
* use your version of this file under the terms of the NPL, indicate your
* decision by deleting the provisions above and replace them with the notice
* and other provisions required by the GPL or the LGPL. If you do not delete
* the provisions above, a recipient may use your version of this file under
* the terms of any one of the NPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
#ifndef __UCONV_TIL_H__
#define __UCONV_TIL_H__
#include "prcpucfg.h"
/*=====================================*/
#define PACK(h,l) (int16)(( (h) << 8) | (l))
#if defined(IS_LITTLE_ENDIAN)
#define ShiftCell(sub,len,min,max,minh,minl,maxh,maxl) \
PACK(len,sub), PACK(max,min), PACK(minl,minh), PACK(maxl,maxh)
#else
#define ShiftCell(sub,len,min,max,minh,minl,maxh,maxl) \
PACK(sub,len), PACK(min, max), PACK(minh,minl), PACK(maxh,maxl)
#endif
typedef enum {
u1ByteCharset = 0,
u2BytesCharset,
uMultibytesCharset,
u2BytesGRCharset,
u2BytesGRPrefix8FCharset,
u2BytesGRPrefix8EA2Charset,
u2BytesSwapCharset,
u4BytesCharset,
u4BytesSwapCharset,
u2BytesGRPrefix8EA3Charset,
u2BytesGRPrefix8EA4Charset,
u2BytesGRPrefix8EA5Charset,
u2BytesGRPrefix8EA6Charset,
u2BytesGRPrefix8EA7Charset,
u1ByteGLCharset,
uDecomposedHangulCharset,
uDecomposedHangulGLCharset,
uJohabHangulCharset,
uJohabSymbolCharset,
u4BytesGB18030Charset,
u2BytesGR128Charset,
uNumOfCharsetType
} uScanClassID;
typedef enum {
u1ByteChar = 0,
u2BytesChar,
u2BytesGRChar,
u1BytePrefix8EChar, /* Used by JIS0201 GR in EUC_JP */
u2BytesUTF8, /* Used by UTF8 */
u3BytesUTF8, /* Used by UTF8 */
uNumOfCharType
} uScanSubClassID;
typedef struct {
unsigned char classID;
unsigned char reserveLen;
unsigned char shiftin_Min;
unsigned char shiftin_Max;
unsigned char shiftout_MinHB;
unsigned char shiftout_MinLB;
unsigned char shiftout_MaxHB;
unsigned char shiftout_MaxLB;
} uShiftCell;
typedef struct {
PRInt16 numOfItem;
PRInt16 classID;
uShiftCell shiftcell[1];
} uShiftTable;
/*=====================================*/
typedef struct {
unsigned char min;
unsigned char max;
} uRange;
/*=====================================*/
typedef PRUint16* uMappingTable;
#endif

View File

@@ -0,0 +1,72 @@
/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
*
* The contents of this file are subject to the Netscape Public
* License Version 1.1 (the "License"); you may not use this file
* except in compliance with the License. You may obtain a copy of
* the License at http://www.mozilla.org/NPL/
*
* Software distributed under the License is distributed on an "AS
* IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
* implied. See the License for the specific language governing
* rights and limitations under the License.
*
* The Original Code is mozilla.org code.
*
* The Initial Developer of the Original Code is Netscape
* Communications Corporation. Portions created by Netscape are
* Copyright (C) 1998 Netscape Communications Corporation. All
* Rights Reserved.
*
* Contributor(s):
*/
/*========================================================
This is a Generated file. Please don't edit it.
The tool which used to generate this file is called fromu.
If you have any problem of this file. Please contact
Netscape Client International Team or
ftang@netscape <Frank Tang>
Table in Debug form
Begin of Item 0000
Format 0
srcBegin = 0000
srcEnd = 007E
destBegin = 0000
End of Item 0000
Begin of Item 0001
Format 0
srcBegin = 00A0
srcEnd = 00FF
destBegin = 00A0
End of Item 0001
========================================================*/
/* Offset=0x0000 ItemOfList */
0x0002,
/*-------------------------------------------------------*/
/* Offset=0x0001 offsetToFormatArray */
0x0004,
/*-------------------------------------------------------*/
/* Offset=0x0002 offsetToMapCellArray */
0x0005,
/*-------------------------------------------------------*/
/* Offset=0x0003 offsetToMappingTable */
0x000B,
/*-------------------------------------------------------*/
/* Offset=0x0004 Start of Format Array */
/* Total of Format 0 : 0x0002 */
/* Total of Format 1 : 0x0000 */
/* Total of Format 2 : 0x0000 */
/* Total of Format 3 : 0x0000 */
0x0000,
/*-------------------------------------------------------*/
/* Offset=0x0005 Start of MapCell Array */
/* 0000 */ 0x0000, 0x007E, 0x0000,
/* 0001 */ 0x00A0, 0x00FF, 0x00A0,
/*-------------------------------------------------------*/
/* Offset=0x000B Start of MappingTable */
/* End of table Total Length = 0x000B * 2 */

View File

@@ -0,0 +1,88 @@
/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* ***** BEGIN LICENSE BLOCK *****
* Version: NPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Netscape Public License
* Version 1.1 (the "License"); you may not use this file except in
* compliance with the License. You may obtain a copy of the License at
* http://www.mozilla.org/NPL/
*
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the
* License.
*
* The Original Code is mozilla.org code.
*
* The Initial Developer of the Original Code is
* Netscape Communications Corporation.
* Portions created by the Initial Developer are Copyright (C) 1998
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
*
*
* Alternatively, the contents of this file may be used under the terms of
* either the GNU General Public License Version 2 or later (the "GPL"), or
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
* in which case the provisions of the GPL or the LGPL are applicable instead
* of those above. If you wish to allow use of your version of this file only
* under the terms of either the GPL or the LGPL, and not to allow others to
* use your version of this file under the terms of the NPL, indicate your
* decision by deleting the provisions above and replace them with the notice
* and other provisions required by the GPL or the LGPL. If you do not delete
* the provisions above, a recipient may use your version of this file under
* the terms of any one of the NPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
/*========================================================
This is a Generated file. Please don't edit it.
The tool which used to generate this file is called fromu.
If you have any problem of this file. Please contact
Netscape Client International Team or
ftang@netscape <Frank Tang>
Table in Debug form
Begin of Item 0000
Format 0
srcBegin = 0000
srcEnd = 007E
destBegin = 0000
End of Item 0000
Begin of Item 0001
Format 0
srcBegin = 00A0
srcEnd = 00FF
destBegin = 00A0
End of Item 0001
========================================================*/
/* Offset=0x0000 ItemOfList */
0x0002,
/*-------------------------------------------------------*/
/* Offset=0x0001 offsetToFormatArray */
0x0004,
/*-------------------------------------------------------*/
/* Offset=0x0002 offsetToMapCellArray */
0x0005,
/*-------------------------------------------------------*/
/* Offset=0x0003 offsetToMappingTable */
0x000B,
/*-------------------------------------------------------*/
/* Offset=0x0004 Start of Format Array */
/* Total of Format 0 : 0x0002 */
/* Total of Format 1 : 0x0000 */
/* Total of Format 2 : 0x0000 */
/* Total of Format 3 : 0x0000 */
0x0000,
/*-------------------------------------------------------*/
/* Offset=0x0005 Start of MapCell Array */
/* 0000 */ 0x0000, 0x007E, 0x0000,
/* 0001 */ 0x00A0, 0x00FF, 0x00A0,
/*-------------------------------------------------------*/
/* Offset=0x000B Start of MappingTable */
/* End of table Total Length = 0x000B * 2 */

View File

@@ -0,0 +1,166 @@
#
# The contents of this file are subject to the Netscape Public
# License Version 1.1 (the "License"); you may not use this file
# except in compliance with the License. You may obtain a copy of
# the License at http://www.mozilla.org/NPL/
#
# Software distributed under the License is distributed on an "AS
# IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
# implied. See the License for the specific language governing
# rights and limitations under the License.
#
# The Original Code is mozilla.org code.
#
# The Initial Developer of the Original Code is Netscape
# Communications Corporation. Portions created by Netscape are
# Copyright (C) 1998 Netscape Communications Corporation. All
# Rights Reserved.
#
# Contributor(s):
#
DEPTH = ../../..
topsrcdir = @top_srcdir@
srcdir = @srcdir@
VPATH = @srcdir@
include $(DEPTH)/config/autoconf.mk
MODULE = uconv
LIBRARY_NAME = uconv
EXPORT_LIBRARY = 1
IS_COMPONENT = 1
MODULE_NAME = nsUConvModule
ifneq ($(OS_ARCH),WINNT)
# To avoid conflict with OS/2 system uconv.dll
SHORT_LIBNAME = mozuconv
endif
REQUIRES = xpcom \
string \
intl \
locale \
unicharutil \
chardet \
$(NULL)
CSRCS = \
ugen.c \
uscan.c \
umap.c \
$(NULL)
CPPSRCS = \
nsCharsetConverterManager.cpp \
nsTextToSubURI.cpp \
nsUnicodeDecodeHelper.cpp \
nsUnicodeEncodeHelper.cpp \
nsCharsetAliasImp.cpp \
nsURLProperties.cpp \
nsMappingCache.cpp \
nsUConvModule.cpp \
nsISO88591ToUnicode.cpp \
nsCP1252ToUnicode.cpp \
nsMacRomanToUnicode.cpp \
nsUTF8ToUnicode.cpp \
nsUnicodeToISO88591.cpp \
nsUnicodeToCP1252.cpp \
nsUnicodeToMacRoman.cpp \
nsUnicodeToUTF8.cpp \
nsScriptableUConv.cpp \
nsConverterInputStream.cpp \
$(NULL)
EXPORT_RESOURCE = \
charsetalias.properties \
charsetData.properties \
$(NULL)
ifeq ($(MOZ_WIDGET_TOOLKIT),os2)
CPPSRCS += nsOS2Charset.cpp
EXPORT_RESOURCE += os2charset.properties
else
ifeq ($(MOZ_WIDGET_TOOLKIT),windows)
CPPSRCS += nsWinCharset.cpp
EXPORT_RESOURCE += wincharset.properties
else
ifneq (,$(filter cocoa mac, $(MOZ_WIDGET_TOOLKIT)))
CPPSRCS += nsMacCharset.cpp
EXPORT_RESOURCE += maccharset.properties
else
CPPSRCS += nsUNIXCharset.cpp
EXPORT_RESOURCE += unixcharset.properties
# add platform charset remapping properties files here if necessary
# (see unixcharset.sample.properties for an example file)
# eg: if we needed a charset remap for OSARCH=Linux then add the following line:
#EXPORT_RESOURCE += unixcharset.Linux.properties
endif
endif
endif
EXTRA_DSO_LDOPTS = $(MOZ_NECKO_UTIL_LIBS) \
$(MOZ_COMPONENT_LIBS) \
$(MOZ_UNICHARUTIL_LIBS) \
$(NULL)
ifeq ($(MOZ_WIDGET_TOOLKIT),os2)
ifeq ($(MOZ_OS2_TOOLS),VACPP)
OS_LIBS += libuls.lib
else
OS_LIBS += -llibuni
endif
endif
ifneq (,$(filter cocoa mac, $(MOZ_WIDGET_TOOLKIT)))
EXTRA_DSO_LDOPTS += $(TK_LIBS)
endif
LOCAL_INCLUDES = -I$(srcdir)/../util \
-I$(srcdir)/../ucvlatin \
-I$(srcdir)/../ucvibm \
-I$(srcdir)/../ucvja \
-I$(srcdir)/../ucvtw2 \
-I$(srcdir)/../ucvtw \
-I$(srcdir)/../ucvko \
-I$(srcdir)/../ucvcn \
$(NULL)
SHARED_LIBRARY_LIBS = \
$(DIST)/lib/$(LIB_PREFIX)ucvutil_s.$(LIB_SUFFIX) \
$(DIST)/lib/$(LIB_PREFIX)ucvlatin_s.$(LIB_SUFFIX) \
$(DIST)/lib/$(LIB_PREFIX)ucvibm_s.$(LIB_SUFFIX) \
$(DIST)/lib/$(LIB_PREFIX)ucvutil_s.$(LIB_SUFFIX) \
$(DIST)/lib/$(LIB_PREFIX)ucvja_s.$(LIB_SUFFIX) \
$(DIST)/lib/$(LIB_PREFIX)ucvtw2_s.$(LIB_SUFFIX) \
$(DIST)/lib/$(LIB_PREFIX)ucvtw_s.$(LIB_SUFFIX) \
$(DIST)/lib/$(LIB_PREFIX)ucvko_s.$(LIB_SUFFIX) \
$(DIST)/lib/$(LIB_PREFIX)ucvcn_s.$(LIB_SUFFIX) \
$(NULL)
include $(topsrcdir)/config/rules.mk
CFLAGS += -DUSE_NSREG -D_IMPL_NS_INTL
# Reserved name __STDC__ cannot be defined as a macro name on AIX or OpenVMS.
# QNX simply objects to the way it's being redefined.
ifeq (,$(filter AIX OpenVMS QNX HP-UX,$(OS_ARCH)))
CFLAGS += -D__STDC__
endif
# CODESET is not automatically defined on some older versions of Redhat.
# Define _XOPEN_SOURCE so CODESET will get defined and thus allow
# nl_langinfo(CODESET) to compile on these systems.
ifeq ($(OS_ARCH), Linux)
DEFINES += -D_XOPEN_SOURCE=500
endif
ifeq ($(OS_ARCH),WINNT)
DEFINES += -DWIN32_LEAN_AND_MEAN
endif
libs:: $(EXPORT_RESOURCE)
$(INSTALL) $^ $(DIST)/bin/res
install:: $(EXPORT_RESOURCE)
$(SYSINSTALL) $(IFLAGS1) $^ $(DESTDIR)$(mozappdir)/res

View File

@@ -0,0 +1,149 @@
##
## The contents of this file are subject to the Netscape Public
## License Version 1.1 (the "License"); you may not use this file
## except in compliance with the License. You may obtain a copy of
## the License at http://www.mozilla.org/NPL/
##
## Software distributed under the License is distributed on an "AS
## IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
## implied. See the License for the specific language governing
## rights and limitations under the License.
##
## The Original Code is mozilla.org code.
##
## The Initial Developer of the Original Code is Netscape
## Communications Corporation. Portions created by Netscape are
## Copyright (C) 1999 Netscape Communications Corporation. All
## Rights Reserved.
##
## Contributor(s):
## Rule of this file:
## 1. key should always be in lower case ascii so we can do case insensitive
## comparison in the code faster.
## Format of this file:
##
## charset_name.notForBrowser = anything - specifies that this charset is
## not to be used in the browser
##
## charset_name.LangGroup =
##
## charset_name.MIMEHeaderEncodingMethod =
##
## charset_name.MIMEMailCharset =
##
## charset_name.isMultibyte = multi byte charsets
t.61-8bit.notForBrowser = true
utf-32le.notForBrowser = true
utf-32be.notForBrowser = true
utf-16le.notForBrowser = true
utf-16be.notForBrowser = true
x-imap4-modified-utf7.notForBrowser = true
x-u-escaped.notForBrowser = true
windows-936.notForBrowser = true
us-ascii.notForBrowser = true
x-obsoleted-euc-jp.notForBrowser = true
x-obsoleted-iso-2022-jp.notForBrowser = true
x-obsoleted-shift_jis.notForBrowser = true
iso-8859-6-e.notForBrowser = true
iso-8859-6-i.notForBrowser = true
ibm864i.notForBrowser = true
iso-8859-8-e.notForBrowser = true
adobe-symbol-encoding.LangGroup = el
big5.LangGroup = zh-TW
big5-hkscs.LangGroup = zh-TW
euc-jp.LangGroup = ja
euc-kr.LangGroup = ko
gb2312.LangGroup = zh-CN
gb18030.LangGroup = zh-CN
gb18030.2000-0.LangGroup = zh-CN
gb18030.2000-1.LangGroup = zh-CN
hkscs-1.LangGroup = zh-TW
hz-gb-2312.LangGroup = zh-CN
ibm850.LangGroup = x-western
ibm852.LangGroup = x-central-euro
ibm855.LangGroup = x-cyrillic
ibm857.LangGroup = tr
ibm862.LangGroup = he
ibm864.LangGroup = ar
ibm866.LangGroup = x-cyrillic
iso-2022-cn.LangGroup = zh-CN
iso-2022-jp.LangGroup = ja
iso-2022-kr.LangGroup = ko
iso-8859-1.LangGroup = x-western
iso-8859-15.LangGroup = x-western
iso-8859-2.LangGroup = x-central-euro
iso-8859-4.LangGroup = x-baltic
iso-8859-13.LangGroup = x-baltic
iso-8859-5.LangGroup = x-cyrillic
iso-8859-6.LangGroup = ar
iso-8859-6-e.LangGroup = ar
iso-8859-6-i.LangGroup = ar
iso-8859-7.LangGroup = el
iso-8859-8.LangGroup = he
iso-8859-8-e.LangGroup = he
iso-8859-8-i.LangGroup = he
iso-8859-9.LangGroup = tr
jis_0208-1983.LangGroup = ja
koi8-r.LangGroup = x-cyrillic
koi8-u.LangGroup = x-cyrillic
shift_jis.LangGroup = ja
tis-620.LangGroup = th
tis620-2.LangGroup = th
us-ascii.LangGroup = x-western
utf-16be.LangGroup = x-unicode
utf-16le.LangGroup = x-unicode
utf-32be.LangGroup = x-unicode
utf-32le.LangGroup = x-unicode
utf-7.LangGroup = x-unicode
utf-8.LangGroup = x-unicode
windows-1250.LangGroup = x-central-euro
windows-1251.LangGroup = x-cyrillic
windows-1252.LangGroup = x-western
windows-1253.LangGroup = el
windows-1254.LangGroup = tr
windows-1255.LangGroup = he
windows-1256.LangGroup = ar
windows-1257.LangGroup = x-baltic
windows-936.LangGroup = zh-CN
x-cns-11643-1.LangGroup = zh-TW
x-euc-tw.LangGroup = zh-TW
x-gbk.LangGroup = zh-CN
x-gbk-noascii.LangGroup = zh-CN
x-mac-ce.LangGroup = x-central-euro
x-mac-cyrillic.LangGroup = x-cyrillic
x-mac-greek.LangGroup = el
x-mac-icelandic.LangGroup = x-western
x-mac-roman.LangGroup = x-western
x-mac-turkish.LangGroup = tr
x-mac-ukrainian.LangGroup = x-cyrillic
x-user-defined.LangGroup = x-user-def
x-x11johab.LangGroup = ko
x-johab.LangGroup = ko
x-johab-noascii.LangGroup = ko
x-windows-949.LangGroup = ko
x-mac-hebrew.LangGroup = he
x-mac-arabic.LangGroup = ar
utf-8.MIMEHeaderEncodingMethod = B
utf-8.MIMEMailCharset = utf-8
iso-2022-jp.isMultibyte = true
shift_jis.isMultibyte = true
euc-jp.isMultibyte = true
big5.isMultibyte = true
big5-hkscs.isMultibyte = true
x-euc-tw.isMultibyte = true
gb2312.isMultibyte = true
hz-gb-2312.isMultibyte = true
iso-2022-kr.isMultibyte = true
euc-kr.isMultibyte = true
x-johab.isMultibyte = true
x-windows-949.isMultibyte = true
utf-7.isMultibyte = true
utf-8.isMultibyte = true

View File

@@ -0,0 +1,118 @@
##
## The contents of this file are subject to the Netscape Public
## License Version 1.1 (the "License"); you may not use this file
## except in compliance with the License. You may obtain a copy of
## the License at http://www.mozilla.org/NPL/
##
## Software distributed under the License is distributed on an "AS
## IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
## implied. See the License for the specific language governing
## rights and limitations under the License.
##
## The Original Code is mozilla.org code.
##
## The Initial Developer of the Original Code is Netscape
## Communications Corporation. Portions created by Netscape are
## Copyright (C) 1999 Netscape Communications Corporation. All
## Rights Reserved.
##
## Contributor(s):
## Rule of this file:
## 1. key should always be in lower case ascii so we can do case insensitive
## comparison in the code faster.
## Format of this file:
## charset_name.title = a_title - specifies the human readable title for
## this charset
us-ascii.title = English (US-ASCII)
iso-8859-1.title = Western (ISO-8859-1)
iso-8859-2.title = Central European (ISO-8859-2)
iso-8859-3.title = South European (ISO-8859-3)
iso-8859-4.title = Baltic (ISO-8859-4)
iso-8859-9.title = Turkish (ISO-8859-9)
iso-8859-10.title = Nordic (ISO-8859-10)
iso-8859-13.title = Baltic (ISO-8859-13)
iso-8859-14.title = Celtic (ISO-8859-14)
iso-8859-15.title = Western (ISO-8859-15)
iso-8859-16.title = Romanian (ISO-8859-16)
windows-1250.title = Central European (Windows-1250)
windows-1252.title = Western (Windows-1252)
windows-1254.title = Turkish (Windows-1254)
windows-1257.title = Baltic (Windows-1257)
x-mac-roman.title = Western (MacRoman)
x-mac-ce.title = Central European (MacCE)
x-mac-turkish.title = Turkish (MacTurkish)
x-mac-croatian.title = Croatian (MacCroatian)
x-mac-romanian.title = Romanian (MacRomanian)
x-mac-icelandic.title = Icelandic (MacIcelandic)
iso-2022-jp.title = Japanese (ISO-2022-JP)
shift_jis.title = Japanese (Shift_JIS)
euc-jp.title = Japanese (EUC-JP)
big5.title = Chinese Traditional (Big5)
big5-hkscs.title = Chinese Traditional (Big5-HKSCS)
x-euc-tw.title = Chinese Traditional (EUC-TW)
gb2312.title = Chinese Simplified (GB2312)
hz-gb-2312.title = Chinese Simplified (HZ)
x-gbk.title = Chinese Simplified (GBK)
iso-2022-cn.title = Chinese Simplified (ISO-2022-CN)
euc-kr.title = Korean (EUC-KR)
x-johab.title = Korean (JOHAB)
x-windows-949.title = Korean (UHC)
iso-2022-kr.title = Korean (ISO-2022-KR)
utf-7.title = Unicode (UTF-7)
utf-8.title = Unicode (UTF-8)
iso-8859-5.title = Cyrillic (ISO-8859-5)
iso-ir-111.title = Cyrillic (ISO-IR-111)
windows-1251.title = Cyrillic (Windows-1251)
x-mac-cyrillic.title = Cyrillic (MacCyrillic)
x-mac-ukrainian.title = Cyrillic/Ukrainian (MacUkrainian)
koi8-r.title = Cyrillic (KOI8-R)
koi8-u.title = Cyrillic/Ukrainian (KOI8-U)
iso-8859-7.title = Greek (ISO-8859-7)
windows-1253.title = Greek (Windows-1253)
x-mac-greek.title = Greek (MacGreek)
windows-1258.title = Vietnamese (Windows-1258)
x-viet-tcvn5712.title = Vietnamese (TCVN)
viscii.title = Vietnamese (VISCII)
x-viet-vps.title = Vietnamese (VPS)
geostd8.title = Georgian (GEOSTD8)
tis-620.title = Thai (TIS-620)
armscii-8.title = Armenian (ARMSCII-8)
iso-8859-6.title = Arabic (ISO-8859-6)
iso-8859-6-i.title = Arabic (ISO-8859-6-I)
iso-8859-6-e.title = Arabic (ISO-8859-6-E)
iso-8859-8.title = Hebrew Visual (ISO-8859-8)
iso-8859-8-i.title = Hebrew (ISO-8859-8-I)
iso-8859-8-e.title = Hebrew (ISO-8859-8-E)
windows-1255.title = Hebrew (Windows-1255)
windows-1256.title = Arabic (Windows-1256)
x-user-defined.title = User Defined
ibm866.title = Cyrillic/Russian (CP-866)
ibm850.title = Western (IBM-850)
ibm852.title = Central European (IBM-852)
ibm855.title = Cyrillic (IBM-855)
ibm857.title = Turkish (IBM-857)
ibm862.title = Hebrew (IBM-862)
ibm864.title = Arabic (IBM-864)
ibm864i.title = Arabic (IBM-864-I)
gb18030.title = Chinese Simplified (GB18030)
x-mac-arabic.title = Arabic (MacArabic)
x-mac-farsi.title = Farsi (MacFarsi)
x-mac-hebrew.title = Hebrew (MacHebrew)
x-mac-devanagari.title = Hindi (MacDevanagari)
x-mac-gujarati.title = Gujarati (MacGujarati)
x-mac-gurmukhi.title = Gurmukhi (MacGurmukhi)
chardet.off.title = (Off)
chardet.alis_charset_detector.title = All
chardet.universal_charset_detector.title = Universal
chardet.ja_parallel_state_machine.title = Japanese
chardet.ko_parallel_state_machine.title = Korean
chardet.zhtw_parallel_state_machine.title = Traditional Chinese
chardet.zhcn_parallel_state_machine.title = Simplified Chinese
chardet.zh_parallel_state_machine.title = Chinese
chardet.cjk_parallel_state_machine.title = East Asian
chardet.ruprob.title = Russian
chardet.ukprob.title = Ukrainian

View File

@@ -0,0 +1,493 @@
##
## The contents of this file are subject to the Netscape Public
## License Version 1.1 (the "License"); you may not use this file
## except in compliance with the License. You may obtain a copy of
## the License at http://www.mozilla.org/NPL/
##
## Software distributed under the License is distributed on an "AS
## IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
## implied. See the License for the specific language governing
## rights and limitations under the License.
##
## The Original Code is mozilla.org code.
##
## The Initial Developer of the Original Code is Netscape
## Communications Corporation. Portions created by Netscape are
## Copyright (C) 1999 Netscape Communications Corporation. All
## Rights Reserved.
##
## Contributor(s):
## IBM Corporation
##
## This Original Code has been modified by IBM Corporation.
## Modifications made by IBM described herein are
## Copyright (c) International Business Machines
## Corporation, 1999
##
## Modifications to Mozilla code or documentation
## identified per MPL Section 3.3
##
## Date Modified by Description of modification
## 12/09/1999 IBM Corp. Support for IBM codepages - 850,852,855,857,862,864
##
## Rule of this file:
## 1. key should always be in lower case ascii so we can do case insensitive
## comparison in the code faster.
## 2. value should be the one used in unicode converter
## 3. If you want to add more charset, mailto:ftang@netscape.com
##
## 4. If the charset is not used for document charset, but font charset
## (e.g. XLFD charset- such as JIS x0201, JIS x0208), don't put here
##
us-ascii=us-ascii
ansi_x3.4-1968=us-ascii
646=us-ascii
iso-8859-1=ISO-8859-1
iso-8859-2=ISO-8859-2
iso-8859-3=ISO-8859-3
iso-8859-4=ISO-8859-4
iso-8859-5=ISO-8859-5
iso-8859-6=ISO-8859-6
iso-8859-6-i=ISO-8859-6-I
iso-8859-6-e=ISO-8859-6-E
iso-8859-7=ISO-8859-7
iso-8859-8=ISO-8859-8
iso-8859-8-i=ISO-8859-8-I
iso-8859-8-e=ISO-8859-8-E
iso-8859-9=ISO-8859-9
iso-8859-10=ISO-8859-10
iso-8859-11=TIS-620
iso-8859-13=ISO-8859-13
iso-8859-14=ISO-8859-14
iso-8859-15=ISO-8859-15
iso-8859-16=ISO-8859-16
iso-ir-111=ISO-IR-111
iso-2022-cn=ISO-2022-CN
iso-2022-kr=ISO-2022-KR
iso-2022-jp=ISO-2022-JP
utf-32be=UTF-32BE
utf-32le=UTF-32LE
utf-32=UTF-32BE
utf-16be=UTF-16BE
utf-16le=UTF-16LE
utf-16=UTF-16BE
windows-1250=windows-1250
windows-1251=windows-1251
windows-1252=windows-1252
windows-1253=windows-1253
windows-1254=windows-1254
windows-1255=windows-1255
windows-1256=windows-1256
windows-1257=windows-1257
windows-1258=windows-1258
ibm866=IBM866
ibm850=IBM850
ibm852=IBM852
ibm855=IBM855
ibm857=IBM857
ibm862=IBM862
ibm864=IBM864
ibm864i=IBM864i
utf-8=UTF-8
utf-7=UTF-7
shift_jis=Shift_JIS
big5=Big5
euc-jp=EUC-JP
euc-kr=EUC-KR
gb2312=GB2312
gb18030=gb18030
viscii=VISCII
koi8-r=KOI8-R
koi8-u=KOI8-U
tis-620=TIS-620
t.61-8bit=T.61-8bit
hz-gb-2312=HZ-GB-2312
big5-hkscs=Big5-HKSCS
gbk=x-gbk
cns11643=x-euc-tw
##
## Netscape private ...
##
x-imap4-modified-utf7=x-imap4-modified-utf7
x-euc-tw=x-euc-tw
x-mac-roman=x-mac-roman
x-mac-ce=x-mac-ce
x-mac-turkish=x-mac-turkish
x-mac-greek=x-mac-greek
x-mac-icelandic=x-mac-icelandic
x-mac-croatian=x-mac-croatian
x-mac-romanian=x-mac-romanian
x-mac-cyrillic=x-mac-cyrillic
x-mac-ukrainian=x-mac-ukrainian
x-mac-hebrew=x-mac-hebrew
x-mac-arabic=x-mac-arabic
geostd8=GEOSTD8
armscii-8=armscii-8
x-viet-tcvn5712=x-viet-tcvn5712
x-viet-vps=x-viet-vps
x-viet-vni=x-viet-vni
iso-10646-ucs-2=UTF-16BE
x-iso-10646-ucs-2-be=UTF-16BE
x-iso-10646-ucs-2-le=UTF-16LE
iso-10646-ucs-4=UTF-32BE
x-iso-10646-ucs-4-be=UTF-32BE
x-iso-10646-ucs-4-le=UTF-32LE
x-user-defined=x-user-defined
x-u-escaped=x-u-escaped
x-johab=x-johab
x-windows-949=x-windows-949
##
## Aliases for ISO-8859-1
##
latin1=ISO-8859-1
iso_8859-1=ISO-8859-1
iso8859-1=ISO-8859-1
iso8859-2=ISO-8859-2
iso8859-3=ISO-8859-3
iso8859-4=ISO-8859-4
iso8859-5=ISO-8859-5
iso8859-6=ISO-8859-6
iso8859-7=ISO-8859-7
iso8859-8=ISO-8859-8
iso8859-9=ISO-8859-9
iso8859-10=ISO-8859-10
iso8859-11=TIS-620
iso8859-13=ISO-8859-13
iso8859-14=ISO-8859-14
iso8859-15=ISO-8859-15
# Currently .properties cannot handle : in key
# iso_8859-1:1987=ISO-8859-1
iso-ir-100=ISO-8859-1
l1=ISO-8859-1
ibm819=ISO-8859-1
cp819=ISO-8859-1
csisolatin1=ISO-8859-1
##
## Aliases for ISO-8859-2
##
latin2=ISO-8859-2
iso_8859-2=ISO-8859-2
# Currently .properties cannot handle : in key
# iso_8859-2:1987=ISO-8859-2
iso-ir-101=ISO-8859-2
l2=ISO-8859-2
csisolatin2=ISO-8859-2
##
## Aliases for ISO-8859-3
##
latin3=ISO-8859-3
iso_8859-3=ISO-8859-3
# Currently .properties cannot handle : in key
#iso_8859-3:1988=ISO-8859-3
iso-ir-109=ISO-8859-3
l3=ISO-8859-3
csisolatin3=ISO-8859-3
##
## Aliases for ISO-8859-4
##
latin4=ISO-8859-4
iso_8859-4=ISO-8859-4
# Currently .properties cannot handle : in key
#iso_8859-4:1988=ISO-8859-4
iso-ir-110=ISO-8859-4
l4=ISO-8859-4
csisolatin4=ISO-8859-4
##
## Aliases for ISO-8859-5
##
cyrillic=ISO-8859-5
iso_8859-5=ISO-8859-5
# Currently .properties cannot handle : in key
#iso_8859-5:1988=ISO-8859-5
iso-ir-144=ISO-8859-5
csisolatincyrillic=ISO-8859-5
##
## Aliases for ISO-8859-6
##
arabic=ISO-8859-6
iso_8859-6=ISO-8859-6
# Currently .properties cannot handle : in key
#iso_8859-6:1987=ISO-8859-6
iso-ir-127=ISO-8859-6
ecma-114=ISO-8859-6
asmo-708=ISO-8859-6
csisolatinarabic=ISO-8859-6
##
## Aliases for ISO-8859-6-I
##
csiso88596i=ISO-8859-6-I
##
## Aliases for ISO-8859-6-E
##
csiso88596e=ISO-8859-6-E
##
## Aliases for ISO-8859-7
##
greek=ISO-8859-7
greek8=ISO-8859-7
sun_eu_greek=ISO-8859-7
iso_8859-7=ISO-8859-7
# Currently .properties cannot handle : in key
#iso_8859-7:1987=ISO-8859-7
iso-ir-126=ISO-8859-7
elot_928=ISO-8859-7
ecma-118=ISO-8859-7
csisolatingreek=ISO-8859-7
##
## Aliases for ISO-8859-8
##
hebrew=ISO-8859-8
iso_8859-8=ISO-8859-8
visual=ISO-8859-8
# Currently .properties cannot handle : in key
#iso_8859-8:1988=ISO-8859-8
iso-ir-138=ISO-8859-8
csisolatinhebrew=ISO-8859-8
##
## Aliases for ISO-8859-8-I
##
csiso88598i=ISO-8859-8-I
iso-8859-8i=ISO-8859-8-I
##
## Aliases for ISO-8859-8-E
##
csiso88598e=ISO-8859-8-E
##
## Aliases for ISO-8859-9
##
latin5=ISO-8859-9
iso_8859-9=ISO-8859-9
# Currently .properties cannot handle : in key
#iso_8859-9:1989=ISO-8859-9
iso-ir-148=ISO-8859-9
l5=ISO-8859-9
csisolatin5=ISO-8859-9
##
## Aliases for UTF-8
##
unicode-1-1-utf-8=UTF-8
##
## Aliases for Shift_JIS
##
x-sjis=Shift_JIS
shift-jis=Shift_JIS
ms_kanji=Shift_JIS
csshiftjis=Shift_JIS
windows-31j=Shift_JIS
##
## Aliases for EUC_JP
##
cseucjpkdfmtjapanese=EUC-JP
x-euc-jp=EUC-JP
##
## Aliases for ISO-2022-JP
##
csiso2022jp=ISO-2022-JP
# The following are really not aliases ISO-2022-JP, but sharing the same decoder
iso-2022-jp-2=ISO-2022-JP
csiso2022jp2=ISO-2022-JP
##
## Aliases for Big5
##
csbig5=Big5
# x-x-big5 is not really a alias for Big5, add it only for MS FrontPage
x-x-big5=Big5
# Sun Solaris
zh_tw-big5=Big5
##
## Aliases for EUC-KR
##
csueckr=EUC-KR
# The following are really not aliases EUC-KR, add them only for MS FrontPage
#ks_c_5601-1987=EUC-KR
iso-ir-149=EUC-KR
ks_c_5601-1989=EUC-KR
ksc_5601=EUC-KR
ksc5601=EUC-KR
korean=EUC-KR
csksc56011987=EUC-KR
5601=EUC-KR
##
## Aliases for X-Windows-949, CP949, Unified Hangul Code (UHC)
##
# Microsoft uses ks_c_5601-1987 to mean Windows-949 or its subset EUC-KR.
ks_c_5601-1987=x-windows-949
##
## Aliases for GB2312
##
# The following are really not aliases GB2312, add them only for MS FrontPage
gb_2312-80=GB2312
iso-ir-58=GB2312
chinese=GB2312
csiso58gb231280=GB2312
csgb2312=GB2312
zh_cn.euc=GB2312
# Sun Solaris
gb_2312=GB2312
##
## Aliases for windows-125x
##
x-cp1250=windows-1250
x-cp1251=windows-1251
x-cp1252=windows-1252
x-cp1253=windows-1253
x-cp1254=windows-1254
x-cp1255=windows-1255
x-cp1256=windows-1256
x-cp1257=windows-1257
x-cp1258=windows-1258
##
## Aliases for windows-874
##
windows-874=TIS-620
ibm874=TIS-620
tis620.2533=TIS-620
##
## Aliases for IBM866
##
cp866=IBM866
cp-866=IBM866
866=IBM866
csIBM866=IBM866
##
## Aliases for IBM850
##
cp850=IBM850
850=IBM850
csIBM850=IBM850
##
## Aliases for IBM852
##
cp852=IBM852
852=IBM852
csIBM852=IBM852
##
## Aliases for IBM855
##
cp855=IBM855
855=IBM855
csIBM855=IBM855
##
## Aliases for IBM857
##
cp857=IBM857
857=IBM857
csIBM857=IBM857
##
## Aliases for IBM862
##
cp862=IBM862
862=IBM862
csIBM862=IBM862
##
## Aliases for IBM864
##
cp864=IBM864
864=IBM864
csIBM864=IBM864
ibm-864=IBM864
##
## Aliases for IBM864i
##
cp864i=IBM864i
864i=IBM864i
csibm864i=IBM864i
ibm-864i=IBM864i
##
## Aliases for T.61-8bit
##
t.61=T.61-8bit
iso-ir-103=T.61-8bit
csiso103t618bit=T.61-8bit
##
## Aliases for UTF-7
##
x-unicode-2-0-utf-7=UTF-7
unicode-2-0-utf-7=UTF-7
unicode-1-1-utf-7=UTF-7
csunicode11utf7=UTF-7
##
## Aliases for ISO-10646-UCS-2
##
csunicode=UTF-16BE
csunicode11=UTF-16BE
iso-10646-ucs-basic=UTF-16BE
csunicodeascii=UTF-16BE
iso-10646-unicode-latin1=UTF-16BE
csunicodelatin1=UTF-16BE
iso-10646=UTF-16BE
iso-10646-j-1=UTF-16BE
##
## Aliases for ISO-8859-10
##
latin6=ISO-8859-10
iso-ir-157=ISO-8859-10
l6=ISO-8859-10
# Currently .properties cannot handle : in key
#iso_8859-10:1992=ISO-8859-10
csisolatin6=ISO-8859-10
##
## Aliases for ISO-8859-15
##
iso_8859-15=ISO-8859-15
##
## Aliases for ISO-IR-111
##
ecma-cyrillic=ISO-IR-111
csiso111ecmacyrillic=ISO-IR-111
##
## Aliases for ISO-2022-KR
##
csiso2022kr=ISO-2022-KR
##
## Aliases for VISCII
##
csviscii=VISCII
##
## Aliases for VIQR
##
csviqr=VIQR
##
## Aliases for x-euc-tw
##
zh_tw-euc=x-euc-tw
##
## Following names appears in unix nl_langinfo(CODESET)
## They can be compiled as platform specific if necessary
## DONT put things here if it does not look generic enough (like hp15CN)
##
iso88591=ISO-8859-1
iso88592=ISO-8859-2
iso88593=ISO-8859-3
iso88594=ISO-8859-4
iso88595=ISO-8859-5
iso88596=ISO-8859-6
iso88597=ISO-8859-7
iso88598=ISO-8859-8
iso88599=ISO-8859-9
iso885910=ISO-8859-10
iso885911=TIS-620
iso885912=ISO-8859-12
iso885913=ISO-8859-13
iso885914=ISO-8859-14
iso885915=ISO-8859-15
##
tis620=TIS-620
##
cp1250=windows-1250
cp1251=windows-1251
cp1252=windows-1252
cp1253=windows-1253
cp1254=windows-1254
cp1255=windows-1255
cp1256=windows-1256
cp1257=windows-1257
cp1258=windows-1258
## Tempory charset for testing purpose. Should be remove before Beta
x-obsoleted-shift_jis=x-obsoleted-Shift_JIS
x-obsoleted-iso-2022-jp=x-obsoleted-ISO-2022-JP
x-obsoleted-euc-jp=x-obsoleted-EUC-JP
x-gbk=x-gbk
windows-936=windows-936
ansi-1251=windows-1251

View File

@@ -0,0 +1,182 @@
/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
*
* The contents of this file are subject to the Netscape Public
* License Version 1.1 (the "License"); you may not use this file
* except in compliance with the License. You may obtain a copy of
* the License at http://www.mozilla.org/NPL/
*
* Software distributed under the License is distributed on an "AS
* IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
* implied. See the License for the specific language governing
* rights and limitations under the License.
*
* The Original Code is mozilla.org code.
*
* The Initial Developer of the Original Code is Netscape
* Communications Corporation. Portions created by Netscape are
* Copyright (C) 1998 Netscape Communications Corporation. All
* Rights Reserved.
*
* Contributor(s):
*/
/*========================================================
This is a Generated file. Please don't edit it.
The tool which used to generate this file is called fromu.
If you have any problem of this file. Please contact
Netscape Client International Team or
ftang@netscape <Frank Tang>
Table in Debug form
Begin of Item 0000
Format 0
srcBegin = 0000
srcEnd = 007F
destBegin = 0000
End of Item 0000
Begin of Item 0001
Format 0
srcBegin = 00A0
srcEnd = 00FF
destBegin = 00A0
End of Item 0001
Begin of Item 0002
Format 2
srcBegin = 0081
destBegin = 0081
End of Item 0002
Begin of Item 0003
Format 1
srcBegin = 008D
srcEnd = 0090
mappingOffset = 0000
Mapping =
008D FFFD 008F 0090
End of Item 0003
Begin of Item 0004
Format 2
srcBegin = 009D
destBegin = 009D
End of Item 0004
Begin of Item 0005
Format 1
srcBegin = 0152
srcEnd = 0153
mappingOffset = 0004
Mapping =
008C 009C
End of Item 0005
Begin of Item 0006
Format 1
srcBegin = 0160
srcEnd = 0161
mappingOffset = 0006
Mapping =
008A 009A
End of Item 0006
Begin of Item 0007
Format 1
srcBegin = 0178
srcEnd = 017E
mappingOffset = 0008
Mapping =
009F FFFD FFFD FFFD FFFD 008E 009E
End of Item 0007
Begin of Item 0008
Format 2
srcBegin = 0192
destBegin = 0083
End of Item 0008
Begin of Item 0009
Format 2
srcBegin = 02C6
destBegin = 0088
End of Item 0009
Begin of Item 000A
Format 2
srcBegin = 02DC
destBegin = 0098
End of Item 000A
Begin of Item 000B
Format 1
srcBegin = 2013
srcEnd = 203A
mappingOffset = 000F
Mapping =
0096 0097 FFFD FFFD FFFD 0091 0092 0082
FFFD 0093 0094 0084 FFFD 0086 0087 0095
FFFD FFFD FFFD 0085 FFFD FFFD FFFD FFFD
FFFD FFFD FFFD FFFD FFFD 0089 FFFD FFFD
FFFD FFFD FFFD FFFD FFFD FFFD 008B 009B
End of Item 000B
Begin of Item 000C
Format 2
srcBegin = 20AC
destBegin = 0080
End of Item 000C
Begin of Item 000D
Format 2
srcBegin = 2122
destBegin = 0099
End of Item 000D
========================================================*/
/* Offset=0x0000 ItemOfList */
0x000E,
/*-------------------------------------------------------*/
/* Offset=0x0001 offsetToFormatArray */
0x0004,
/*-------------------------------------------------------*/
/* Offset=0x0002 offsetToMapCellArray */
0x0008,
/*-------------------------------------------------------*/
/* Offset=0x0003 offsetToMappingTable */
0x0032,
/*-------------------------------------------------------*/
/* Offset=0x0004 Start of Format Array */
/* Total of Format 0 : 0x0002 */
/* Total of Format 1 : 0x0005 */
/* Total of Format 2 : 0x0007 */
/* Total of Format 3 : 0x0000 */
0x1200, 0x1112, 0x1222, 0x0022,
/*-------------------------------------------------------*/
/* Offset=0x0008 Start of MapCell Array */
/* 0000 */ 0x0000, 0x007F, 0x0000,
/* 0001 */ 0x00A0, 0x00FF, 0x00A0,
/* 0002 */ 0x0081, 0x0000, 0x0081,
/* 0003 */ 0x008D, 0x0090, 0x0000,
/* 0004 */ 0x009D, 0x0000, 0x009D,
/* 0005 */ 0x0152, 0x0153, 0x0004,
/* 0006 */ 0x0160, 0x0161, 0x0006,
/* 0007 */ 0x0178, 0x017E, 0x0008,
/* 0008 */ 0x0192, 0x0000, 0x0083,
/* 0009 */ 0x02C6, 0x0000, 0x0088,
/* 000A */ 0x02DC, 0x0000, 0x0098,
/* 000B */ 0x2013, 0x203A, 0x000F,
/* 000C */ 0x20AC, 0x0000, 0x0080,
/* 000D */ 0x2122, 0x0000, 0x0099,
/*-------------------------------------------------------*/
/* Offset=0x0032 Start of MappingTable */
/* 0000 */ 0x008D, 0xFFFD, 0x008F, 0x0090, 0x008C, 0x009C, 0x008A, 0x009A,
/* 0008 */ 0x009F, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0x008E, 0x009E, 0x0096,
/* 0010 */ 0x0097, 0xFFFD, 0xFFFD, 0xFFFD, 0x0091, 0x0092, 0x0082, 0xFFFD,
/* 0018 */ 0x0093, 0x0094, 0x0084, 0xFFFD, 0x0086, 0x0087, 0x0095, 0xFFFD,
/* 0020 */ 0xFFFD, 0xFFFD, 0x0085, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD,
/* 0028 */ 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0x0089, 0xFFFD, 0xFFFD, 0xFFFD,
/* 0030 */ 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0x008B, 0x009B,
/* End of table Total Length = 0x0069 * 2 */

View File

@@ -0,0 +1,105 @@
/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* ***** BEGIN LICENSE BLOCK *****
* Version: NPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Netscape Public License
* Version 1.1 (the "License"); you may not use this file except in
* compliance with the License. You may obtain a copy of the License at
* http://www.mozilla.org/NPL/
*
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the
* License.
*
* The Original Code is mozilla.org code.
*
* The Initial Developer of the Original Code is
* Netscape Communications Corporation.
* Portions created by the Initial Developer are Copyright (C) 1998
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
*
*
* Alternatively, the contents of this file may be used under the terms of
* either the GNU General Public License Version 2 or later (the "GPL"), or
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
* in which case the provisions of the GPL or the LGPL are applicable instead
* of those above. If you wish to allow use of your version of this file only
* under the terms of either the GPL or the LGPL, and not to allow others to
* use your version of this file under the terms of the NPL, indicate your
* decision by deleting the provisions above and replace them with the notice
* and other provisions required by the GPL or the LGPL. If you do not delete
* the provisions above, a recipient may use your version of this file under
* the terms of any one of the NPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
/*========================================================
This is a Generated file. Please don't edit it.
The tool which used to generate this file is called fromu.
If you have any problem of this file. Please contact
Netscape Client International Team or
ftang@netscape <Frank Tang>
Table in Debug form
Begin of Item 0000
Format 0
srcBegin = 0000
srcEnd = 007F
destBegin = 0000
End of Item 0000
Begin of Item 0001
Format 0
srcBegin = 00A0
srcEnd = 00FF
destBegin = 00A0
End of Item 0001
Begin of Item 0002
Format 1
srcBegin = 0080
srcEnd = 009F
mappingOffset = 0000
Mapping =
20AC 0081 201A 0192 201E 2026 2020 2021
02C6 2030 0160 2039 0152 008D 017D 008F
0090 2018 2019 201C 201D 2022 2013 2014
02DC 2122 0161 203A 0153 009D 017E 0178
End of Item 0002
========================================================*/
/* Offset=0x0000 ItemOfList */
0x0003,
/*-------------------------------------------------------*/
/* Offset=0x0001 offsetToFormatArray */
0x0004,
/*-------------------------------------------------------*/
/* Offset=0x0002 offsetToMapCellArray */
0x0005,
/*-------------------------------------------------------*/
/* Offset=0x0003 offsetToMappingTable */
0x000E,
/*-------------------------------------------------------*/
/* Offset=0x0004 Start of Format Array */
/* Total of Format 0 : 0x0002 */
/* Total of Format 1 : 0x0001 */
/* Total of Format 2 : 0x0000 */
/* Total of Format 3 : 0x0000 */
0x0100,
/*-------------------------------------------------------*/
/* Offset=0x0005 Start of MapCell Array */
/* 0000 */ 0x0000, 0x007F, 0x0000,
/* 0001 */ 0x00A0, 0x00FF, 0x00A0,
/* 0002 */ 0x0080, 0x009F, 0x0000,
/*-------------------------------------------------------*/
/* Offset=0x000E Start of MappingTable */
/* 0000 */ 0x20AC, 0x0081, 0x201A, 0x0192, 0x201E, 0x2026, 0x2020, 0x2021,
/* 0008 */ 0x02C6, 0x2030, 0x0160, 0x2039, 0x0152, 0x008D, 0x017D, 0x008F,
/* 0010 */ 0x0090, 0x2018, 0x2019, 0x201C, 0x201D, 0x2022, 0x2013, 0x2014,
/* 0018 */ 0x02DC, 0x2122, 0x0161, 0x203A, 0x0153, 0x009D, 0x017E, 0x0178,
/* End of table Total Length = 0x002E * 2 */

View File

@@ -0,0 +1,2 @@
en-US.jar:
locale/en-US/global/charsetTitles.properties

View File

@@ -0,0 +1,66 @@
##
## The contents of this file are subject to the Netscape Public
## License Version 1.1 (the "License"); you may not use this file
## except in compliance with the License. You may obtain a copy of
## the License at http://www.mozilla.org/NPL/
##
## Software distributed under the License is distributed on an "AS
## IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
## implied. See the License for the specific language governing
## rights and limitations under the License.
##
## The Original Code is mozilla.org code.
##
## The Initial Developer of the Original Code is Netscape
## Communications Corporation. Portions created by Netscape are
## Copyright (C) 1999 Netscape Communications Corporation. All
## Rights Reserved.
##
## Contributor(s):
##
## Region code section, this is used to map a region code to a charset name
## It have higher priority than the Script code section
##
region.68=x-mac-croatian
region.25=x-mac-croatian
region.20=x-mac-greek
region.21=x-mac-icelandic
region.39=x-mac-romanian
region.24=x-mac-turkish
region.62=x-mac-ukrainian
##
## Script code section, this is used to map a script code to a charset name
## It have lower priority than the Region code section
##
script.0=x-mac-roman
script.1=Shift_JIS
script.2=Big5
script.3=EUC-KR
script.4=x-mac-arabic
script.5=x-mac-hebrew
script.6=x-mac-greek
script.7=x-mac-cyrillic
script.8=x-mac-rsymbol
script.9=x-mac-devanagari
script.10=x-mac-gurmukhi
script.11=x-mac-gujarati
script.12=x-mac-oriya
script.13=x-mac-bengali
script.14=x-mac-tamil
script.15=x-mac-telugu
script.16=x-mac-kannada
script.17=x-mac-malayalam
script.18=x-mac-sinhalese
script.19=x-mac-burmese
script.20=x-mac-khmer
script.21=TIS-620
script.22=x-mac-lao
script.23=x-mac-georgian
script.24=x-mac-armenian
script.25=GB2312
script.26=x-mac-tibetan
script.27=x-mac-mongolian
script.28=x-mac-ethiopic
script.29=x-mac-ce
script.30=x-mac-vietnamese
script.31=x-mac-extarabic

View File

@@ -0,0 +1,262 @@
/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
*
* The contents of this file are subject to the Netscape Public
* License Version 1.1 (the "License"); you may not use this file
* except in compliance with the License. You may obtain a copy of
* the License at http://www.mozilla.org/NPL/
*
* Software distributed under the License is distributed on an "AS
* IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
* implied. See the License for the specific language governing
* rights and limitations under the License.
*
* The Original Code is mozilla.org code.
*
* The Initial Developer of the Original Code is Netscape
* Communications Corporation. Portions created by Netscape are
* Copyright (C) 1998 Netscape Communications Corporation. All
* Rights Reserved.
*
* Contributor(s):
*/
/*========================================================
This is a Generated file. Please don't edit it.
The tool which used to generate this file is called fromu.
If you have any problem of this file. Please contact
Netscape Client International Team or
ftang@netscape <Frank Tang>
Table in Debug form
Begin of Item 0000
Format 0
srcBegin = 0000
srcEnd = 007E
destBegin = 0000
End of Item 0000
Begin of Item 0001
Format 1
srcBegin = 00A0
srcEnd = 00FF
mappingOffset = 0000
Mapping =
00CA 00C1 00A2 00A3 FFFD 00B4 FFFD 00A4
00AC 00A9 00BB 00C7 00C2 FFFD 00A8 00F8
00A1 00B1 FFFD FFFD 00AB 00B5 00A6 00E1
00FC FFFD 00BC 00C8 FFFD FFFD FFFD 00C0
00CB 00E7 00E5 00CC 0080 0081 00AE 0082
00E9 0083 00E6 00E8 00ED 00EA 00EB 00EC
FFFD 0084 00F1 00EE 00EF 00CD 0085 FFFD
00AF 00F4 00F2 00F3 0086 FFFD FFFD 00A7
0088 0087 0089 008B 008A 008C 00BE 008D
008F 008E 0090 0091 0093 0092 0094 0095
FFFD 0096 0098 0097 0099 009B 009A 00D6
00BF 009D 009C 009E 009F FFFD FFFD 00D8
End of Item 0001
Begin of Item 0002
Format 2
srcBegin = 0131
destBegin = 00F5
End of Item 0002
Begin of Item 0003
Format 1
srcBegin = 0152
srcEnd = 0153
mappingOffset = 0060
Mapping =
00CE 00CF
End of Item 0003
Begin of Item 0004
Format 2
srcBegin = 0178
destBegin = 00D9
End of Item 0004
Begin of Item 0005
Format 2
srcBegin = 0192
destBegin = 00C4
End of Item 0005
Begin of Item 0006
Format 1
srcBegin = 02C6
srcEnd = 02C7
mappingOffset = 0062
Mapping =
00F6 00FF
End of Item 0006
Begin of Item 0007
Format 1
srcBegin = 02D8
srcEnd = 02DD
mappingOffset = 0064
Mapping =
00F9 00FA 00FB 00FE 00F7 00FD
End of Item 0007
Begin of Item 0008
Format 2
srcBegin = 03C0
destBegin = 00B9
End of Item 0008
Begin of Item 0009
Format 1
srcBegin = 2013
srcEnd = 2044
mappingOffset = 006A
Mapping =
00D0 00D1 FFFD FFFD FFFD 00D4 00D5 00E2
FFFD 00D2 00D3 00E3 FFFD 00A0 00E0 00A5
FFFD FFFD FFFD 00C9 FFFD FFFD FFFD FFFD
FFFD FFFD FFFD FFFD FFFD 00E4 FFFD FFFD
FFFD FFFD FFFD FFFD FFFD FFFD 00DC 00DD
FFFD FFFD FFFD FFFD FFFD FFFD FFFD FFFD
FFFD 00DA
End of Item 0009
Begin of Item 000A
Format 2
srcBegin = 20AC
destBegin = 00DB
End of Item 000A
Begin of Item 000B
Format 1
srcBegin = 2122
srcEnd = 2126
mappingOffset = 009C
Mapping =
00AA FFFD FFFD FFFD 00BD
End of Item 000B
Begin of Item 000C
Format 1
srcBegin = 2202
srcEnd = 221E
mappingOffset = 00A1
Mapping =
00B6 FFFD FFFD FFFD 00C6 FFFD FFFD FFFD
FFFD FFFD FFFD FFFD FFFD 00B8 FFFD 00B7
FFFD FFFD FFFD FFFD FFFD FFFD FFFD FFFD
00C3 FFFD FFFD FFFD 00B0
End of Item 000C
Begin of Item 000D
Format 2
srcBegin = 222B
destBegin = 00BA
End of Item 000D
Begin of Item 000E
Format 2
srcBegin = 2248
destBegin = 00C5
End of Item 000E
Begin of Item 000F
Format 1
srcBegin = 2260
srcEnd = 2265
mappingOffset = 00BE
Mapping =
00AD FFFD FFFD FFFD 00B2 00B3
End of Item 000F
Begin of Item 0010
Format 2
srcBegin = 25CA
destBegin = 00D7
End of Item 0010
Begin of Item 0011
Format 2
srcBegin = F8FF
destBegin = 00F0
End of Item 0011
Begin of Item 0012
Format 1
srcBegin = FB01
srcEnd = FB02
mappingOffset = 00C4
Mapping =
00DE 00DF
End of Item 0012
========================================================*/
/* Offset=0x0000 ItemOfList */
0x0013,
/*-------------------------------------------------------*/
/* Offset=0x0001 offsetToFormatArray */
0x0004,
/*-------------------------------------------------------*/
/* Offset=0x0002 offsetToMapCellArray */
0x0009,
/*-------------------------------------------------------*/
/* Offset=0x0003 offsetToMappingTable */
0x0042,
/*-------------------------------------------------------*/
/* Offset=0x0004 Start of Format Array */
/* Total of Format 0 : 0x0001 */
/* Total of Format 1 : 0x0009 */
/* Total of Format 2 : 0x0009 */
/* Total of Format 3 : 0x0000 */
0x1210, 0x1122, 0x1212, 0x1221, 0x0122,
/*-------------------------------------------------------*/
/* Offset=0x0009 Start of MapCell Array */
/* 0000 */ 0x0000, 0x007E, 0x0000,
/* 0001 */ 0x00A0, 0x00FF, 0x0000,
/* 0002 */ 0x0131, 0x0000, 0x00F5,
/* 0003 */ 0x0152, 0x0153, 0x0060,
/* 0004 */ 0x0178, 0x0000, 0x00D9,
/* 0005 */ 0x0192, 0x0000, 0x00C4,
/* 0006 */ 0x02C6, 0x02C7, 0x0062,
/* 0007 */ 0x02D8, 0x02DD, 0x0064,
/* 0008 */ 0x03C0, 0x0000, 0x00B9,
/* 0009 */ 0x2013, 0x2044, 0x006A,
/* 000A */ 0x20AC, 0x0000, 0x00DB,
/* 000B */ 0x2122, 0x2126, 0x009C,
/* 000C */ 0x2202, 0x221E, 0x00A1,
/* 000D */ 0x222B, 0x0000, 0x00BA,
/* 000E */ 0x2248, 0x0000, 0x00C5,
/* 000F */ 0x2260, 0x2265, 0x00BE,
/* 0010 */ 0x25CA, 0x0000, 0x00D7,
/* 0011 */ 0xF8FF, 0x0000, 0x00F0,
/* 0012 */ 0xFB01, 0xFB02, 0x00C4,
/*-------------------------------------------------------*/
/* Offset=0x0042 Start of MappingTable */
/* 0000 */ 0x00CA, 0x00C1, 0x00A2, 0x00A3, 0xFFFD, 0x00B4, 0xFFFD, 0x00A4,
/* 0008 */ 0x00AC, 0x00A9, 0x00BB, 0x00C7, 0x00C2, 0xFFFD, 0x00A8, 0x00F8,
/* 0010 */ 0x00A1, 0x00B1, 0xFFFD, 0xFFFD, 0x00AB, 0x00B5, 0x00A6, 0x00E1,
/* 0018 */ 0x00FC, 0xFFFD, 0x00BC, 0x00C8, 0xFFFD, 0xFFFD, 0xFFFD, 0x00C0,
/* 0020 */ 0x00CB, 0x00E7, 0x00E5, 0x00CC, 0x0080, 0x0081, 0x00AE, 0x0082,
/* 0028 */ 0x00E9, 0x0083, 0x00E6, 0x00E8, 0x00ED, 0x00EA, 0x00EB, 0x00EC,
/* 0030 */ 0xFFFD, 0x0084, 0x00F1, 0x00EE, 0x00EF, 0x00CD, 0x0085, 0xFFFD,
/* 0038 */ 0x00AF, 0x00F4, 0x00F2, 0x00F3, 0x0086, 0xFFFD, 0xFFFD, 0x00A7,
/* 0040 */ 0x0088, 0x0087, 0x0089, 0x008B, 0x008A, 0x008C, 0x00BE, 0x008D,
/* 0048 */ 0x008F, 0x008E, 0x0090, 0x0091, 0x0093, 0x0092, 0x0094, 0x0095,
/* 0050 */ 0xFFFD, 0x0096, 0x0098, 0x0097, 0x0099, 0x009B, 0x009A, 0x00D6,
/* 0058 */ 0x00BF, 0x009D, 0x009C, 0x009E, 0x009F, 0xFFFD, 0xFFFD, 0x00D8,
/* 0060 */ 0x00CE, 0x00CF, 0x00F6, 0x00FF, 0x00F9, 0x00FA, 0x00FB, 0x00FE,
/* 0068 */ 0x00F7, 0x00FD, 0x00D0, 0x00D1, 0xFFFD, 0xFFFD, 0xFFFD, 0x00D4,
/* 0070 */ 0x00D5, 0x00E2, 0xFFFD, 0x00D2, 0x00D3, 0x00E3, 0xFFFD, 0x00A0,
/* 0078 */ 0x00E0, 0x00A5, 0xFFFD, 0xFFFD, 0xFFFD, 0x00C9, 0xFFFD, 0xFFFD,
/* 0080 */ 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0x00E4,
/* 0088 */ 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD,
/* 0090 */ 0x00DC, 0x00DD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD,
/* 0098 */ 0xFFFD, 0xFFFD, 0xFFFD, 0x00DA, 0x00AA, 0xFFFD, 0xFFFD, 0xFFFD,
/* 00A0 */ 0x00BD, 0x00B6, 0xFFFD, 0xFFFD, 0xFFFD, 0x00C6, 0xFFFD, 0xFFFD,
/* 00A8 */ 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0x00B8, 0xFFFD,
/* 00B0 */ 0x00B7, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD,
/* 00B8 */ 0xFFFD, 0x00C3, 0xFFFD, 0xFFFD, 0xFFFD, 0x00B0, 0x00AD, 0xFFFD,
/* 00C0 */ 0xFFFD, 0xFFFD, 0x00B2, 0x00B3, 0x00DE, 0x00DF,
/* End of table Total Length = 0x0108 * 2 */

View File

@@ -0,0 +1,121 @@
/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* ***** BEGIN LICENSE BLOCK *****
* Version: NPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Netscape Public License
* Version 1.1 (the "License"); you may not use this file except in
* compliance with the License. You may obtain a copy of the License at
* http://www.mozilla.org/NPL/
*
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the
* License.
*
* The Original Code is mozilla.org code.
*
* The Initial Developer of the Original Code is
* Netscape Communications Corporation.
* Portions created by the Initial Developer are Copyright (C) 1998
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
*
*
* Alternatively, the contents of this file may be used under the terms of
* either the GNU General Public License Version 2 or later (the "GPL"), or
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
* in which case the provisions of the GPL or the LGPL are applicable instead
* of those above. If you wish to allow use of your version of this file only
* under the terms of either the GPL or the LGPL, and not to allow others to
* use your version of this file under the terms of the NPL, indicate your
* decision by deleting the provisions above and replace them with the notice
* and other provisions required by the GPL or the LGPL. If you do not delete
* the provisions above, a recipient may use your version of this file under
* the terms of any one of the NPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
/*========================================================
This is a Generated file. Please don't edit it.
The tool which used to generate this file is called fromu.
If you have any problem of this file. Please contact
Netscape Client International Team or
ftang@netscape <Frank Tang>
Table in Debug form
Begin of Item 0000
Format 0
srcBegin = 0000
srcEnd = 007E
destBegin = 0000
End of Item 0000
Begin of Item 0001
Format 1
srcBegin = 0080
srcEnd = 00FF
mappingOffset = 0000
Mapping =
00C4 00C5 00C7 00C9 00D1 00D6 00DC 00E1
00E0 00E2 00E4 00E3 00E5 00E7 00E9 00E8
00EA 00EB 00ED 00EC 00EE 00EF 00F1 00F3
00F2 00F4 00F6 00F5 00FA 00F9 00FB 00FC
2020 00B0 00A2 00A3 00A7 2022 00B6 00DF
00AE 00A9 2122 00B4 00A8 2260 00C6 00D8
221E 00B1 2264 2265 00A5 00B5 2202 2211
220F 03C0 222B 00AA 00BA 2126 00E6 00F8
00BF 00A1 00AC 221A 0192 2248 2206 00AB
00BB 2026 00A0 00C0 00C3 00D5 0152 0153
2013 2014 201C 201D 2018 2019 00F7 25CA
00FF 0178 2044 20AC 2039 203A FB01 FB02
2021 00B7 201A 201E 2030 00C2 00CA 00C1
00CB 00C8 00CD 00CE 00CF 00CC 00D3 00D4
F8FF 00D2 00DA 00DB 00D9 0131 02C6 02DC
00AF 02D8 02D9 02DA 00B8 02DD 02DB 02C7
End of Item 0001
========================================================*/
/* Offset=0x0000 ItemOfList */
0x0002,
/*-------------------------------------------------------*/
/* Offset=0x0001 offsetToFormatArray */
0x0004,
/*-------------------------------------------------------*/
/* Offset=0x0002 offsetToMapCellArray */
0x0005,
/*-------------------------------------------------------*/
/* Offset=0x0003 offsetToMappingTable */
0x000B,
/*-------------------------------------------------------*/
/* Offset=0x0004 Start of Format Array */
/* Total of Format 0 : 0x0001 */
/* Total of Format 1 : 0x0001 */
/* Total of Format 2 : 0x0000 */
/* Total of Format 3 : 0x0000 */
0x0010,
/*-------------------------------------------------------*/
/* Offset=0x0005 Start of MapCell Array */
/* 0000 */ 0x0000, 0x007E, 0x0000,
/* 0001 */ 0x0080, 0x00FF, 0x0000,
/*-------------------------------------------------------*/
/* Offset=0x000B Start of MappingTable */
/* 0000 */ 0x00C4, 0x00C5, 0x00C7, 0x00C9, 0x00D1, 0x00D6, 0x00DC, 0x00E1,
/* 0008 */ 0x00E0, 0x00E2, 0x00E4, 0x00E3, 0x00E5, 0x00E7, 0x00E9, 0x00E8,
/* 0010 */ 0x00EA, 0x00EB, 0x00ED, 0x00EC, 0x00EE, 0x00EF, 0x00F1, 0x00F3,
/* 0018 */ 0x00F2, 0x00F4, 0x00F6, 0x00F5, 0x00FA, 0x00F9, 0x00FB, 0x00FC,
/* 0020 */ 0x2020, 0x00B0, 0x00A2, 0x00A3, 0x00A7, 0x2022, 0x00B6, 0x00DF,
/* 0028 */ 0x00AE, 0x00A9, 0x2122, 0x00B4, 0x00A8, 0x2260, 0x00C6, 0x00D8,
/* 0030 */ 0x221E, 0x00B1, 0x2264, 0x2265, 0x00A5, 0x00B5, 0x2202, 0x2211,
/* 0038 */ 0x220F, 0x03C0, 0x222B, 0x00AA, 0x00BA, 0x2126, 0x00E6, 0x00F8,
/* 0040 */ 0x00BF, 0x00A1, 0x00AC, 0x221A, 0x0192, 0x2248, 0x2206, 0x00AB,
/* 0048 */ 0x00BB, 0x2026, 0x00A0, 0x00C0, 0x00C3, 0x00D5, 0x0152, 0x0153,
/* 0050 */ 0x2013, 0x2014, 0x201C, 0x201D, 0x2018, 0x2019, 0x00F7, 0x25CA,
/* 0058 */ 0x00FF, 0x0178, 0x2044, 0x20AC, 0x2039, 0x203A, 0xFB01, 0xFB02,
/* 0060 */ 0x2021, 0x00B7, 0x201A, 0x201E, 0x2030, 0x00C2, 0x00CA, 0x00C1,
/* 0068 */ 0x00CB, 0x00C8, 0x00CD, 0x00CE, 0x00CF, 0x00CC, 0x00D3, 0x00D4,
/* 0070 */ 0xF8FF, 0x00D2, 0x00DA, 0x00DB, 0x00D9, 0x0131, 0x02C6, 0x02DC,
/* 0078 */ 0x00AF, 0x02D8, 0x02D9, 0x02DA, 0x00B8, 0x02DD, 0x02DB, 0x02C7,
/* End of table Total Length = 0x008B * 2 */

View File

@@ -0,0 +1,99 @@
#!nmake
#
# The contents of this file are subject to the Netscape Public
# License Version 1.1 (the "License"); you may not use this file
# except in compliance with the License. You may obtain a copy of
# the License at http://www.mozilla.org/NPL/
#
# Software distributed under the License is distributed on an "AS
# IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
# implied. See the License for the specific language governing
# rights and limitations under the License.
#
# The Original Code is mozilla.org code.
#
# The Initial Developer of the Original Code is Netscape
# Communications Corporation. Portions created by Netscape are
# Copyright (C) 1998 Netscape Communications Corporation. All
# Rights Reserved.
#
# Contributor(s):
DEPTH=..\..\..
MODULE=uconv
REQUIRES = xpcom \
string \
intl \
locale \
unicharutil \
chardet \
$(NULL)
include <$(DEPTH)/config/config.mak>
DEFINES=-D_IMPL_NS_INTL -DWIN32_LEAN_AND_MEAN
LIBRARY_NAME=uconv
MODULE_NAME=nsUConvModule
CPP_OBJS= \
.\$(OBJDIR)\nsTextToSubURI.obj \
.\$(OBJDIR)\nsCharsetConverterManager.obj \
.\$(OBJDIR)\nsUnicodeDecodeHelper.obj \
.\$(OBJDIR)\nsUnicodeEncodeHelper.obj \
.\$(OBJDIR)\nsWinCharset.obj \
.\$(OBJDIR)\nsCharsetAliasImp.obj \
.\$(OBJDIR)\nsUConvModule.obj \
.\$(OBJDIR)\nsMappingCache.obj \
.\$(OBJDIR)\nsURLProperties.obj \
.\$(OBJDIR)\nsISO88591ToUnicode.obj \
.\$(OBJDIR)\nsCP1252ToUnicode.obj \
.\$(OBJDIR)\nsMacRomanToUnicode.obj \
.\$(OBJDIR)\nsUTF8ToUnicode.obj \
.\$(OBJDIR)\nsUnicodeToISO88591.obj \
.\$(OBJDIR)\nsUnicodeToCP1252.obj \
.\$(OBJDIR)\nsUnicodeToMacRoman.obj \
.\$(OBJDIR)\nsUnicodeToUTF8.obj \
.\$(OBJDIR)\nsUCvMinSupport.obj \
.\$(OBJDIR)\nsScriptableUConv.obj \
.\$(OBJDIR)\nsConverterInputStream.obj \
$(NULL)
CSRCS = \
umap.c \
ugen.c \
uscan.c \
$(NULL)
OBJS = \
.\$(OBJDIR)\umap.obj \
.\$(OBJDIR)\ugen.obj \
.\$(OBJDIR)\uscan.obj \
$(NULL)
EXPORTS= \
$(NULL)
LLIBS= \
$(DIST)\lib\xpcom.lib \
$(DIST)\lib\unicharutil_s.lib \
$(LIBNSPR)
LCFLAGS = \
$(LCFLAGS) \
$(DEFINES) \
$(NULL)
include <$(DEPTH)\config\rules.mak>
libs::
$(MAKE_INSTALL) .\charsetalias.properties $(DIST)\bin\res
$(MAKE_INSTALL) .\wincharset.properties $(DIST)\bin\res
$(MAKE_INSTALL) charsetData.properties $(DIST)\bin\res
clobber::
rm -f $(DIST)\bin\res\charsetalias.properties
rm -f $(DIST)\bin\res\wincharset.properties
rm -f $(DIST)\bin\res\charsetData.properties

View File

@@ -0,0 +1,61 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* ***** BEGIN LICENSE BLOCK *****
* Version: NPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Netscape Public License
* Version 1.1 (the "License"); you may not use this file except in
* compliance with the License. You may obtain a copy of the License at
* http://www.mozilla.org/NPL/
*
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the
* License.
*
* The Original Code is Mozilla Communicator client code.
*
* The Initial Developer of the Original Code is
* Netscape Communications Corporation.
* Portions created by the Initial Developer are Copyright (C) 1998
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
*
*
* Alternatively, the contents of this file may be used under the terms of
* either the GNU General Public License Version 2 or later (the "GPL"), or
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
* in which case the provisions of the GPL or the LGPL are applicable instead
* of those above. If you wish to allow use of your version of this file only
* under the terms of either the GPL or the LGPL, and not to allow others to
* use your version of this file under the terms of the NPL, indicate your
* decision by deleting the provisions above and replace them with the notice
* and other provisions required by the GPL or the LGPL. If you do not delete
* the provisions above, a recipient may use your version of this file under
* the terms of any one of the NPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
#include "nsUCSupport.h"
#include "nsCP1252ToUnicode.h"
//----------------------------------------------------------------------
// Global functions and data [declaration]
static const PRUint16 g_utMappingTable[] = {
#include "cp1252.ut"
};
static const PRInt16 g_utShiftTable[] = {
0, u1ByteCharset ,
ShiftCell(0,0,0,0,0,0,0,0)
};
//----------------------------------------------------------------------
// Class nsCP1252ToUnicode [implementation]
nsCP1252ToUnicode::nsCP1252ToUnicode()
: nsOneByteDecoderSupport((uShiftTable*) &g_utShiftTable,
(uMappingTable*) &g_utMappingTable)
{
}

View File

@@ -0,0 +1,69 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* ***** BEGIN LICENSE BLOCK *****
* Version: NPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Netscape Public License
* Version 1.1 (the "License"); you may not use this file except in
* compliance with the License. You may obtain a copy of the License at
* http://www.mozilla.org/NPL/
*
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the
* License.
*
* The Original Code is Mozilla Communicator client code.
*
* The Initial Developer of the Original Code is
* Netscape Communications Corporation.
* Portions created by the Initial Developer are Copyright (C) 1998
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
*
*
* Alternatively, the contents of this file may be used under the terms of
* either the GNU General Public License Version 2 or later (the "GPL"), or
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
* in which case the provisions of the GPL or the LGPL are applicable instead
* of those above. If you wish to allow use of your version of this file only
* under the terms of either the GPL or the LGPL, and not to allow others to
* use your version of this file under the terms of the NPL, indicate your
* decision by deleting the provisions above and replace them with the notice
* and other provisions required by the GPL or the LGPL. If you do not delete
* the provisions above, a recipient may use your version of this file under
* the terms of any one of the NPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
#ifndef nsCP1252ToUnicode_h___
#define nsCP1252ToUnicode_h___
// Class ID for our CP1252ToUnicode charset converter
// {7C657D15-EC5E-11d2-8AAC-00600811A836}
#define NS_CP1252TOUNICODE_CID \
{ 0x7c657d15, 0xec5e, 0x11d2, {0x8a, 0xac, 0x0, 0x60, 0x8, 0x11, 0xa8, 0x36}}
#define NS_CP1252TOUNICODE_CONTRACTID "@mozilla.org/intl/unicode/decoder;1?charset=windows-1252"
//----------------------------------------------------------------------
// Class nsCP1252ToUnicode [declaration]
/**
* A character set converter from CP1252 to Unicode.
*
* @created 20/Apr/1999
* @author Catalin Rotaru [CATA]
*/
class nsCP1252ToUnicode : public nsOneByteDecoderSupport
{
public:
/**
* Class constructor.
*/
nsCP1252ToUnicode();
};
#endif /* nsCP1252ToUnicode_h___ */

View File

@@ -0,0 +1,68 @@
/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* ***** BEGIN LICENSE BLOCK *****
* Version: NPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Netscape Public License
* Version 1.1 (the "License"); you may not use this file except in
* compliance with the License. You may obtain a copy of the License at
* http://www.mozilla.org/NPL/
*
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the
* License.
*
* The Original Code is mozilla.org code.
*
* The Initial Developer of the Original Code is
* Netscape Communications Corporation.
* Portions created by the Initial Developer are Copyright (C) 1998
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
*
*
* Alternatively, the contents of this file may be used under the terms of
* either the GNU General Public License Version 2 or later (the "GPL"), or
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
* in which case the provisions of the GPL or the LGPL are applicable instead
* of those above. If you wish to allow use of your version of this file only
* under the terms of either the GPL or the LGPL, and not to allow others to
* use your version of this file under the terms of the NPL, indicate your
* decision by deleting the provisions above and replace them with the notice
* and other provisions required by the GPL or the LGPL. If you do not delete
* the provisions above, a recipient may use your version of this file under
* the terms of any one of the NPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
#ifndef nsCharsetAlias_h__
#define nsCharsetAlias_h__
#include "nsICharsetAlias.h"
#include "nsURLProperties.h"
//==============================================================
class nsCharsetAlias2 : public nsICharsetAlias
{
NS_DECL_ISUPPORTS
public:
nsCharsetAlias2();
virtual ~nsCharsetAlias2();
NS_IMETHOD GetPreferred(const nsAString& aAlias, nsAString& oResult);
NS_IMETHOD GetPreferred(const PRUnichar* aAlias, const PRUnichar** oResult) ;
NS_IMETHOD GetPreferred(const char* aAlias, char* oResult, PRInt32 aBufLength) ;
NS_IMETHOD Equals(const nsAString& aCharset1, const nsAString& aCharset2, PRBool* oResult) ;
NS_IMETHOD Equals(const PRUnichar* aCharset1, const PRUnichar* aCharset2, PRBool* oResult) ;
NS_IMETHOD Equals(const char* aCharset1, const char* aCharset2, PRBool* oResult) ;
private:
nsURLProperties* mDelegate;
};
#endif // nsCharsetAlias_h__

View File

@@ -0,0 +1,163 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* ***** BEGIN LICENSE BLOCK *****
* Version: NPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Netscape Public License
* Version 1.1 (the "License"); you may not use this file except in
* compliance with the License. You may obtain a copy of the License at
* http://www.mozilla.org/NPL/
*
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the
* License.
*
* The Original Code is Mozilla Communicator client code.
*
* The Initial Developer of the Original Code is
* Netscape Communications Corporation.
* Portions created by the Initial Developer are Copyright (C) 1998
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
*
*
* Alternatively, the contents of this file may be used under the terms of
* either the GNU General Public License Version 2 or later (the "GPL"), or
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
* in which case the provisions of the GPL or the LGPL are applicable instead
* of those above. If you wish to allow use of your version of this file only
* under the terms of either the GPL or the LGPL, and not to allow others to
* use your version of this file under the terms of the NPL, indicate your
* decision by deleting the provisions above and replace them with the notice
* and other provisions required by the GPL or the LGPL. If you do not delete
* the provisions above, a recipient may use your version of this file under
* the terms of any one of the NPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
#include "nsICharsetAlias.h"
#include "pratom.h"
// for NS_IMPL_IDS only
#include "nsIPlatformCharset.h"
#include "nsUConvDll.h"
#include "nsReadableUtils.h"
#include "nsUnicharUtils.h"
#include "nsURLProperties.h"
#include "nsITimelineService.h"
#include "nsCharsetAlias.h"
//--------------------------------------------------------------
NS_IMPL_ISUPPORTS1(nsCharsetAlias2, nsICharsetAlias);
//--------------------------------------------------------------
nsCharsetAlias2::nsCharsetAlias2()
{
NS_INIT_REFCNT();
mDelegate = nsnull; // delay the load of mDelegate untill we need it.
}
//--------------------------------------------------------------
nsCharsetAlias2::~nsCharsetAlias2()
{
if(mDelegate)
delete mDelegate;
}
//--------------------------------------------------------------
NS_IMETHODIMP nsCharsetAlias2::GetPreferred(const nsAString& aAlias, nsAString& oResult)
{
if (aAlias.IsEmpty()) return NS_ERROR_NULL_POINTER;
NS_TIMELINE_START_TIMER("nsCharsetAlias2:GetPreferred");
nsAutoString aKey(aAlias);
ToLowerCase(aKey);
oResult.Truncate();
//delay loading charsetalias.properties by resolving most freq. aliases
if(!mDelegate) {
if(aKey.Equals(NS_LITERAL_STRING("utf-8"))) {
oResult = NS_LITERAL_STRING("UTF-8");
NS_TIMELINE_STOP_TIMER("nsCharsetAlias2:GetPreferred");
return NS_OK;
}
if(aKey.Equals(NS_LITERAL_STRING("iso-8859-1"))) {
oResult = NS_LITERAL_STRING("ISO-8859-1");
NS_TIMELINE_STOP_TIMER("nsCharsetAlias2:GetPreferred");
return NS_OK;
}
if(aKey.Equals(NS_LITERAL_STRING("x-sjis")) ||
aKey.Equals(NS_LITERAL_STRING("shift_jis"))) {
oResult = NS_LITERAL_STRING("Shift_JIS");
NS_TIMELINE_STOP_TIMER("nsCharsetAlias2:GetPreferred");
return NS_OK;
}
//load charsetalias.properties string bundle with all remaining aliases
// we may need to protect the following section with a lock so we won't call the
// 'new nsURLProperties' from two different threads
mDelegate = new nsURLProperties( NS_LITERAL_CSTRING("resource:/res/charsetalias.properties") );
NS_ASSERTION(mDelegate, "cannot create nsURLProperties");
if(nsnull == mDelegate)
return NS_ERROR_OUT_OF_MEMORY;
}
NS_TIMELINE_STOP_TIMER("nsCharsetAlias2:GetPreferred");
NS_TIMELINE_MARK_TIMER("nsCharsetAlias2:GetPreferred");
return mDelegate->Get(aKey, oResult);
}
//--------------------------------------------------------------
NS_IMETHODIMP nsCharsetAlias2::GetPreferred(const PRUnichar* aAlias, const PRUnichar** oResult)
{
// this method should be obsoleted
return NS_ERROR_NOT_IMPLEMENTED;
}
//--------------------------------------------------------------
NS_IMETHODIMP nsCharsetAlias2::GetPreferred(const char* aAlias, char* oResult, PRInt32 aBufLength)
{
// this method should be obsoleted
return NS_ERROR_NOT_IMPLEMENTED;
}
//--------------------------------------------------------------
NS_IMETHODIMP nsCharsetAlias2::Equals(const nsAString& aCharset1, const nsAString& aCharset2, PRBool* oResult)
{
nsresult res = NS_OK;
if(aCharset1.Equals(aCharset2, nsCaseInsensitiveStringComparator())) {
*oResult = PR_TRUE;
return res;
}
if(aCharset1.IsEmpty() || aCharset2.IsEmpty()) {
*oResult = PR_FALSE;
return res;
}
*oResult = PR_FALSE;
nsString name1;
nsString name2;
res = this->GetPreferred(aCharset1, name1);
if(NS_SUCCEEDED(res)) {
res = this->GetPreferred(aCharset2, name2);
if(NS_SUCCEEDED(res)) {
*oResult = name1.Equals(name2, nsCaseInsensitiveStringComparator());
}
}
return res;
}
//--------------------------------------------------------------
NS_IMETHODIMP nsCharsetAlias2::Equals(const PRUnichar* aCharset1, const PRUnichar* aCharset2, PRBool* oResult)
{
// this method should be obsoleted
return NS_ERROR_NOT_IMPLEMENTED;
}
//--------------------------------------------------------------
NS_IMETHODIMP nsCharsetAlias2::Equals(const char* aCharset1, const char* aCharset2, PRBool* oResult)
{
// this method should be obsoleted
return NS_ERROR_NOT_IMPLEMENTED;
}

View File

@@ -0,0 +1,479 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* ***** BEGIN LICENSE BLOCK *****
* Version: NPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Netscape Public License
* Version 1.1 (the "License"); you may not use this file except in
* compliance with the License. You may obtain a copy of the License at
* http://www.mozilla.org/NPL/
*
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the
* License.
*
* The Original Code is Mozilla Communicator client code.
*
* The Initial Developer of the Original Code is
* Netscape Communications Corporation.
* Portions created by the Initial Developer are Copyright (C) 1998
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
* Pierre Phaneuf <pp@ludusdesign.com>
*
*
* Alternatively, the contents of this file may be used under the terms of
* either the GNU General Public License Version 2 or later (the "GPL"), or
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
* in which case the provisions of the GPL or the LGPL are applicable instead
* of those above. If you wish to allow use of your version of this file only
* under the terms of either the GPL or the LGPL, and not to allow others to
* use your version of this file under the terms of the NPL, indicate your
* decision by deleting the provisions above and replace them with the notice
* and other provisions required by the GPL or the LGPL. If you do not delete
* the provisions above, a recipient may use your version of this file under
* the terms of any one of the NPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
#include "nsCOMPtr.h"
#include "nsString.h"
#include "nsReadableUtils.h"
#include "nsUnicharUtils.h"
#include "nsICharsetAlias.h"
#include "nsIServiceManager.h"
#include "nsICategoryManager.h"
#include "nsICharsetConverterManager.h"
#include "nsICharsetConverterManager2.h"
#include "nsIStringBundle.h"
#include "nsILocaleService.h"
#include "nsUConvDll.h"
#include "prmem.h"
#include "nsCRT.h"
#include "nsISupportsPrimitives.h"
#include "nsICharsetDetector.h"
// just for CIDs
#include "nsIUnicodeDecodeHelper.h"
#include "nsIUnicodeEncodeHelper.h"
#include "nsCharsetConverterManager.h"
static NS_DEFINE_CID(kStringBundleServiceCID, NS_STRINGBUNDLESERVICE_CID);
static NS_DEFINE_CID(kLocaleServiceCID, NS_LOCALESERVICE_CID);
static NS_DEFINE_CID(kSupportsArrayCID, NS_SUPPORTSARRAY_CID);
// Pattern of cached, commonly used, single byte decoder
#define NS_1BYTE_CODER_PATTERN "ISO-8859"
#define NS_1BYTE_CODER_PATTERN_LEN 8
// Class nsCharsetConverterManager [implementation]
NS_IMPL_THREADSAFE_ISUPPORTS2(nsCharsetConverterManager,
nsICharsetConverterManager,
nsICharsetConverterManager2);
nsCharsetConverterManager::nsCharsetConverterManager()
:mDataBundle(NULL), mTitleBundle(NULL)
{
NS_INIT_REFCNT();
}
nsCharsetConverterManager::~nsCharsetConverterManager()
{
NS_IF_RELEASE(mDataBundle);
NS_IF_RELEASE(mTitleBundle);
}
nsresult nsCharsetConverterManager::RegisterConverterManagerData()
{
nsresult rv;
nsCOMPtr<nsICategoryManager> catman = do_GetService(NS_CATEGORYMANAGER_CONTRACTID, &rv);
if (NS_FAILED(rv)) return rv;
RegisterConverterCategory(catman, NS_TITLE_BUNDLE_CATEGORY,
"chrome://global/locale/charsetTitles.properties");
RegisterConverterCategory(catman, NS_DATA_BUNDLE_CATEGORY,
"resource:/res/charsetData.properties");
return NS_OK;
}
nsresult
nsCharsetConverterManager::RegisterConverterCategory(nsICategoryManager* catman,
const char* aCategory,
const char* aURL)
{
return catman->AddCategoryEntry(aCategory, aURL, "",
PR_TRUE, PR_TRUE, nsnull);
}
nsresult nsCharsetConverterManager::LoadExtensibleBundle(
const char* aCategory,
nsIStringBundle ** aResult)
{
nsresult res = NS_OK;
nsCOMPtr<nsIStringBundleService> sbServ =
do_GetService(kStringBundleServiceCID, &res);
if (NS_FAILED(res)) return res;
res = sbServ->CreateExtensibleBundle(aCategory, aResult);
if (NS_FAILED(res)) return res;
return res;
}
nsresult nsCharsetConverterManager::GetBundleValue(nsIStringBundle * aBundle,
const nsIAtom * aName,
const nsAFlatString& aProp,
PRUnichar ** aResult)
{
nsresult res = NS_OK;
nsAutoString key;
res = ((nsIAtom *) aName)->ToString(key);
if (NS_FAILED(res)) return res;
ToLowerCase(key); // we lowercase the main comparison key
if (!aProp.IsEmpty()) key.Append(aProp.get()); // yes, this param may be NULL
res = aBundle->GetStringFromName(key.get(), aResult);
return res;
}
nsresult nsCharsetConverterManager::GetBundleValue(nsIStringBundle * aBundle,
const nsIAtom * aName,
const nsAFlatString& aProp,
nsIAtom ** aResult)
{
nsresult res = NS_OK;
PRUnichar * value;
res = GetBundleValue(aBundle, aName, aProp, &value);
if (NS_FAILED(res)) return res;
*aResult = NS_NewAtom(value);
PR_Free(value);
return NS_OK;
}
//----------------------------------------------------------------------------
// Interface nsICharsetConverterManager [implementation]
NS_IMETHODIMP nsCharsetConverterManager::GetUnicodeEncoder(
const nsString * aDest,
nsIUnicodeEncoder ** aResult)
{
*aResult= nsnull;
nsresult res = NS_OK;
nsCAutoString contractid(
NS_LITERAL_CSTRING(NS_UNICODEENCODER_CONTRACTID_BASE) +
NS_LossyConvertUCS2toASCII(*aDest));
nsCOMPtr<nsIUnicodeEncoder> encoder;
// Always create an instance since encoders hold state.
encoder = do_CreateInstance(contractid.get(), &res);
if (NS_FAILED(res))
res = NS_ERROR_UCONV_NOCONV;
else
{
*aResult = encoder.get();
NS_ADDREF(*aResult);
}
return res;
}
NS_IMETHODIMP nsCharsetConverterManager::GetUnicodeDecoder(
const nsString * aSrc,
nsIUnicodeDecoder ** aResult)
{
*aResult= nsnull;
nsresult res = NS_OK;;
NS_NAMED_LITERAL_CSTRING(kUnicodeDecoderContractIDBase,
NS_UNICODEDECODER_CONTRACTID_BASE);
nsCAutoString contractid(kUnicodeDecoderContractIDBase +
NS_LossyConvertUCS2toASCII(*aSrc));
nsCOMPtr<nsIUnicodeDecoder> decoder;
if (!strncmp(contractid.get()+kUnicodeDecoderContractIDBase.Length(),
NS_1BYTE_CODER_PATTERN,
NS_1BYTE_CODER_PATTERN_LEN))
{
// Single byte decoders dont hold state. Optimize by using a service.
decoder = do_GetService(contractid.get(), &res);
}
else
{
decoder = do_CreateInstance(contractid.get(), &res);
}
if(NS_FAILED(res))
res = NS_ERROR_UCONV_NOCONV;
else
{
*aResult = decoder.get();
NS_ADDREF(*aResult);
}
return res;
}
NS_IMETHODIMP nsCharsetConverterManager::GetCharsetLangGroup(
nsString * aCharset,
nsIAtom ** aResult)
{
if (aCharset == NULL) return NS_ERROR_NULL_POINTER;
if (aResult == NULL) return NS_ERROR_NULL_POINTER;
*aResult = NULL;
nsCOMPtr<nsIAtom> atom;
nsresult res = GetCharsetAtom(aCharset->get(), getter_AddRefs(atom));
if (NS_FAILED(res)) return res;
res = GetCharsetLangGroup(atom, aResult);
return res;
}
NS_IMETHODIMP nsCharsetConverterManager::GetUnicodeDecoder(
const nsIAtom * aCharset,
nsIUnicodeDecoder ** aResult)
{
if (aCharset == NULL) return NS_ERROR_NULL_POINTER;
if (aResult == NULL) return NS_ERROR_NULL_POINTER;
*aResult = NULL;
// XXX use nsImmutableString
nsAutoString name;
NS_CONST_CAST(nsIAtom*, aCharset)->ToString(name);
return GetUnicodeDecoder(&name, aResult);
}
NS_IMETHODIMP nsCharsetConverterManager::GetUnicodeEncoder(
const nsIAtom * aCharset,
nsIUnicodeEncoder ** aResult)
{
if (aCharset == NULL) return NS_ERROR_NULL_POINTER;
if (aResult == NULL) return NS_ERROR_NULL_POINTER;
*aResult = NULL;
// XXX use nsImmutableString
nsAutoString name;
NS_CONST_CAST(nsIAtom*, aCharset)->ToString(name);
return GetUnicodeEncoder(&name, aResult);
}
nsresult
nsCharsetConverterManager::GetList(const nsACString& aCategory,
const nsACString& aPrefix,
nsISupportsArray** aResult)
{
if (aResult == NULL)
return NS_ERROR_NULL_POINTER;
*aResult = NULL;
nsresult rv;
nsCOMPtr<nsIAtom> atom;
nsCOMPtr<nsISupportsArray> array = do_CreateInstance(kSupportsArrayCID, &rv);
if (NS_FAILED(rv)) return rv;
nsCOMPtr<nsICategoryManager> catman = do_GetService(NS_CATEGORYMANAGER_CONTRACTID, &rv);
if (NS_FAILED(rv)) return rv;
nsCOMPtr<nsISimpleEnumerator> enumerator;
catman->EnumerateCategory(PromiseFlatCString(aCategory).get(),
getter_AddRefs(enumerator));
PRBool hasMore;
while (NS_SUCCEEDED(enumerator->HasMoreElements(&hasMore)) && hasMore) {
nsCOMPtr<nsISupports> supports;
if (NS_FAILED(enumerator->GetNext(getter_AddRefs(supports))))
continue;
nsCOMPtr<nsISupportsString> supStr = do_QueryInterface(supports);
if (!supStr)
continue;
nsCAutoString fullName(aPrefix);
nsXPIDLCString name;
if (NS_FAILED(supStr->GetData(getter_Copies(name))))
continue;
fullName += name;
rv = GetCharsetAtom2(fullName.get(), getter_AddRefs(atom));
if (NS_FAILED(rv))
continue;
rv = array->AppendElement(atom);
}
NS_ADDREF(*aResult = array);
return NS_OK;
}
// we should change the interface so that we can just pass back a enumerator!
NS_IMETHODIMP nsCharsetConverterManager::GetDecoderList(nsISupportsArray ** aResult)
{
return GetList(NS_LITERAL_CSTRING(NS_UNICODEDECODER_NAME),
NS_LITERAL_CSTRING(""), aResult);
}
NS_IMETHODIMP nsCharsetConverterManager::GetEncoderList(
nsISupportsArray ** aResult)
{
return GetList(NS_LITERAL_CSTRING(NS_UNICODEENCODER_NAME),
NS_LITERAL_CSTRING(""), aResult);
}
NS_IMETHODIMP nsCharsetConverterManager::GetCharsetDetectorList(
nsISupportsArray ** aResult)
{
if (aResult == NULL) return NS_ERROR_NULL_POINTER;
*aResult = NULL;
return GetList(NS_LITERAL_CSTRING(NS_CHARSET_DETECTOR_CATEGORY),
NS_LITERAL_CSTRING("chardet."), aResult);
}
// XXX Improve the implementation of this method. Right now, it is build on
// top of two things: the nsCharsetAlias service and the Atom engine. We can
// improve on both. First, make the nsCharsetAlias better, with its own hash
// table (not the StringBundle anymore) and a nicer file format. Second,
// reimplement the Atom engine for the specific Charset case - more optimal.
// Finally, unify the two for even better performance.
NS_IMETHODIMP nsCharsetConverterManager::GetCharsetAtom(
const PRUnichar * aCharset,
nsIAtom ** aResult)
{
NS_PRECONDITION(aCharset && aResult, "null param");
if (!aCharset)
return NS_ERROR_NULL_POINTER;
// We try to obtain the preferred name for this charset from the charset
// aliases. If we don't get it from there, we just use the original string
nsDependentString charset(aCharset);
nsCOMPtr<nsICharsetAlias> csAlias( do_GetService(kCharsetAliasCID) );
NS_ASSERTION(csAlias, "failed to get the CharsetAlias service");
if (csAlias) {
nsAutoString pref;
nsresult res = csAlias->GetPreferred(charset, pref);
if (NS_SUCCEEDED(res)) {
*aResult = NS_NewAtom(pref);
return *aResult ? NS_OK : NS_ERROR_OUT_OF_MEMORY;
}
}
*aResult = NS_NewAtom(charset);
return *aResult ? NS_OK : NS_ERROR_OUT_OF_MEMORY;
}
NS_IMETHODIMP nsCharsetConverterManager::GetCharsetAtom2(
const char * aCharset,
nsIAtom ** aResult)
{
nsAutoString str;
str.AssignWithConversion(aCharset);
return GetCharsetAtom(str.get(), aResult);
}
NS_IMETHODIMP nsCharsetConverterManager::GetCharsetTitle(
const nsIAtom * aCharset,
PRUnichar ** aResult)
{
if (aCharset == NULL) return NS_ERROR_NULL_POINTER;
if (aResult == NULL) return NS_ERROR_NULL_POINTER;
*aResult = NULL;
nsresult res = NS_OK;
if (mTitleBundle == NULL) {
res = LoadExtensibleBundle(NS_TITLE_BUNDLE_CATEGORY, &mTitleBundle);
if (NS_FAILED(res)) return res;
}
res = GetBundleValue(mTitleBundle, aCharset, NS_LITERAL_STRING(".title"), aResult);
return res;
}
NS_IMETHODIMP nsCharsetConverterManager::GetCharsetTitle2(
const nsIAtom * aCharset,
nsString * aResult)
{
if (aResult == NULL) return NS_ERROR_NULL_POINTER;
nsresult res = NS_OK;
PRUnichar * title;
res = GetCharsetTitle(aCharset, &title);
if (NS_FAILED(res)) return res;
aResult->Assign(title);
PR_Free(title);
return res;
}
NS_IMETHODIMP nsCharsetConverterManager::GetCharsetData(
const nsIAtom * aCharset,
const PRUnichar * aProp,
PRUnichar ** aResult)
{
if (aCharset == NULL) return NS_ERROR_NULL_POINTER;
// aProp can be NULL
if (aResult == NULL) return NS_ERROR_NULL_POINTER;
*aResult = NULL;
nsresult res = NS_OK;
if (mDataBundle == NULL) {
res = LoadExtensibleBundle(NS_DATA_BUNDLE_CATEGORY, &mDataBundle);
if (NS_FAILED(res)) return res;
}
res = GetBundleValue(mDataBundle, aCharset, nsDependentString(aProp), aResult);
return res;
}
NS_IMETHODIMP nsCharsetConverterManager::GetCharsetData2(
const nsIAtom * aCharset,
const PRUnichar * aProp,
nsString * aResult)
{
if (aResult == NULL) return NS_ERROR_NULL_POINTER;
nsresult res = NS_OK;
PRUnichar * data;
res = GetCharsetData(aCharset, aProp, &data);
if (NS_FAILED(res)) return res;
aResult->Assign(data);
PR_Free(data);
return res;
}
NS_IMETHODIMP nsCharsetConverterManager::GetCharsetLangGroup(
const nsIAtom * aCharset,
nsIAtom ** aResult)
{
if (aCharset == NULL) return NS_ERROR_NULL_POINTER;
if (aResult == NULL) return NS_ERROR_NULL_POINTER;
*aResult = NULL;
nsresult res = NS_OK;
if (mDataBundle == NULL) {
res = LoadExtensibleBundle(NS_DATA_BUNDLE_CATEGORY, &mDataBundle);
if (NS_FAILED(res)) return res;
}
res = GetBundleValue(mDataBundle, aCharset, NS_LITERAL_STRING(".LangGroup"), aResult);
return res;
}

View File

@@ -0,0 +1,91 @@
/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* ***** BEGIN LICENSE BLOCK *****
* Version: NPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Netscape Public License
* Version 1.1 (the "License"); you may not use this file except in
* compliance with the License. You may obtain a copy of the License at
* http://www.mozilla.org/NPL/
*
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the
* License.
*
* The Original Code is mozilla.org code.
*
* The Initial Developer of the Original Code is
* Netscape Communications Corporation.
* Portions created by the Initial Developer are Copyright (C) 1998
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
*
*
* Alternatively, the contents of this file may be used under the terms of
* either the GNU General Public License Version 2 or later (the "GPL"), or
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
* in which case the provisions of the GPL or the LGPL are applicable instead
* of those above. If you wish to allow use of your version of this file only
* under the terms of either the GPL or the LGPL, and not to allow others to
* use your version of this file under the terms of the NPL, indicate your
* decision by deleting the provisions above and replace them with the notice
* and other provisions required by the GPL or the LGPL. If you do not delete
* the provisions above, a recipient may use your version of this file under
* the terms of any one of the NPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
#ifndef nsCharsetConverterManager_h__
#define nsCharsetConverterManager_h__
#include "nsISupports.h"
#include "nsICharsetConverterManager.h"
#include "nsIStringBundle.h"
#include "nsISupportsArray.h"
#include "nsIRegistry.h"
class nsCharsetConverterManager : public nsICharsetConverterManager,
public nsICharsetConverterManager2
{
NS_DECL_ISUPPORTS
NS_DECL_NSICHARSETCONVERTERMANAGER2
public:
nsCharsetConverterManager();
virtual ~nsCharsetConverterManager();
NS_IMETHOD GetUnicodeEncoder(const nsString * aDest,
nsIUnicodeEncoder ** aResult);
NS_IMETHOD GetUnicodeDecoder(const nsString * aSrc,
nsIUnicodeDecoder ** aResult);
NS_IMETHOD GetCharsetLangGroup(nsString * aCharset, nsIAtom ** aResult);
private:
nsIStringBundle * mDataBundle;
nsIStringBundle * mTitleBundle;
nsresult LoadExtensibleBundle(const char * aRegistryKey,
nsIStringBundle ** aResult);
static nsresult RegisterConverterCategory(nsICategoryManager*,
const char* aCategory,
const char* aURL);
nsresult GetBundleValue(nsIStringBundle * aBundle, const nsIAtom * aName,
const nsAFlatString& aProp, PRUnichar ** aResult);
nsresult GetBundleValue(nsIStringBundle * aBundle, const nsIAtom * aName,
const nsAFlatString& aProp, nsIAtom ** aResult);
nsresult GetList(const nsACString& aCategory,
const nsACString& aPrefix, nsISupportsArray** aResult);
public:
static nsresult RegisterConverterManagerData();
};
#endif // nsCharsetConverterManager_h__

View File

@@ -0,0 +1,153 @@
/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* ***** BEGIN LICENSE BLOCK *****
* Version: NPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Netscape Public License
* Version 1.1 (the "License"); you may not use this file except in
* compliance with the License. You may obtain a copy of the License at
* http://www.mozilla.org/NPL/
*
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the
* License.
*
* The Original Code is mozilla.org code.
*
* The Initial Developer of the Original Code is
* Netscape Communications Corporation.
* Portions created by the Initial Developer are Copyright (C) 1998
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
*
*
* Alternatively, the contents of this file may be used under the terms of
* either the GNU General Public License Version 2 or later (the "GPL"), or
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
* in which case the provisions of the GPL or the LGPL are applicable instead
* of those above. If you wish to allow use of your version of this file only
* under the terms of either the GPL or the LGPL, and not to allow others to
* use your version of this file under the terms of the NPL, indicate your
* decision by deleting the provisions above and replace them with the notice
* and other provisions required by the GPL or the LGPL. If you do not delete
* the provisions above, a recipient may use your version of this file under
* the terms of any one of the NPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
#include "nsConverterInputStream.h"
#include "nsICharsetConverterManager.h"
#include "nsIServiceManager.h"
#define CONVERTER_BUFFER_SIZE 8192
NS_IMPL_ISUPPORTS1(nsConverterInputStream, nsIConverterInputStream)
static NS_DEFINE_CID(kCharsetConverterManagerCID, NS_ICHARSETCONVERTERMANAGER_CID);
NS_IMETHODIMP
nsConverterInputStream::Init(nsIInputStream* aStream,
const PRUnichar *aCharset,
PRInt32 aBufferSize)
{
nsresult rv;
if (aBufferSize <=0) aBufferSize=CONVERTER_BUFFER_SIZE;
// get the decoder
nsCOMPtr<nsICharsetConverterManager> ccm =
do_GetService(kCharsetConverterManagerCID, &rv);
if (NS_FAILED(rv)) return nsnull;
nsAutoString charset;
if (aCharset)
charset.Assign(aCharset);
else
charset.Assign(NS_LITERAL_STRING("ISO-8859-1"));
rv = ccm->GetUnicodeDecoder(&charset, getter_AddRefs(mConverter));
if (NS_FAILED(rv)) return rv;
// set up our buffers
rv = NS_NewByteBuffer(getter_AddRefs(mByteData), nsnull, aBufferSize);
if (NS_FAILED(rv)) return rv;
rv = NS_NewUnicharBuffer(getter_AddRefs(mUnicharData), nsnull, aBufferSize);
if (NS_FAILED(rv)) return rv;
mInput = aStream;
return NS_OK;
}
NS_IMETHODIMP
nsConverterInputStream::Close()
{
mInput = nsnull;
mConverter = nsnull;
mByteData = nsnull;
mUnicharData = nsnull;
return NS_OK;
}
NS_IMETHODIMP
nsConverterInputStream::Read(PRUnichar* aBuf,
PRUint32 aOffset,
PRUint32 aCount,
PRUint32 *aReadCount)
{
NS_ASSERTION(mUnicharDataLength >= mUnicharDataOffset, "unsigned madness");
PRUint32 rv = mUnicharDataLength - mUnicharDataOffset;
nsresult errorCode;
if (0 == rv) {
// Fill the unichar buffer
rv = Fill(&errorCode);
if (rv <= 0) {
*aReadCount = 0;
return errorCode;
}
}
if (rv > aCount) {
rv = aCount;
}
memcpy(aBuf + aOffset, mUnicharData->GetBuffer() + mUnicharDataOffset,
rv * sizeof(PRUnichar));
mUnicharDataOffset += rv;
*aReadCount = rv;
return NS_OK;
}
PRInt32
nsConverterInputStream::Fill(nsresult * aErrorCode)
{
if (nsnull == mInput) {
// We already closed the stream!
*aErrorCode = NS_BASE_STREAM_CLOSED;
return -1;
}
NS_ASSERTION(mByteData->GetLength() >= mByteDataOffset, "unsigned madness");
PRUint32 remainder = mByteData->GetLength() - mByteDataOffset;
mByteDataOffset = remainder;
PRInt32 nb = mByteData->Fill(aErrorCode, mInput, remainder);
if (nb <= 0) {
// Because we assume a many to one conversion, the lingering data
// in the byte buffer must be a partial conversion
// fragment. Because we know that we have recieved no more new
// data to add to it, we can't convert it. Therefore, we discard
// it.
return nb;
}
NS_ASSERTION(remainder + nb == mByteData->GetLength(), "bad nb");
// Now convert as much of the byte buffer to unicode as possible
PRInt32 dstLen = mUnicharData->GetBufferSize();
PRInt32 srcLen = remainder + nb;
*aErrorCode = mConverter->Convert(mByteData->GetBuffer(), &srcLen,
mUnicharData->GetBuffer(), &dstLen);
mUnicharDataOffset = 0;
mUnicharDataLength = dstLen;
mByteDataOffset += srcLen;
return dstLen;
}

View File

@@ -0,0 +1,89 @@
/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* ***** BEGIN LICENSE BLOCK *****
* Version: NPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Netscape Public License
* Version 1.1 (the "License"); you may not use this file except in
* compliance with the License. You may obtain a copy of the License at
* http://www.mozilla.org/NPL/
*
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the
* License.
*
* The Original Code is mozilla.org code.
*
* The Initial Developer of the Original Code is
* Netscape Communications Corporation.
* Portions created by the Initial Developer are Copyright (C) 1998
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
*
*
* Alternatively, the contents of this file may be used under the terms of
* either the GNU General Public License Version 2 or later (the "GPL"), or
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
* in which case the provisions of the GPL or the LGPL are applicable instead
* of those above. If you wish to allow use of your version of this file only
* under the terms of either the GPL or the LGPL, and not to allow others to
* use your version of this file under the terms of the NPL, indicate your
* decision by deleting the provisions above and replace them with the notice
* and other provisions required by the GPL or the LGPL. If you do not delete
* the provisions above, a recipient may use your version of this file under
* the terms of any one of the NPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
#include "nsIConverterInputStream.h"
#include "nsString.h"
#include "nsCOMPtr.h"
#include "nsIUnicodeDecoder.h"
#include "nsIByteBuffer.h"
#include "nsIUnicharBuffer.h"
#define NS_CONVERTERINPUTSTREAM_CONTRACTID "@mozilla.org/intl/converter-input-stream;1"
// {2BC2AD62-AD5D-4b7b-A9DB-F74AE203C527}
#define NS_CONVERTERINPUTSTREAM_CID \
{ 0x2bc2ad62, 0xad5d, 0x4b7b, \
{ 0xa9, 0xdb, 0xf7, 0x4a, 0xe2, 0x3, 0xc5, 0x27 } }
class nsConverterInputStream : nsIConverterInputStream {
public:
NS_DECL_ISUPPORTS
NS_IMETHOD Read(PRUnichar* aBuf,
PRUint32 aOffset,
PRUint32 aCount,
PRUint32 *aReadCount);
NS_IMETHOD Close();
NS_IMETHOD Init(nsIInputStream* aStream, const PRUnichar *aCharset,
PRInt32 aBufferSize);
nsConverterInputStream() :
mByteDataOffset(0),
mUnicharDataOffset(0),
mUnicharDataLength(0) { NS_INIT_REFCNT(); }
virtual ~nsConverterInputStream() {}
private:
PRInt32 Fill(nsresult *aErrorCode);
nsCOMPtr<nsIUnicodeDecoder> mConverter;
nsCOMPtr<nsIByteBuffer> mByteData;
nsCOMPtr<nsIUnicharBuffer> mUnicharData;
nsCOMPtr<nsIInputStream> mInput;
PRUint32 mByteDataOffset;
PRUint32 mUnicharDataOffset;
PRUint32 mUnicharDataLength;
};

View File

@@ -0,0 +1,62 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* ***** BEGIN LICENSE BLOCK *****
* Version: NPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Netscape Public License
* Version 1.1 (the "License"); you may not use this file except in
* compliance with the License. You may obtain a copy of the License at
* http://www.mozilla.org/NPL/
*
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the
* License.
*
* The Original Code is Mozilla Communicator client code.
*
* The Initial Developer of the Original Code is
* Netscape Communications Corporation.
* Portions created by the Initial Developer are Copyright (C) 1998
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
*
*
* Alternatively, the contents of this file may be used under the terms of
* either the GNU General Public License Version 2 or later (the "GPL"), or
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
* in which case the provisions of the GPL or the LGPL are applicable instead
* of those above. If you wish to allow use of your version of this file only
* under the terms of either the GPL or the LGPL, and not to allow others to
* use your version of this file under the terms of the NPL, indicate your
* decision by deleting the provisions above and replace them with the notice
* and other provisions required by the GPL or the LGPL. If you do not delete
* the provisions above, a recipient may use your version of this file under
* the terms of any one of the NPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
#include "nsUCSupport.h"
#include "nsISO88591ToUnicode.h"
//----------------------------------------------------------------------
// Global functions and data [declaration]
static const PRUint16 g_utMappingTable[] = {
#include "cp1252.ut"
};
static const PRInt16 g_utShiftTable[] = {
0, u1ByteCharset ,
ShiftCell(0,0,0,0,0,0,0,0)
};
//----------------------------------------------------------------------
// Class nsISO88591ToUnicode [implementation]
nsISO88591ToUnicode::nsISO88591ToUnicode()
: nsOneByteDecoderSupport((uShiftTable*) &g_utShiftTable,
(uMappingTable*) &g_utMappingTable)
{
}

View File

@@ -0,0 +1,69 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* ***** BEGIN LICENSE BLOCK *****
* Version: NPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Netscape Public License
* Version 1.1 (the "License"); you may not use this file except in
* compliance with the License. You may obtain a copy of the License at
* http://www.mozilla.org/NPL/
*
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the
* License.
*
* The Original Code is Mozilla Communicator client code.
*
* The Initial Developer of the Original Code is
* Netscape Communications Corporation.
* Portions created by the Initial Developer are Copyright (C) 1998
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
*
*
* Alternatively, the contents of this file may be used under the terms of
* either the GNU General Public License Version 2 or later (the "GPL"), or
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
* in which case the provisions of the GPL or the LGPL are applicable instead
* of those above. If you wish to allow use of your version of this file only
* under the terms of either the GPL or the LGPL, and not to allow others to
* use your version of this file under the terms of the NPL, indicate your
* decision by deleting the provisions above and replace them with the notice
* and other provisions required by the GPL or the LGPL. If you do not delete
* the provisions above, a recipient may use your version of this file under
* the terms of any one of the NPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
#ifndef nsISO88591ToUnicode_h___
#define nsISO88591ToUnicode_h___
// Class ID for our ISO88591ToUnicode charset converter
// {A3254CB0-8E20-11d2-8A98-00600811A836}
#define NS_ISO88591TOUNICODE_CID \
{ 0xa3254cb0, 0x8e20, 0x11d2, {0x8a, 0x98, 0x0, 0x60, 0x8, 0x11, 0xa8, 0x36}}
#define NS_ISO88591TOUNICODE_CONTRACTID "@mozilla.org/intl/unicode/decoder;1?charset=ISO-8859-1"
//----------------------------------------------------------------------
// Class nsISO88591ToUnicode [declaration]
/**
* A character set converter from ISO88591 to Unicode.
*
* @created 23/Nov/1998
* @author Catalin Rotaru [CATA]
*/
class nsISO88591ToUnicode : public nsOneByteDecoderSupport
{
public:
/**
* Class constructor.
*/
nsISO88591ToUnicode();
};
#endif /* nsISO88591ToUnicode_h___ */

View File

@@ -0,0 +1,195 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* ***** BEGIN LICENSE BLOCK *****
* Version: NPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Netscape Public License
* Version 1.1 (the "License"); you may not use this file except in
* compliance with the License. You may obtain a copy of the License at
* http://www.mozilla.org/NPL/
*
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the
* License.
*
* The Original Code is Mozilla Communicator client code.
*
* The Initial Developer of the Original Code is
* Netscape Communications Corporation.
* Portions created by the Initial Developer are Copyright (C) 1998
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
*
*
* Alternatively, the contents of this file may be used under the terms of
* either the GNU General Public License Version 2 or later (the "GPL"), or
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
* in which case the provisions of the GPL or the LGPL are applicable instead
* of those above. If you wish to allow use of your version of this file only
* under the terms of either the GPL or the LGPL, and not to allow others to
* use your version of this file under the terms of the NPL, indicate your
* decision by deleting the provisions above and replace them with the notice
* and other provisions required by the GPL or the LGPL. If you do not delete
* the provisions above, a recipient may use your version of this file under
* the terms of any one of the NPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
#include <Script.h>
#include <TextCommon.h>
#include "nsIPlatformCharset.h"
#include "pratom.h"
#include "nsURLProperties.h"
#include "nsUConvDll.h"
#include "nsCOMPtr.h"
#include "nsIComponentManager.h"
#include "nsIMacLocale.h"
#include "nsLocaleCID.h"
#include "nsReadableUtils.h"
#include "nsPlatformCharset.h"
static nsURLProperties *gInfo = nsnull;
static PRInt32 gCnt = 0;
NS_IMPL_ISUPPORTS1(nsPlatformCharset, nsIPlatformCharset);
nsPlatformCharset::nsPlatformCharset()
{
NS_INIT_REFCNT();
PR_AtomicIncrement(&gCnt);
}
nsPlatformCharset::~nsPlatformCharset()
{
PR_AtomicDecrement(&gCnt);
if((0 == gCnt) && (nsnull != gInfo)) {
delete gInfo;
gInfo = nsnull;
}
}
nsresult nsPlatformCharset::InitInfo()
{
// load the .property file if necessary
if (gInfo == nsnull) {
nsURLProperties *info = new nsURLProperties( NS_LITERAL_CSTRING("resource:/res/maccharset.properties") );
NS_ASSERTION(info , "cannot open properties file");
NS_ENSURE_TRUE(info, NS_ERROR_FAILURE);
gInfo = info;
}
return NS_OK;
}
nsresult nsPlatformCharset::MapToCharset(short script, short region, nsAString& outCharset)
{
switch (region) {
case verUS:
case verFrance:
case verGermany:
outCharset.Assign(NS_LITERAL_STRING("x-mac-roman"));
return NS_OK;
case verJapan:
outCharset.Assign(NS_LITERAL_STRING("Shift_JIS"));
return NS_OK;
}
// ensure the .property file is loaded
nsresult rv = InitInfo();
NS_ENSURE_SUCCESS(rv, rv);
// try mapping from region then from script
nsAutoString key(NS_LITERAL_STRING("region."));
key.AppendInt(region, 10);
rv = gInfo->Get(key, outCharset);
if (NS_FAILED(rv)) {
key.Assign(NS_LITERAL_STRING("script."));
key.AppendInt(script, 10);
rv = gInfo->Get(key, outCharset);
// not found in the .property file, assign x-mac-roman
if (NS_FAILED(rv)) {
outCharset.Assign(NS_LITERAL_STRING("x-mac-roman"));
}
}
return NS_OK;
}
NS_IMETHODIMP
nsPlatformCharset::GetCharset(nsPlatformCharsetSel selector, nsAString& oResult)
{
nsresult rv;
if (mCharset.IsEmpty()) {
rv = MapToCharset(
(short)(0x0000FFFF & ::GetScriptManagerVariable(smSysScript)),
(short)(0x0000FFFF & ::GetScriptManagerVariable(smRegionCode)),
mCharset);
NS_ENSURE_SUCCESS(rv, rv);
}
switch (selector) {
case kPlatformCharsetSel_KeyboardInput:
rv = MapToCharset(
(short) (0x0000FFFF & ::GetScriptManagerVariable(smKeyScript)),
kTextRegionDontCare, oResult);
NS_ENSURE_SUCCESS(rv, rv);
break;
default:
oResult = mCharset;
break;
}
return NS_OK;
}
NS_IMETHODIMP
nsPlatformCharset::GetDefaultCharsetForLocale(const PRUnichar* localeName, PRUnichar** _retValue)
{
nsCOMPtr<nsIMacLocale> pMacLocale;
nsAutoString localeAsString(localeName), charset(NS_LITERAL_STRING("x-mac-roman"));
short script, language, region;
nsresult rv;
pMacLocale = do_CreateInstance(NS_MACLOCALE_CONTRACTID, &rv);
if (NS_SUCCEEDED(rv)) {
rv = pMacLocale->GetPlatformLocale(&localeAsString, &script, &language, &region);
if (NS_SUCCEEDED(rv)) {
rv = MapToCharset(script, region, charset);
}
}
*_retValue = ToNewUnicode(charset);
NS_ENSURE_TRUE(*_retValue, NS_ERROR_OUT_OF_MEMORY);
return rv;
}
NS_IMETHODIMP
nsPlatformCharset::Init()
{
return NS_OK;
}
nsresult
nsPlatformCharset::MapToCharset(nsAString& inANSICodePage, nsAString& outCharset)
{
return NS_OK;
}
nsresult
nsPlatformCharset::InitGetCharset(nsAString &oString)
{
return NS_OK;
}
nsresult
nsPlatformCharset::ConvertLocaleToCharsetUsingDeprecatedConfig(nsAutoString& locale, nsAString& oResult)
{
return NS_OK;
}
nsresult
nsPlatformCharset::VerifyCharset(nsString &aCharset)
{
return NS_OK;
}

View File

@@ -0,0 +1,62 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* ***** BEGIN LICENSE BLOCK *****
* Version: NPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Netscape Public License
* Version 1.1 (the "License"); you may not use this file except in
* compliance with the License. You may obtain a copy of the License at
* http://www.mozilla.org/NPL/
*
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the
* License.
*
* The Original Code is Mozilla Communicator client code.
*
* The Initial Developer of the Original Code is
* Netscape Communications Corporation.
* Portions created by the Initial Developer are Copyright (C) 1998
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
*
*
* Alternatively, the contents of this file may be used under the terms of
* either the GNU General Public License Version 2 or later (the "GPL"), or
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
* in which case the provisions of the GPL or the LGPL are applicable instead
* of those above. If you wish to allow use of your version of this file only
* under the terms of either the GPL or the LGPL, and not to allow others to
* use your version of this file under the terms of the NPL, indicate your
* decision by deleting the provisions above and replace them with the notice
* and other provisions required by the GPL or the LGPL. If you do not delete
* the provisions above, a recipient may use your version of this file under
* the terms of any one of the NPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
#include "nsUCSupport.h"
#include "nsMacRomanToUnicode.h"
//----------------------------------------------------------------------
// Global functions and data [declaration]
static const PRUint16 g_MacRomanMappingTable[] = {
#include "macroman.ut"
};
static const PRInt16 g_MacRomanShiftTable[] = {
1, u1ByteCharset ,
ShiftCell(0,0,0,0,0,0,0,0)
};
//----------------------------------------------------------------------
// Class nsMacRomanToUnicode [implementation]
nsMacRomanToUnicode::nsMacRomanToUnicode()
: nsTableDecoderSupport((uShiftTable*) &g_MacRomanShiftTable,
(uMappingTable*) &g_MacRomanMappingTable, 1)
{
}

View File

@@ -0,0 +1,74 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* ***** BEGIN LICENSE BLOCK *****
* Version: NPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Netscape Public License
* Version 1.1 (the "License"); you may not use this file except in
* compliance with the License. You may obtain a copy of the License at
* http://www.mozilla.org/NPL/
*
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the
* License.
*
* The Original Code is Mozilla Communicator client code.
*
* The Initial Developer of the Original Code is
* Netscape Communications Corporation.
* Portions created by the Initial Developer are Copyright (C) 1998
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
*
*
* Alternatively, the contents of this file may be used under the terms of
* either the GNU General Public License Version 2 or later (the "GPL"), or
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
* in which case the provisions of the GPL or the LGPL are applicable instead
* of those above. If you wish to allow use of your version of this file only
* under the terms of either the GPL or the LGPL, and not to allow others to
* use your version of this file under the terms of the NPL, indicate your
* decision by deleting the provisions above and replace them with the notice
* and other provisions required by the GPL or the LGPL. If you do not delete
* the provisions above, a recipient may use your version of this file under
* the terms of any one of the NPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
#ifndef nsMacRomanToUnicode_h___
#define nsMacRomanToUnicode_h___
// Class ID for our MacRomanToUnicode charset converter
// {7B8556A1-EC79-11d2-8AAC-00600811A836}
#define NS_MACROMANTOUNICODE_CID \
{ 0x7b8556a1, 0xec79, 0x11d2, {0x8a, 0xac, 0x0, 0x60, 0x8, 0x11, 0xa8, 0x36}}
#define NS_MACROMANTOUNICODE_CONTRACTID "@mozilla.org/intl/unicode/decoder;1?charset=x-mac-roman"
//#define NS_ERROR_UCONV_NOMACROMANTOUNICODE
// NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_UCONV, 0x31)
//----------------------------------------------------------------------
// Class nsMacRomanToUnicode [declaration]
/**
* A character set converter from MacRoman to Unicode.
*
* @created 05/Apr/1999
* @author Catalin Rotaru [CATA]
*/
class nsMacRomanToUnicode : public nsTableDecoderSupport
{
public:
/**
* Class constructor.
*/
nsMacRomanToUnicode();
protected:
};
#endif /* nsMacRomanToUnicode_h___ */

View File

@@ -0,0 +1,81 @@
/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* ***** BEGIN LICENSE BLOCK *****
* Version: NPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Netscape Public License
* Version 1.1 (the "License"); you may not use this file except in
* compliance with the License. You may obtain a copy of the License at
* http://www.mozilla.org/NPL/
*
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the
* License.
*
* The Original Code is mozilla.org code.
*
* The Initial Developer of the Original Code is
* Netscape Communications Corporation.
* Portions created by the Initial Developer are Copyright (C) 1999
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
*
*
* Alternatively, the contents of this file may be used under the terms of
* either the GNU General Public License Version 2 or later (the "GPL"), or
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
* in which case the provisions of the GPL or the LGPL are applicable instead
* of those above. If you wish to allow use of your version of this file only
* under the terms of either the GPL or the LGPL, and not to allow others to
* use your version of this file under the terms of the NPL, indicate your
* decision by deleting the provisions above and replace them with the notice
* and other provisions required by the GPL or the LGPL. If you do not delete
* the provisions above, a recipient may use your version of this file under
* the terms of any one of the NPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
#include "nsMappingCache.h"
typedef struct {
PRInt16 mask;
PRInt16 reserved;
PRUint32 data[1] ;
} nsMappingCacheBase;
typedef struct {
PRInt16 mask;
PRInt16 reserved;
PRUint32 data[64] ;
} nsMappingCache64;
typedef struct {
PRInt16 mask;
PRInt16 reserved;
PRUint32 data[128] ;
} nsMappingCache128;
typedef struct {
PRInt16 mask;
PRInt16 reserved;
PRUint32 data[256] ;
} nsMappingCache256;
typedef struct {
PRInt16 mask;
PRInt16 reserved;
PRUint32 data[512] ;
} nsMappingCache512;
nsresult nsMappingCache::CreateCache(nsMappingCacheType aType, nsIMappingCache* aResult)
{
// to be implemented
return NS_OK;
}
nsresult nsMappingCache::DestroyCache(nsIMappingCache aCache)
{
// to be implemented
return NS_OK;
}

View File

@@ -0,0 +1,59 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* ***** BEGIN LICENSE BLOCK *****
* Version: NPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Netscape Public License
* Version 1.1 (the "License"); you may not use this file except in
* compliance with the License. You may obtain a copy of the License at
* http://www.mozilla.org/NPL/
*
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the
* License.
*
* The Original Code is Mozilla Communicator client code.
*
* The Initial Developer of the Original Code is
* Netscape Communications Corporation.
* Portions created by the Initial Developer are Copyright (C) 1998
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
*
*
* Alternatively, the contents of this file may be used under the terms of
* either the GNU General Public License Version 2 or later (the "GPL"), or
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
* in which case the provisions of the GPL or the LGPL are applicable instead
* of those above. If you wish to allow use of your version of this file only
* under the terms of either the GPL or the LGPL, and not to allow others to
* use your version of this file under the terms of the NPL, indicate your
* decision by deleting the provisions above and replace them with the notice
* and other provisions required by the GPL or the LGPL. If you do not delete
* the provisions above, a recipient may use your version of this file under
* the terms of any one of the NPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
#ifndef nsMappingCache_h__
#define nsMappingCache_h__
#include "nsIMappingCache.h"
#include "nsError.h"
class nsMappingCache {
public:
/**
* Create a Mapping Cache
*/
static nsresult CreateCache(nsMappingCacheType aType, nsIMappingCache* aResult);
/**
* Destroy a Mapping Cache
*/
static nsresult DestroyCache(nsIMappingCache aCache);
};
#endif /* nsMappingCache_h__ */

View File

@@ -0,0 +1,148 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
*
* The contents of this file are subject to the Mozilla Public
* License Version 1.1 (the "License"); you may not use this file
* except in compliance with the License. You may obtain a copy of
* the License at http://www.mozilla.org/MPL/
*
* Software distributed under the License is distributed on an "AS
* IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
* implied. See the License for the specific language governing
* rights and limitations under the License.
*
* The Original Code is Mozilla Communicator client code.
*
* The Initial Developer of the Original Code is Netscape Communications
* Corporation. Portions created by Netscape are
* Copyright (C) 1998 Netscape Communications Corporation. All
* Rights Reserved.
*
* Contributor(s):
* John Fairhurst
* Henry Sobotka
* IBM Corp.
*/
#include "nsIPlatformCharset.h"
#include "nsURLProperties.h"
#include "pratom.h"
#define INCL_PM
#include <os2.h>
#include "nsUConvDll.h"
#include "nsIOS2Locale.h"
#include "nsCOMPtr.h"
#include "nsLocaleCID.h"
#include "nsIComponentManager.h"
#include "nsPlatformCharset.h"
static nsURLProperties *gInfo = nsnull;
static PRInt32 gCnt= 0;
NS_IMPL_ISUPPORTS1(nsPlatformCharset, nsIPlatformCharset);
nsPlatformCharset::nsPlatformCharset()
{
NS_INIT_REFCNT();
PR_AtomicIncrement(&gCnt); // count for gInfo
// XXX We should make the following block critical section
if(nsnull == gInfo)
{
nsURLProperties *info = new nsURLProperties(NS_LITERAL_CSTRING("resource:/res/os2charset.properties"));
NS_ASSERTION( info , " cannot create nsURLProperties");
gInfo = info;
}
NS_ASSERTION(gInfo, "Cannot open property file");
if( gInfo )
{
UINT acp = ::WinQueryCp(HMQ_CURRENT);
PRInt32 acpint = (PRInt32)(acp & 0x00FFFF);
nsAutoString acpKey(NS_LITERAL_STRING("os2."));
acpKey.AppendInt(acpint, 10);
nsresult res = gInfo->Get(acpKey, mCharset);
if(NS_FAILED(res)) {
mCharset.Assign(NS_LITERAL_STRING("IBM850"));
}
} else {
mCharset.Assign(NS_LITERAL_STRING("IBM850"));
}
}
nsPlatformCharset::~nsPlatformCharset()
{
PR_AtomicDecrement(&gCnt);
if(0 == gCnt) {
delete gInfo;
gInfo = nsnull;
}
}
NS_IMETHODIMP
nsPlatformCharset::GetCharset(nsPlatformCharsetSel selector, nsAString& oResult)
{
if ((selector == kPlatformCharsetSel_4xBookmarkFile) || (selector == kPlatformCharsetSel_4xPrefsJS)) {
if ((mCharset.Find("IBM850", IGNORE_CASE) != -1) || (mCharset.Find("IBM437", IGNORE_CASE) != -1))
oResult.Assign(NS_LITERAL_STRING("ISO-8859-1"));
else if (mCharset.Find("IBM852", IGNORE_CASE) != -1)
oResult.Assign(NS_LITERAL_STRING("windows-1250"));
else if ((mCharset.Find("IBM855", IGNORE_CASE) != -1) || (mCharset.Find("IBM866", IGNORE_CASE) != -1))
oResult.Assign(NS_LITERAL_STRING("windows-1251"));
else if ((mCharset.Find("IBM869", IGNORE_CASE) != -1) || (mCharset.Find("IBM813", IGNORE_CASE) != -1))
oResult.Assign(NS_LITERAL_STRING("windows-1253"));
else if (mCharset.Find("IBM857", IGNORE_CASE) != -1)
oResult.Assign(NS_LITERAL_STRING("windows-1254"));
else
oResult = mCharset;
} else {
oResult = mCharset;
}
return NS_OK;
}
NS_IMETHODIMP
nsPlatformCharset::GetDefaultCharsetForLocale(const PRUnichar* localeName, PRUnichar** _retValue)
{
return NS_OK;
}
NS_IMETHODIMP
nsPlatformCharset::Init()
{
return NS_OK;
}
nsresult
nsPlatformCharset::MapToCharset(short script, short region, nsAString& outCharset)
{
return NS_OK;
}
nsresult
nsPlatformCharset::MapToCharset(nsAString& inANSICodePage, nsAString& outCharset)
{
return NS_OK;
}
nsresult
nsPlatformCharset::InitGetCharset(nsAString &oString)
{
return NS_OK;
}
nsresult
nsPlatformCharset::ConvertLocaleToCharsetUsingDeprecatedConfig(nsAutoString& locale, nsAString& oResult)
{
return NS_OK;
}
nsresult
nsPlatformCharset::VerifyCharset(nsString &aCharset)
{
return NS_OK;
}
nsresult
nsPlatformCharset::InitInfo()
{
return NS_OK;
}

View File

@@ -0,0 +1,70 @@
/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* ***** BEGIN LICENSE BLOCK *****
* Version: NPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Netscape Public License
* Version 1.1 (the "License"); you may not use this file except in
* compliance with the License. You may obtain a copy of the License at
* http://www.mozilla.org/NPL/
*
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the
* License.
*
* The Original Code is mozilla.org code.
*
* The Initial Developer of the Original Code is
* Netscape Communications Corporation.
* Portions created by the Initial Developer are Copyright (C) 1998
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
*
*
* Alternatively, the contents of this file may be used under the terms of
* either the GNU General Public License Version 2 or later (the "GPL"), or
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
* in which case the provisions of the GPL or the LGPL are applicable instead
* of those above. If you wish to allow use of your version of this file only
* under the terms of either the GPL or the LGPL, and not to allow others to
* use your version of this file under the terms of the NPL, indicate your
* decision by deleting the provisions above and replace them with the notice
* and other provisions required by the GPL or the LGPL. If you do not delete
* the provisions above, a recipient may use your version of this file under
* the terms of any one of the NPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
#ifndef nsPlatformCharset_h__
#define nsPlatformCharset_h__
#include "nsIPlatformCharset.h"
class nsPlatformCharset : public nsIPlatformCharset
{
NS_DECL_ISUPPORTS
public:
nsPlatformCharset();
virtual ~nsPlatformCharset();
NS_IMETHOD Init();
NS_IMETHOD GetCharset(nsPlatformCharsetSel selector, nsAString& oResult);
NS_IMETHOD GetDefaultCharsetForLocale(const PRUnichar* localeName, PRUnichar** _retValue);
private:
nsString mCharset;
nsString mLocale; // remember the locale & charset
nsresult InitInfo();
nsresult MapToCharset(short script, short region, nsAString& outCharset);
nsresult MapToCharset(nsAString& inANSICodePage, nsAString& outCharset);
nsresult InitGetCharset(nsAString& oString);
nsresult ConvertLocaleToCharsetUsingDeprecatedConfig(nsAutoString& locale, nsAString& oResult);
nsresult VerifyCharset(nsString &aCharset);
};
#endif // nsPlatformCharset_h__

View File

@@ -0,0 +1,172 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* ***** BEGIN LICENSE BLOCK *****
* Version: NPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Netscape Public License
* Version 1.1 (the "License"); you may not use this file except in
* compliance with the License. You may obtain a copy of the License at
* http://www.mozilla.org/NPL/
*
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the
* License.
*
* The Original Code is Mozilla Communicator client code.
*
* The Initial Developer of the Original Code is
* Netscape Communications Corporation.
* Portions created by the Initial Developer are Copyright (C) 1998
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
* Makoto Kato <m_kato@ga2.so-net.ne.jp >
* Ryoichi Furukawa <oliver@1000cp.com>
*
*
* Alternatively, the contents of this file may be used under the terms of
* either the GNU General Public License Version 2 or later (the "GPL"), or
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
* in which case the provisions of the GPL or the LGPL are applicable instead
* of those above. If you wish to allow use of your version of this file only
* under the terms of either the GPL or the LGPL, and not to allow others to
* use your version of this file under the terms of the NPL, indicate your
* decision by deleting the provisions above and replace them with the notice
* and other provisions required by the GPL or the LGPL. If you do not delete
* the provisions above, a recipient may use your version of this file under
* the terms of any one of the NPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
#include "pratom.h"
#include "nsString.h"
#include "nsReadableUtils.h"
#include "nsIServiceManager.h"
#include "nsICharsetConverterManager.h"
#include "nsICharsetConverterManager2.h"
#include "nsIScriptableUConv.h"
#include "nsScriptableUConv.h"
#include "nsCRT.h"
#include "nsIPlatformCharset.h"
static NS_DEFINE_CID(kIScriptableUnicodeConverterCID, NS_ISCRIPTABLEUNICODECONVERTER_CID);
static NS_DEFINE_CID(kCharsetConverterManagerCID, NS_ICHARSETCONVERTERMANAGER_CID);
static PRInt32 gInstanceCount = 0;
/* Implementation file */
NS_IMPL_ISUPPORTS1(nsScriptableUnicodeConverter, nsIScriptableUnicodeConverter)
nsScriptableUnicodeConverter::nsScriptableUnicodeConverter()
{
NS_INIT_REFCNT();
PR_AtomicIncrement(&gInstanceCount);
}
nsScriptableUnicodeConverter::~nsScriptableUnicodeConverter()
{
PR_AtomicDecrement(&gInstanceCount);
}
/* string ConvertFromUnicode ([const] in wstring src); */
NS_IMETHODIMP
nsScriptableUnicodeConverter::ConvertFromUnicode(const PRUnichar *aSrc, char **_retval)
{
if (!mEncoder)
return NS_ERROR_FAILURE;
nsresult rv = NS_OK;
PRInt32 inLength = nsCRT::strlen(aSrc);
PRInt32 outLength;
rv = mEncoder->GetMaxLength(aSrc, inLength, &outLength);
if (NS_SUCCEEDED(rv)) {
*_retval = (char*) nsMemory::Alloc(outLength+1);
if (!*_retval)
return NS_ERROR_OUT_OF_MEMORY;
rv = mEncoder->Convert(aSrc, &inLength, *_retval, &outLength);
if (NS_SUCCEEDED(rv))
{
(*_retval)[outLength] = '\0';
return NS_OK;
}
nsMemory::Free(*_retval);
}
*_retval = nsnull;
return NS_ERROR_FAILURE;
}
/* wstring ConvertToUnicode ([const] in string src); */
NS_IMETHODIMP
nsScriptableUnicodeConverter::ConvertToUnicode(const char *aSrc, PRUnichar **_retval)
{
if (!mDecoder)
return NS_ERROR_FAILURE;
nsresult rv = NS_OK;
PRInt32 inLength = strlen(aSrc);
PRInt32 outLength;
rv = mDecoder->GetMaxLength(aSrc, inLength, &outLength);
if (NS_SUCCEEDED(rv))
{
*_retval = (PRUnichar*) nsMemory::Alloc((outLength+1)*sizeof(PRUnichar));
if (!*_retval)
return NS_ERROR_OUT_OF_MEMORY;
rv = mDecoder->Convert(aSrc, &inLength, *_retval, &outLength);
if (NS_SUCCEEDED(rv))
{
(*_retval)[outLength] = 0;
return NS_OK;
}
nsMemory::Free(*_retval);
}
*_retval = nsnull;
return NS_ERROR_FAILURE;
}
/* attribute wstring charset; */
NS_IMETHODIMP
nsScriptableUnicodeConverter::GetCharset(PRUnichar * *aCharset)
{
*aCharset = ToNewUnicode(mCharset);
if (!*aCharset)
return NS_ERROR_OUT_OF_MEMORY;
return NS_OK;
}
NS_IMETHODIMP
nsScriptableUnicodeConverter::SetCharset(const PRUnichar * aCharset)
{
mCharset.Assign(aCharset);
return InitConverter();
}
nsresult
nsScriptableUnicodeConverter::InitConverter()
{
nsresult rv = NS_OK;
mEncoder = NULL ;
nsCOMPtr<nsICharsetConverterManager2> ccm2 = do_GetService(NS_CHARSETCONVERTERMANAGER_CONTRACTID, &rv);
if (NS_SUCCEEDED( rv) && (nsnull != ccm2)) {
// get charset atom due to getting unicode converter
nsCOMPtr <nsIAtom> charsetAtom;
rv = ccm2->GetCharsetAtom(mCharset.get(), getter_AddRefs(charsetAtom));
if (NS_SUCCEEDED(rv)) {
// get an unicode converter
rv = ccm2->GetUnicodeEncoder(charsetAtom, getter_AddRefs(mEncoder));
if(NS_SUCCEEDED(rv)) {
rv = mEncoder->SetOutputErrorBehavior(nsIUnicodeEncoder::kOnError_Replace, nsnull, (PRUnichar)'?');
if(NS_SUCCEEDED(rv)) {
rv = ccm2->GetUnicodeDecoder(charsetAtom, getter_AddRefs(mDecoder));
}
}
}
}
return rv ;
}

View File

@@ -0,0 +1,65 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* ***** BEGIN LICENSE BLOCK *****
* Version: NPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Netscape Public License
* Version 1.1 (the "License"); you may not use this file except in
* compliance with the License. You may obtain a copy of the License at
* http://www.mozilla.org/NPL/
*
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the
* License.
*
* The Original Code is Mozilla Communicator client code.
*
* The Initial Developer of the Original Code is
* Netscape Communications Corporation.
* Portions created by the Initial Developer are Copyright (C) 1998
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
* Makoto Kato <m_kato@ga2.so-net.ne.jp >
* Ryoichi Furukawa <oliver@1000cp.com>
*
*
* Alternatively, the contents of this file may be used under the terms of
* either the GNU General Public License Version 2 or later (the "GPL"), or
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
* in which case the provisions of the GPL or the LGPL are applicable instead
* of those above. If you wish to allow use of your version of this file only
* under the terms of either the GPL or the LGPL, and not to allow others to
* use your version of this file under the terms of the NPL, indicate your
* decision by deleting the provisions above and replace them with the notice
* and other provisions required by the GPL or the LGPL. If you do not delete
* the provisions above, a recipient may use your version of this file under
* the terms of any one of the NPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
#ifndef __nsScriptableUConv_h_
#define __nsScriptableUConv_h_
#include "nsICharsetConverterManager.h"
#include "nsIScriptableUConv.h"
class nsScriptableUnicodeConverter : public nsIScriptableUnicodeConverter
{
public:
NS_DECL_ISUPPORTS
NS_DECL_NSISCRIPTABLEUNICODECONVERTER
nsScriptableUnicodeConverter();
virtual ~nsScriptableUnicodeConverter();
protected:
nsAutoString mCharset;
nsCOMPtr<nsIUnicodeEncoder> mEncoder;
nsCOMPtr<nsIUnicodeDecoder> mDecoder;
nsresult InitConverter();
};
#endif

View File

@@ -0,0 +1,160 @@
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* ***** BEGIN LICENSE BLOCK *****
* Version: NPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Netscape Public License
* Version 1.1 (the "License"); you may not use this file except in
* compliance with the License. You may obtain a copy of the License at
* http://www.mozilla.org/NPL/
*
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the
* License.
*
* The Original Code is mozilla.org code.
*
* The Initial Developer of the Original Code is
* Netscape Communications Corporation.
* Portions created by the Initial Developer are Copyright (C) 1998
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
* Pierre Phaneuf <pp@ludusdesign.com>
*
*
* Alternatively, the contents of this file may be used under the terms of
* either the GNU General Public License Version 2 or later (the "GPL"), or
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
* in which case the provisions of the GPL or the LGPL are applicable instead
* of those above. If you wish to allow use of your version of this file only
* under the terms of either the GPL or the LGPL, and not to allow others to
* use your version of this file under the terms of the NPL, indicate your
* decision by deleting the provisions above and replace them with the notice
* and other provisions required by the GPL or the LGPL. If you do not delete
* the provisions above, a recipient may use your version of this file under
* the terms of any one of the NPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
#include "nsString.h"
#include "nsIUnicodeEncoder.h"
#include "nsICharsetConverterManager.h"
#include "nsITextToSubURI.h"
#include "nsIServiceManager.h"
#include "nsUConvDll.h"
#include "nsEscape.h"
#include "prmem.h"
#include "nsTextToSubURI.h"
#include "nsCRT.h"
static NS_DEFINE_CID(kITextToSubURIIID, NS_ITEXTTOSUBURI_IID);
static NS_DEFINE_CID(kCharsetConverterManagerCID, NS_ICHARSETCONVERTERMANAGER_CID);
nsTextToSubURI::nsTextToSubURI()
{
NS_INIT_REFCNT();
}
nsTextToSubURI::~nsTextToSubURI()
{
}
NS_IMPL_ISUPPORTS1(nsTextToSubURI, nsITextToSubURI)
NS_IMETHODIMP nsTextToSubURI::ConvertAndEscape(
const char *charset, const PRUnichar *text, char **_retval)
{
if(nsnull == _retval)
return NS_ERROR_NULL_POINTER;
*_retval = nsnull;
nsAutoString charsetStr; charsetStr.AssignWithConversion(charset);
nsIUnicodeEncoder *encoder = nsnull;
nsresult rv = NS_OK;
// Get Charset, get the encoder.
nsICharsetConverterManager * ccm = nsnull;
rv = nsServiceManager::GetService(kCharsetConverterManagerCID ,
NS_GET_IID(nsICharsetConverterManager),
(nsISupports**)&ccm);
if(NS_SUCCEEDED(rv) && (nsnull != ccm)) {
rv = ccm->GetUnicodeEncoder(&charsetStr, &encoder);
nsServiceManager::ReleaseService( kCharsetConverterManagerCID, ccm);
if (NS_SUCCEEDED(rv)) {
rv = encoder->SetOutputErrorBehavior(nsIUnicodeEncoder::kOnError_Replace, nsnull, (PRUnichar)'?');
if(NS_SUCCEEDED(rv))
{
char buf[256];
char *pBuf = buf;
PRInt32 ulen = nsCRT::strlen(text);
PRInt32 outlen = 0;
if(NS_SUCCEEDED(rv = encoder->GetMaxLength(text, ulen, &outlen)))
{
if(outlen >= 256) {
pBuf = (char*)PR_Malloc(outlen+1);
}
if(nsnull == pBuf) {
outlen = 255;
pBuf = buf;
}
if(NS_SUCCEEDED(rv = encoder->Convert(text,&ulen, pBuf, &outlen))) {
pBuf[outlen] = '\0';
*_retval = nsEscape(pBuf, url_XPAlphas);
if(nsnull == *_retval)
rv = NS_ERROR_OUT_OF_MEMORY;
}
}
if(pBuf != buf)
PR_Free(pBuf);
}
NS_IF_RELEASE(encoder);
}
}
return rv;
}
NS_IMETHODIMP nsTextToSubURI::UnEscapeAndConvert(
const char *charset, const char *text, PRUnichar **_retval)
{
if(nsnull == _retval)
return NS_ERROR_NULL_POINTER;
*_retval = nsnull;
nsresult rv = NS_OK;
// unescape the string, unescape changes the input
char *unescaped = nsCRT::strdup((char *) text);
if (nsnull == unescaped)
return NS_ERROR_OUT_OF_MEMORY;
unescaped = nsUnescape(unescaped);
NS_ASSERTION(unescaped, "nsUnescape returned null");
// Convert from the charset to unicode
nsCOMPtr<nsICharsetConverterManager> ccm =
do_GetService(kCharsetConverterManagerCID, &rv);
if (NS_SUCCEEDED(rv)) {
nsAutoString charsetStr; charsetStr.AssignWithConversion(charset);
nsIUnicodeDecoder *decoder;
rv = ccm->GetUnicodeDecoder(&charsetStr, &decoder);
if (NS_SUCCEEDED(rv)) {
PRUnichar *pBuf = nsnull;
PRInt32 len = strlen(unescaped);
PRInt32 outlen = 0;
if (NS_SUCCEEDED(rv = decoder->GetMaxLength(unescaped, len, &outlen))) {
pBuf = (PRUnichar *) PR_Malloc((outlen+1)*sizeof(PRUnichar*));
if (nsnull == pBuf)
rv = NS_ERROR_OUT_OF_MEMORY;
else {
if (NS_SUCCEEDED(rv = decoder->Convert(unescaped, &len, pBuf, &outlen))) {
pBuf[outlen] = 0;
*_retval = pBuf;
}
}
}
NS_IF_RELEASE(decoder);
}
}
PR_FREEIF(unescaped);
return rv;
}
//----------------------------------------------------------------------

View File

@@ -0,0 +1,54 @@
/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* ***** BEGIN LICENSE BLOCK *****
* Version: NPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Netscape Public License
* Version 1.1 (the "License"); you may not use this file except in
* compliance with the License. You may obtain a copy of the License at
* http://www.mozilla.org/NPL/
*
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the
* License.
*
* The Original Code is mozilla.org code.
*
* The Initial Developer of the Original Code is
* Netscape Communications Corporation.
* Portions created by the Initial Developer are Copyright (C) 1998
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
*
*
* Alternatively, the contents of this file may be used under the terms of
* either the GNU General Public License Version 2 or later (the "GPL"), or
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
* in which case the provisions of the GPL or the LGPL are applicable instead
* of those above. If you wish to allow use of your version of this file only
* under the terms of either the GPL or the LGPL, and not to allow others to
* use your version of this file under the terms of the NPL, indicate your
* decision by deleting the provisions above and replace them with the notice
* and other provisions required by the GPL or the LGPL. If you do not delete
* the provisions above, a recipient may use your version of this file under
* the terms of any one of the NPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
#ifndef nsTextToSubURI_h__
#define nsTextToSubURI_h__
#include "nsITextToSubURI.h"
//==============================================================
class nsTextToSubURI: public nsITextToSubURI {
NS_DECL_ISUPPORTS
NS_DECL_NSITEXTTOSUBURI
public:
nsTextToSubURI();
virtual ~nsTextToSubURI();
};
#endif // nsTextToSubURI_h__

View File

@@ -0,0 +1,62 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* ***** BEGIN LICENSE BLOCK *****
* Version: NPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Netscape Public License
* Version 1.1 (the "License"); you may not use this file except in
* compliance with the License. You may obtain a copy of the License at
* http://www.mozilla.org/NPL/
*
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the
* License.
*
* The Original Code is Mozilla Communicator client code.
*
* The Initial Developer of the Original Code is
* Netscape Communications Corporation.
* Portions created by the Initial Developer are Copyright (C) 1998
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
* Pierre Phaneuf <pp@ludusdesign.com>
*
*
* Alternatively, the contents of this file may be used under the terms of
* either the GNU General Public License Version 2 or later (the "GPL"), or
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
* in which case the provisions of the GPL or the LGPL are applicable instead
* of those above. If you wish to allow use of your version of this file only
* under the terms of either the GPL or the LGPL, and not to allow others to
* use your version of this file under the terms of the NPL, indicate your
* decision by deleting the provisions above and replace them with the notice
* and other provisions required by the GPL or the LGPL. If you do not delete
* the provisions above, a recipient may use your version of this file under
* the terms of any one of the NPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
#include "nsIComponentManager.h"
#include "nsCOMPtr.h"
#include "nsICharsetConverterManager.h"
#include "nsIUnicodeDecodeHelper.h"
#include "nsUnicodeDecodeHelper.h"
#include "nsIUnicodeEncodeHelper.h"
#include "nsUnicodeEncodeHelper.h"
#include "nsIPlatformCharset.h"
#include "nsPlatformCharsetFactory.h"
#include "nsICharsetAlias.h"
#include "nsCharsetAliasFactory.h"
#include "nsITextToSubURI.h"
#include "nsTextToSubURI.h"
#include "nsIServiceManager.h"
#include "rdf.h"
#include "nsUConvDll.h"
//----------------------------------------------------------------------
// Global functions and data [declaration]
static NS_DEFINE_CID(kComponentManagerCID, NS_COMPONENTMANAGER_CID);
static NS_DEFINE_CID(kCharsetConverterManagerCID, NS_ICHARSETCONVERTERMANAGER_CID);
static NS_DEFINE_CID(kTextToSubURICID, NS_TEXTTOSUBURI_CID);

View File

@@ -0,0 +1,47 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* ***** BEGIN LICENSE BLOCK *****
* Version: NPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Netscape Public License
* Version 1.1 (the "License"); you may not use this file except in
* compliance with the License. You may obtain a copy of the License at
* http://www.mozilla.org/NPL/
*
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the
* License.
*
* The Original Code is Mozilla Communicator client code.
*
* The Initial Developer of the Original Code is
* Netscape Communications Corporation.
* Portions created by the Initial Developer are Copyright (C) 1998
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
*
*
* Alternatively, the contents of this file may be used under the terms of
* either the GNU General Public License Version 2 or later (the "GPL"), or
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
* in which case the provisions of the GPL or the LGPL are applicable instead
* of those above. If you wish to allow use of your version of this file only
* under the terms of either the GPL or the LGPL, and not to allow others to
* use your version of this file under the terms of the NPL, indicate your
* decision by deleting the provisions above and replace them with the notice
* and other provisions required by the GPL or the LGPL. If you do not delete
* the provisions above, a recipient may use your version of this file under
* the terms of any one of the NPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
#ifndef nsUConvDll_h___
#define nsUConvDll_h___
#include "nsISupports.h"
class nsIComponentManager;
class nsIFile;
struct nsModuleComponentInfo;
#endif /* nsUConvDll_h___ */

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,44 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* ***** BEGIN LICENSE BLOCK *****
* Version: NPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Netscape Public License
* Version 1.1 (the "License"); you may not use this file except in
* compliance with the License. You may obtain a copy of the License at
* http://www.mozilla.org/NPL/
*
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the
* License.
*
* The Original Code is Mozilla Communicator client code.
*
* The Initial Developer of the Original Code is
* Netscape Communications Corporation.
* Portions created by the Initial Developer are Copyright (C) 1998
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
*
*
* Alternatively, the contents of this file may be used under the terms of
* either the GNU General Public License Version 2 or later (the "GPL"), or
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
* in which case the provisions of the GPL or the LGPL are applicable instead
* of those above. If you wish to allow use of your version of this file only
* under the terms of either the GPL or the LGPL, and not to allow others to
* use your version of this file under the terms of the NPL, indicate your
* decision by deleting the provisions above and replace them with the notice
* and other provisions required by the GPL or the LGPL. If you do not delete
* the provisions above, a recipient may use your version of this file under
* the terms of any one of the NPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
#ifndef nsUCvMinDll_h___
#define nsUCvMinDll_h___
#include "prtypes.h"
#endif /* nsUCvMinDll_h___ */

View File

@@ -0,0 +1,410 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* ***** BEGIN LICENSE BLOCK *****
* Version: NPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Netscape Public License
* Version 1.1 (the "License"); you may not use this file except in
* compliance with the License. You may obtain a copy of the License at
* http://www.mozilla.org/NPL/
*
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the
* License.
*
* The Original Code is Mozilla Communicator client code.
*
* The Initial Developer of the Original Code is
* Netscape Communications Corporation.
* Portions created by the Initial Developer are Copyright (C) 1998
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
*
*
* Alternatively, the contents of this file may be used under the terms of
* either the GNU General Public License Version 2 or later (the "GPL"), or
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
* in which case the provisions of the GPL or the LGPL are applicable instead
* of those above. If you wish to allow use of your version of this file only
* under the terms of either the GPL or the LGPL, and not to allow others to
* use your version of this file under the terms of the NPL, indicate your
* decision by deleting the provisions above and replace them with the notice
* and other provisions required by the GPL or the LGPL. If you do not delete
* the provisions above, a recipient may use your version of this file under
* the terms of any one of the NPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
#include <locale.h>
#include "nsIPlatformCharset.h"
#include "pratom.h"
#include "nsURLProperties.h"
#include "nsCOMPtr.h"
#include "nsReadableUtils.h"
#include "nsLocaleCID.h"
#include "nsUConvDll.h"
#include "nsIComponentManager.h"
#include "nsIServiceManager.h"
#include "nsIUnicodeDecoder.h"
#include "nsIUnicodeEncoder.h"
#include "nsICharsetConverterManager.h"
#include "nsICharsetConverterManager2.h"
#if HAVE_GNU_LIBC_VERSION_H
#include <gnu/libc-version.h>
#endif
#ifdef HAVE_NL_TYPES_H
#include <nl_types.h>
#endif
#if HAVE_NL_LANGINFO
#include <langinfo.h>
#endif
#include "nsPlatformCharset.h"
#include "nsAutoLock.h"
#include "prinit.h"
NS_IMPL_THREADSAFE_ISUPPORTS1(nsPlatformCharset, nsIPlatformCharset);
static nsURLProperties *gNLInfo = nsnull;
static nsURLProperties *gInfo_deprecated = nsnull;
static PRInt32 gCnt=0;
//this lock is for protecting above static variable operation
static PRLock *gLock = nsnull;
static PRStatus InitLock(void)
{
gLock = PR_NewLock();
if (gLock)
return PR_SUCCESS;
return PR_FAILURE;
}
nsPlatformCharset::nsPlatformCharset()
{
NS_INIT_REFCNT();
PR_AtomicIncrement(&gCnt);
static PRCallOnceType once;
PR_CallOnce(&once, InitLock);
NS_ASSERTION(gLock, "Can't allocate a lock?!");
}
nsresult
nsPlatformCharset::ConvertLocaleToCharsetUsingDeprecatedConfig(nsAutoString& locale, nsAString& oResult)
{
// locked for thread safety
{
nsAutoLock guard(gLock);
if (!gInfo_deprecated) {
nsURLProperties *info = new nsURLProperties(NS_LITERAL_CSTRING("resource:/res/unixcharset.properties"));
NS_ASSERTION( info, "cannot create nsURLProperties");
gInfo_deprecated = info;
}
}
if (gInfo_deprecated && !(locale.IsEmpty())) {
nsAutoString platformLocaleKey;
// note: NS_LITERAL_STRING("locale." OSTYPE ".") does not compile on AIX
platformLocaleKey.Assign(NS_LITERAL_STRING("locale."));
platformLocaleKey.AppendWithConversion(OSTYPE);
platformLocaleKey.Append(NS_LITERAL_STRING("."));
platformLocaleKey.Append(locale.get());
nsresult res = gInfo_deprecated->Get(platformLocaleKey, oResult);
if (NS_SUCCEEDED(res)) {
return NS_OK;
}
nsAutoString localeKey;
localeKey.Assign(NS_LITERAL_STRING("locale.all."));
localeKey.Append(locale.get());
res = gInfo_deprecated->Get(localeKey, oResult);
if (NS_SUCCEEDED(res)) {
return NS_OK;
}
}
NS_ASSERTION(0, "unable to convert locale to charset using deprecated config");
mCharset.Assign(NS_LITERAL_STRING("ISO-8859-1"));
return NS_SUCCESS_USING_FALLBACK_LOCALE;
}
nsPlatformCharset::~nsPlatformCharset()
{
PR_AtomicDecrement(&gCnt);
if (!gCnt) {
if (gNLInfo) {
delete gNLInfo;
gNLInfo = nsnull;
PR_DestroyLock(gLock);
gLock = nsnull;
}
if (gInfo_deprecated) {
delete gInfo_deprecated;
gInfo_deprecated = nsnull;
}
}
}
NS_IMETHODIMP
nsPlatformCharset::GetCharset(nsPlatformCharsetSel selector, nsAString& oResult)
{
oResult = mCharset;
return NS_OK;
}
NS_IMETHODIMP
nsPlatformCharset::GetDefaultCharsetForLocale(const PRUnichar* localeName, PRUnichar** _retValue)
{
nsAutoString localeNameAsString(localeName);
//
// if this locale is the user's locale then use the charset
// we already determined at initialization
//
if (mLocale.Equals(localeNameAsString) ||
// support the 4.x behavior
(mLocale.EqualsIgnoreCase("en_US") && localeNameAsString.EqualsIgnoreCase("C"))) {
*_retValue = ToNewUnicode(mCharset);
return NS_OK;
}
#if HAVE_NL_LANGINFO
//
// This locale appears to be a different locale from the user's locale.
// To do this we would need to lock the global resource we are currently
// using or use a library that provides multi locale support.
// ICU is a possible example of a multi locale library.
// http://oss.software.ibm.com/icu/
//
NS_ASSERTION(0, "GetDefaultCharsetForLocale: need to add multi locale support");
// until we add multi locale support: use the the charset of the user's locale
*_retValue = ToNewUnicode(mCharset);
return NS_SUCCESS_USING_FALLBACK_LOCALE;
#endif
//
// convert from locale to charset
// using the deprecated locale to charset mapping
//
nsAutoString localeStr(localeName);
nsString charset;
nsresult res = ConvertLocaleToCharsetUsingDeprecatedConfig(localeStr, charset);
if (NS_SUCCEEDED(res)) {
*_retValue = ToNewUnicode(charset);
return res; // succeeded
}
NS_ASSERTION(0, "unable to convert locale to charset using deprecated config");
charset.Assign(NS_LITERAL_STRING("ISO-8859-1"));
*_retValue = ToNewUnicode(charset);
return NS_SUCCESS_USING_FALLBACK_LOCALE;
}
nsresult
nsPlatformCharset::InitGetCharset(nsAString &oString)
{
char* nl_langinfo_codeset = nsnull;
nsString aCharset;
nsresult res;
#if HAVE_NL_LANGINFO && defined(CODESET)
nl_langinfo_codeset = nl_langinfo(CODESET);
NS_ASSERTION(nl_langinfo_codeset, "cannot get nl_langinfo(CODESET)");
//
// see if we can use nl_langinfo(CODESET) directly
//
if (nl_langinfo_codeset) {
aCharset.AssignWithConversion(nl_langinfo_codeset);
res = VerifyCharset(aCharset);
if (NS_SUCCEEDED(res)) {
oString = aCharset;
return res;
}
}
// locked for thread safety
{
nsAutoLock guard(gLock);
if (!gNLInfo) {
nsCAutoString propertyURL;
// note: NS_LITERAL_STRING("resource:/res/unixcharset." OSARCH ".properties") does not compile on AIX
propertyURL.Assign(NS_LITERAL_CSTRING("resource:/res/unixcharset."));
propertyURL.Append(OSARCH);
propertyURL.Append(NS_LITERAL_CSTRING(".properties"));
nsURLProperties *info;
info = new nsURLProperties( propertyURL );
NS_ASSERTION( info, "cannot create nsURLProperties");
if (info) {
PRBool didLoad;
info->DidLoad(didLoad);
if (!didLoad) {
delete info;
info = nsnull;
}
}
gNLInfo = info;
}
}
//
// See if we are remapping nl_langinfo(CODESET)
//
if (gNLInfo && nl_langinfo_codeset) {
nsAutoString localeKey;
#if HAVE_GNU_GET_LIBC_VERSION
//
// look for an glibc version specific charset remap
//
const char *glibc_version = gnu_get_libc_version();
if ((glibc_version != nsnull) && (strlen(glibc_version))) {
localeKey.Assign(NS_LITERAL_STRING("nllic."));
localeKey.AppendWithConversion(glibc_version);
localeKey.Append(NS_LITERAL_STRING("."));
localeKey.AppendWithConversion(nl_langinfo_codeset);
res = gNLInfo->Get(localeKey, aCharset);
if (NS_SUCCEEDED(res)) {
res = VerifyCharset(aCharset);
if (NS_SUCCEEDED(res)) {
oString = aCharset;
return res;
}
}
}
#endif
//
// look for a charset specific charset remap
//
localeKey.Assign(NS_LITERAL_STRING("nllic."));
localeKey.AppendWithConversion(nl_langinfo_codeset);
res = gNLInfo->Get(localeKey, aCharset);
if (NS_SUCCEEDED(res)) {
res = VerifyCharset(aCharset);
if (NS_SUCCEEDED(res)) {
oString = aCharset;
return res;
}
}
}
NS_ASSERTION(0, "unable to use nl_langinfo(CODESET)");
#endif
//
// try falling back on a deprecated (locale based) name
//
char* locale = setlocale(LC_CTYPE, nsnull);
nsAutoString localeStr;
localeStr.AssignWithConversion(locale);
res = ConvertLocaleToCharsetUsingDeprecatedConfig(localeStr, aCharset);
if (NS_SUCCEEDED(res)) {
oString = aCharset;
return res; // succeeded
}
return res;
}
NS_IMETHODIMP
nsPlatformCharset::Init()
{
nsString charset;
nsresult res;
//
// remember default locale so we can use the
// same charset when asked for the same locale
//
char* locale = setlocale(LC_CTYPE, nsnull);
NS_ASSERTION(locale, "cannot setlocale");
if (locale) {
mLocale.AssignWithConversion(locale);
} else {
mLocale.Assign(NS_LITERAL_STRING("en_US"));
}
res = InitGetCharset(charset);
if (NS_SUCCEEDED(res)) {
mCharset = charset;
return res; // succeeded
}
// last resort fallback
NS_ASSERTION(0, "unable to convert locale to charset using deprecated config");
mCharset.Assign(NS_LITERAL_STRING("ISO-8859-1"));
return NS_SUCCESS_USING_FALLBACK_LOCALE;
}
nsresult
nsPlatformCharset::VerifyCharset(nsString &aCharset)
{
nsresult res;
//
// get the convert manager
//
nsCOMPtr <nsICharsetConverterManager2> charsetConverterManager;
charsetConverterManager = do_GetService(NS_CHARSETCONVERTERMANAGER_CONTRACTID, &res);
if (NS_FAILED(res))
return res;
//
// check if we recognize the charset string
//
nsCOMPtr <nsIAtom> charsetAtom;
res = charsetConverterManager->GetCharsetAtom(aCharset.get(),
getter_AddRefs(charsetAtom));
if (NS_FAILED(res)) {
return res;
}
//
// check if we can get an input converter
//
nsCOMPtr <nsIUnicodeEncoder> enc;
res = charsetConverterManager->GetUnicodeEncoder(charsetAtom, getter_AddRefs(enc));
if (NS_FAILED(res)) {
NS_ASSERTION(0, "failed to create encoder");
return res;
}
//
// check if we can get an output converter
//
nsCOMPtr <nsIUnicodeDecoder> dec;
res = charsetConverterManager->GetUnicodeDecoder(charsetAtom, getter_AddRefs(dec));
if (NS_FAILED(res)) {
NS_ASSERTION(0, "failed to create decoder");
return res;
}
//
// return the preferred string
//
const PRUnichar *prefName;
res = charsetAtom->GetUnicode(&prefName);
if (NS_SUCCEEDED(res))
aCharset.Assign(prefName);
NS_ASSERTION(NS_SUCCEEDED(res), "failed to get preferred charset name, using non-preferred");
return NS_OK;
}
nsresult
nsPlatformCharset::MapToCharset(short script, short region, nsAString& outCharset)
{
return NS_OK;
}
nsresult
nsPlatformCharset::MapToCharset(nsAString& inANSICodePage, nsAString& outCharset)
{
return NS_OK;
}
nsresult
nsPlatformCharset::InitInfo()
{
return NS_OK;
}

View File

@@ -0,0 +1,92 @@
/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* ***** BEGIN LICENSE BLOCK *****
* Version: NPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Netscape Public License
* Version 1.1 (the "License"); you may not use this file except in
* compliance with the License. You may obtain a copy of the License at
* http://www.mozilla.org/NPL/
*
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the
* License.
*
* The Original Code is mozilla.org code.
*
* The Initial Developer of the Original Code is
* Netscape Communications Corporation.
* Portions created by the Initial Developer are Copyright (C) 1998
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
*
*
* Alternatively, the contents of this file may be used under the terms of
* either the GNU General Public License Version 2 or later (the "GPL"), or
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
* in which case the provisions of the GPL or the LGPL are applicable instead
* of those above. If you wish to allow use of your version of this file only
* under the terms of either the GPL or the LGPL, and not to allow others to
* use your version of this file under the terms of the NPL, indicate your
* decision by deleting the provisions above and replace them with the notice
* and other provisions required by the GPL or the LGPL. If you do not delete
* the provisions above, a recipient may use your version of this file under
* the terms of any one of the NPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
#include "nsURLProperties.h"
#include "nsIServiceManager.h"
#include "nsIComponentManager.h"
#include "nsAString.h"
#include "nsPromiseFlatString.h"
#include "nsXPIDLString.h"
nsIStringBundleService* nsURLProperties::gStringBundleService = nsnull;
nsrefcnt nsURLProperties::gRefCnt = 0;
nsURLProperties::nsURLProperties(const nsACString& aUrl)
{
nsresult res = NS_OK;
if (gRefCnt == 0) {
res = CallGetService(NS_STRINGBUNDLE_CONTRACTID, &gStringBundleService);
if (NS_FAILED(res)) return;
gRefCnt++;
}
if (NS_SUCCEEDED(res)) {
gStringBundleService->CreateBundle(PromiseFlatCString(aUrl).get(), getter_AddRefs(mBundle));
}
}
nsURLProperties::~nsURLProperties()
{
if (--gRefCnt == 0) {
NS_RELEASE(gStringBundleService);
}
}
NS_IMETHODIMP nsURLProperties::Get(const nsAString& aKey,
nsAString& oValue)
{
if(mBundle) {
nsXPIDLString value;
nsresult rv;
rv = mBundle->GetStringFromName(PromiseFlatString(aKey).get(),
getter_Copies(value));
if (NS_SUCCEEDED(rv))
oValue = value;
return rv;
}
else
return NS_ERROR_FAILURE;
}
NS_IMETHODIMP nsURLProperties::DidLoad(PRBool &oDidLoad)
{
oDidLoad = (mBundle!=nsnull);
return NS_OK;
}

View File

@@ -0,0 +1,63 @@
/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* ***** BEGIN LICENSE BLOCK *****
* Version: NPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Netscape Public License
* Version 1.1 (the "License"); you may not use this file except in
* compliance with the License. You may obtain a copy of the License at
* http://www.mozilla.org/NPL/
*
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the
* License.
*
* The Original Code is mozilla.org code.
*
* The Initial Developer of the Original Code is
* Netscape Communications Corporation.
* Portions created by the Initial Developer are Copyright (C) 1998
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
*
*
* Alternatively, the contents of this file may be used under the terms of
* either the GNU General Public License Version 2 or later (the "GPL"), or
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
* in which case the provisions of the GPL or the LGPL are applicable instead
* of those above. If you wish to allow use of your version of this file only
* under the terms of either the GPL or the LGPL, and not to allow others to
* use your version of this file under the terms of the NPL, indicate your
* decision by deleting the provisions above and replace them with the notice
* and other provisions required by the GPL or the LGPL. If you do not delete
* the provisions above, a recipient may use your version of this file under
* the terms of any one of the NPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
#ifndef nsURLProperties_h__
#define nsURLProperties_h__
#include "nsIStringBundle.h"
#include "nsCOMPtr.h"
#include "nsAString.h"
class nsURLProperties {
public:
nsURLProperties(const nsACString& aUrl);
virtual ~nsURLProperties();
NS_IMETHOD DidLoad(PRBool&);
NS_IMETHOD Get( const nsAString& aKey, nsAString& value);
private:
static nsIStringBundleService* gStringBundleService; // to speed up getting bundles
static nsrefcnt gRefCnt;
nsCOMPtr<nsIStringBundle> mBundle;
};
#endif /* nsURLProperties_h__ */

View File

@@ -0,0 +1,226 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* ***** BEGIN LICENSE BLOCK *****
* Version: NPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Netscape Public License
* Version 1.1 (the "License"); you may not use this file except in
* compliance with the License. You may obtain a copy of the License at
* http://www.mozilla.org/NPL/
*
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the
* License.
*
* The Original Code is Mozilla Communicator client code.
*
* The Initial Developer of the Original Code is
* Netscape Communications Corporation.
* Portions created by the Initial Developer are Copyright (C) 1998
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
*
*
* Alternatively, the contents of this file may be used under the terms of
* either the GNU General Public License Version 2 or later (the "GPL"), or
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
* in which case the provisions of the GPL or the LGPL are applicable instead
* of those above. If you wish to allow use of your version of this file only
* under the terms of either the GPL or the LGPL, and not to allow others to
* use your version of this file under the terms of the NPL, indicate your
* decision by deleting the provisions above and replace them with the notice
* and other provisions required by the GPL or the LGPL. If you do not delete
* the provisions above, a recipient may use your version of this file under
* the terms of any one of the NPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
#include "nsUCSupport.h"
#include "nsUTF8ToUnicode.h"
NS_IMETHODIMP NS_NewUTF8ToUnicode(nsISupports* aOuter,
const nsIID& aIID,
void** aResult)
{
if (!aResult) {
return NS_ERROR_NULL_POINTER;
}
if (aOuter) {
*aResult = nsnull;
return NS_ERROR_NO_AGGREGATION;
}
nsUTF8ToUnicode * inst = new nsUTF8ToUnicode();
if (!inst) {
*aResult = nsnull;
return NS_ERROR_OUT_OF_MEMORY;
}
nsresult res = inst->QueryInterface(aIID, aResult);
if (NS_FAILED(res)) {
*aResult = nsnull;
delete inst;
}
return res;
}
//----------------------------------------------------------------------
// Class nsUTF8ToUnicode [implementation]
nsUTF8ToUnicode::nsUTF8ToUnicode()
: nsBasicDecoderSupport()
{
Reset();
}
//----------------------------------------------------------------------
// Subclassing of nsTableDecoderSupport class [implementation]
NS_IMETHODIMP nsUTF8ToUnicode::GetMaxLength(const char * aSrc,
PRInt32 aSrcLength,
PRInt32 * aDestLength)
{
*aDestLength = aSrcLength;
return NS_OK;
}
//----------------------------------------------------------------------
// Subclassing of nsBasicDecoderSupport class [implementation]
NS_IMETHODIMP nsUTF8ToUnicode::Reset()
{
mState = 0; // cached expected number of bytes per UTF8 character sequence
mUcs4 = 0; // cached Unicode character
mBytes = 1;
return NS_OK;
}
//----------------------------------------------------------------------
// Subclassing of nsBasicDecoderSupport class [implementation]
NS_IMETHODIMP nsUTF8ToUnicode::Convert(const char * aSrc,
PRInt32 * aSrcLength,
PRUnichar * aDest,
PRInt32 * aDestLength)
{
PRUint32 aSrcLen = (PRUint32) (*aSrcLength);
PRUint32 aDestLen = (PRUint32) (*aDestLength);
const char *in, *inend;
inend = aSrc + aSrcLen;
PRUnichar *out, *outend;
outend = aDest + aDestLen;
nsresult res; // conversion result
for(in=aSrc,out=aDest,res=NS_OK;((in < inend) && (out < outend)); in++)
{
if(0 == mState) {
if( 0 == (0x80 & (*in))) {
// ASCII
*out++ = (PRUnichar)*in;
mBytes =1;
} else if( 0xC0 == (0xE0 & (*in))) {
// 2 bytes UTF8
mUcs4 = (PRUint32)(*in);
mUcs4 = (mUcs4 << 6) & 0x000007C0L;
mState=1;
mBytes =2;
} else if( 0xE0 == (0xF0 & (*in))) {
// 3 bytes UTF8
mUcs4 = (PRUint32)(*in);
mUcs4 = (mUcs4 << 12) & 0x0000F000L;
mState=2;
mBytes =3;
} else if( 0xF0 == (0xF8 & (*in))) {
// 4 bytes UTF8
mUcs4 = (PRUint32)(*in);
mUcs4 = (mUcs4 << 18) & 0x001F0000L;
mState=3;
mBytes =4;
} else if( 0xF8 == (0xFC & (*in))) {
// 5 bytes UTF8
mUcs4 = (PRUint32)(*in);
mUcs4 = (mUcs4 << 24) & 0x03000000L;
mState=4;
mBytes =5;
} else if( 0xFC == (0xFE & (*in))) {
// 6 bytes UTF8
mUcs4 = (PRUint32)(*in);
mUcs4 = (mUcs4 << 30) & 0x40000000L;
mState=5;
mBytes =6;
} else {
//NS_ASSERTION(0, "The input string is not in utf8");
//unexpected octet, put in a replacement char,
//flush and refill the buffer, reset state
res = NS_ERROR_UNEXPECTED;
break;
}
} else {
if(0x80 == (0xC0 & (*in))) {
PRUint32 tmp = (*in);
PRUint32 shift = (mState-1) * 6;
tmp = (tmp << shift ) & ( 0x0000003FL << shift);
mUcs4 |= tmp;
if(0 == --mState) {
if(mUcs4 >= 0x00010000) {
if(mUcs4 >= 0x00110000) {
*out++ = 0xFFFD;
} else {
mUcs4 -= 0x00010000;
*out++ = 0xD800 | (0x000003FF & (mUcs4 >> 10));
*out++ = 0xDC00 | (0x000003FF & mUcs4);
}
} else {
// from Unicode 3.1, non-shortest form is illegal
if(((2==mBytes) && (mUcs4 < 0x0080)) ||
((3==mBytes) && (mUcs4 < 0x0800)) ||
((4==mBytes) && (mUcs4 < 0x1000)) ||
(5==mBytes) ||
(6==mBytes))
{
res = NS_ERROR_UNEXPECTED;
break;
}
if( 0xfeff != mUcs4 ) // ignore BOM
{
*out++ = mUcs4;
}
}
//initialize UTF8 cache
Reset();
}
} else {
//NS_ASSERTION(0, "The input string is not in utf8");
//unexpected octet, put in a replacement char,
//flush and refill the buffer, reset state
in--;
res = NS_ERROR_UNEXPECTED;
break;
}
}
}
//output not finished, output buffer too short
if((NS_OK == res) && (in < inend) && (out >= outend))
res = NS_OK_UDEC_MOREOUTPUT;
//last USC4 is incomplete, make sure the caller
//returns with properly aligned continuation of the buffer
if ((NS_OK == res) && (mState != 0))
res = NS_OK_UDEC_MOREINPUT;
*aSrcLength = in - aSrc;
*aDestLength = out - aDest;
return(res);
}

View File

@@ -0,0 +1,99 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* ***** BEGIN LICENSE BLOCK *****
* Version: NPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Netscape Public License
* Version 1.1 (the "License"); you may not use this file except in
* compliance with the License. You may obtain a copy of the License at
* http://www.mozilla.org/NPL/
*
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the
* License.
*
* The Original Code is Mozilla Communicator client code.
*
* The Initial Developer of the Original Code is
* Netscape Communications Corporation.
* Portions created by the Initial Developer are Copyright (C) 1998
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
*
*
* Alternatively, the contents of this file may be used under the terms of
* either the GNU General Public License Version 2 or later (the "GPL"), or
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
* in which case the provisions of the GPL or the LGPL are applicable instead
* of those above. If you wish to allow use of your version of this file only
* under the terms of either the GPL or the LGPL, and not to allow others to
* use your version of this file under the terms of the NPL, indicate your
* decision by deleting the provisions above and replace them with the notice
* and other provisions required by the GPL or the LGPL. If you do not delete
* the provisions above, a recipient may use your version of this file under
* the terms of any one of the NPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
#ifndef nsUTF8ToUnicode_h___
#define nsUTF8ToUnicode_h___
// Class ID for our UTF8ToUnicode charset converter
// {5534DDC0-DD96-11d2-8AAC-00600811A836}
#define NS_UTF8TOUNICODE_CID \
{ 0x5534ddc0, 0xdd96, 0x11d2, {0x8a, 0xac, 0x0, 0x60, 0x8, 0x11, 0xa8, 0x36}}
#define NS_UTF8TOUNICODE_CONTRACTID "@mozilla.org/intl/unicode/decoder;1?charset=UTF-8"
//#define NS_ERROR_UCONV_NOUTF8TOUNICODE
// NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_UCONV, 0x31)
//----------------------------------------------------------------------
// Class nsUTF8ToUnicode [declaration]
/**
* A character set converter from UTF8 to Unicode.
*
* @created 18/Mar/1998
* @modified 04/Feb/2000
* @author Catalin Rotaru [CATA]
*/
class nsUTF8ToUnicode : public nsBasicDecoderSupport
{
public:
/**
* Class constructor.
*/
nsUTF8ToUnicode();
protected:
PRUint32 mState; // cached expected number of bytes per UTF8 character sequence
PRUint32 mUcs4; // cached Unicode character
PRUint32 mBytes;
//--------------------------------------------------------------------
// Subclassing of nsDecoderSupport class [declaration]
NS_IMETHOD GetMaxLength(const char * aSrc, PRInt32 aSrcLength,
PRInt32 * aDestLength);
//--------------------------------------------------------------------
// Subclassing of nsBasicDecoderSupport class [declaration]
NS_IMETHOD Convert(const char * aSrc, PRInt32 * aSrcLength,
PRUnichar * aDest, PRInt32 * aDestLength);
//--------------------------------------------------------------------
// Subclassing of nsBasicDecoderSupport class [declaration]
NS_IMETHOD Reset();
};
#endif /* nsUTF8ToUnicode_h___ */

View File

@@ -0,0 +1,267 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* ***** BEGIN LICENSE BLOCK *****
* Version: NPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Netscape Public License
* Version 1.1 (the "License"); you may not use this file except in
* compliance with the License. You may obtain a copy of the License at
* http://www.mozilla.org/NPL/
*
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the
* License.
*
* The Original Code is Mozilla Communicator client code.
*
* The Initial Developer of the Original Code is
* Netscape Communications Corporation.
* Portions created by the Initial Developer are Copyright (C) 1998
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
*
*
* Alternatively, the contents of this file may be used under the terms of
* either the GNU General Public License Version 2 or later (the "GPL"), or
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
* in which case the provisions of the GPL or the LGPL are applicable instead
* of those above. If you wish to allow use of your version of this file only
* under the terms of either the GPL or the LGPL, and not to allow others to
* use your version of this file under the terms of the NPL, indicate your
* decision by deleting the provisions above and replace them with the notice
* and other provisions required by the GPL or the LGPL. If you do not delete
* the provisions above, a recipient may use your version of this file under
* the terms of any one of the NPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
#include "pratom.h"
#include "unicpriv.h"
#include "nsUConvDll.h"
#include "nsIMappingCache.h"
#include "nsMappingCache.h"
#include "nsIUnicodeDecodeHelper.h"
#include "nsIUnicodeDecoder.h"
#include "nsUnicodeDecodeHelper.h"
//----------------------------------------------------------------------
// Class nsUnicodeDecodeHelper [implementation]
NS_IMPL_ISUPPORTS1(nsUnicodeDecodeHelper, nsIUnicodeDecodeHelper)
nsUnicodeDecodeHelper::nsUnicodeDecodeHelper()
{
NS_INIT_REFCNT();
}
nsUnicodeDecodeHelper::~nsUnicodeDecodeHelper()
{
}
//----------------------------------------------------------------------
// Interface nsIUnicodeDecodeHelper [implementation]
NS_IMETHODIMP nsUnicodeDecodeHelper::ConvertByTable(
const char * aSrc,
PRInt32 * aSrcLength,
PRUnichar * aDest,
PRInt32 * aDestLength,
uShiftTable * aShiftTable,
uMappingTable * aMappingTable)
{
const char * src = aSrc;
PRInt32 srcLen = *aSrcLength;
PRUnichar * dest = aDest;
PRUnichar * destEnd = aDest + *aDestLength;
PRUnichar med;
PRInt32 bcr; // byte count for read
nsresult res = NS_OK;
while ((srcLen > 0) && (dest < destEnd)) {
if (!uScan(aShiftTable, NULL, (PRUint8 *)src, NS_REINTERPRET_CAST(PRUint16*, &med), srcLen,
(PRUint32 *)&bcr)) {
res = NS_OK_UDEC_MOREINPUT;
break;
}
if (!uMapCode((uTable*) aMappingTable, NS_STATIC_CAST(PRUint16, med), NS_REINTERPRET_CAST(PRUint16*, dest))) {
if (med < 0x20) {
// somehow some table miss the 0x00 - 0x20 part
*dest = med;
} else {
// Unicode replacement value for unmappable chars
*dest = 0xfffd;
}
}
src += bcr;
srcLen -= bcr;
dest++;
}
if ((srcLen > 0) && (res == NS_OK)) res = NS_OK_UDEC_MOREOUTPUT;
*aSrcLength = src - aSrc;
*aDestLength = dest - aDest;
return res;
}
NS_IMETHODIMP nsUnicodeDecodeHelper::ConvertByMultiTable(
const char * aSrc,
PRInt32 * aSrcLength,
PRUnichar * aDest,
PRInt32 * aDestLength,
PRInt32 aTableCount,
uRange * aRangeArray,
uShiftTable ** aShiftTable,
uMappingTable ** aMappingTable)
{
PRUint8 * src = (PRUint8 *)aSrc;
PRInt32 srcLen = *aSrcLength;
PRUnichar * dest = aDest;
PRUnichar * destEnd = aDest + *aDestLength;
PRUnichar med;
PRInt32 bcr; // byte count for read
nsresult res = NS_OK;
PRInt32 i;
while ((srcLen > 0) && (dest < destEnd))
{
PRBool done= PR_FALSE;
PRBool passRangeCheck = PR_FALSE;
PRBool passScan = PR_FALSE;
for (i=0; (!done) && (i<aTableCount); i++)
{
if ((aRangeArray[i].min <= *src) && (*src <= aRangeArray[i].max))
{
passRangeCheck = PR_TRUE;
if (uScan(aShiftTable[i], NULL, src,
NS_REINTERPRET_CAST(PRUint16*, &med), srcLen,
(PRUint32 *)&bcr))
{
passScan = PR_TRUE;
done = uMapCode((uTable*) aMappingTable[i],
NS_STATIC_CAST(PRUint16, med),
NS_REINTERPRET_CAST(PRUint16*, dest));
} // if (uScan ... )
} // if Range
} // for loop
if(passRangeCheck && (! passScan))
{
res = NS_OK_UDEC_MOREINPUT;
break;
}
if(! done)
{
bcr = 1;
if ((PRUint8)*src < 0x20) {
// somehow some table miss the 0x00 - 0x20 part
*dest = *src;
} else if(*src == (PRUint8) 0xa0) {
// handle nbsp
*dest = 0x00a0;
} else {
// we need to decide how many byte we skip. We can use uScan to do this
for (i=0; i<aTableCount; i++)
{
if ((aRangeArray[i].min <= *src) && (*src <= aRangeArray[i].max))
{
if (uScan(aShiftTable[i], NULL, src,
NS_REINTERPRET_CAST(PRUint16*, &med), srcLen,
(PRUint32*)&bcr))
{
// match the patten
PRInt32 k;
for(k = 1; k < bcr; k++)
{
if(0 == (src[k] & 0x80))
{ // only skip if all bytes > 0x80
// if we hit bytes <= 0x80, skip only one byte
bcr = 1;
break;
}
}
break;
}
}
}
// treat it as NSBR if bcr == 1 and it is 0xa0
*dest = ((1==bcr)&&(*src == (PRUint8)0xa0 )) ? 0x00a0 : 0xfffd;
}
}
src += bcr;
srcLen -= bcr;
dest++;
} // while
if ((srcLen > 0) && (res == NS_OK)) res = NS_OK_UDEC_MOREOUTPUT;
*aSrcLength = src - (PRUint8 *)aSrc;
*aDestLength = dest - aDest;
return res;
}
NS_IMETHODIMP nsUnicodeDecodeHelper::CreateCache(nsMappingCacheType aType, nsIMappingCache* aResult)
{
return nsMappingCache::CreateCache(aType, aResult);
}
NS_IMETHODIMP nsUnicodeDecodeHelper::DestroyCache(nsIMappingCache aCache)
{
return nsMappingCache::DestroyCache(aCache);
}
NS_IMETHODIMP nsUnicodeDecodeHelper::ConvertByFastTable(
const char * aSrc,
PRInt32 * aSrcLength,
PRUnichar * aDest,
PRInt32 * aDestLength,
PRUnichar * aFastTable,
PRInt32 aTableSize)
{
PRUint8 * src = (PRUint8 *)aSrc;
PRUint8 * srcEnd = src;
PRUnichar * dest = aDest;
nsresult res;
if (*aSrcLength > *aDestLength) {
srcEnd += (*aDestLength);
res = NS_PARTIAL_MORE_OUTPUT;
} else {
srcEnd += (*aSrcLength);
res = NS_OK;
}
for (; src<srcEnd;) *dest++ = aFastTable[*src++];
*aSrcLength = src - (PRUint8 *)aSrc;
*aDestLength = dest - aDest;
return res;
}
NS_IMETHODIMP nsUnicodeDecodeHelper::CreateFastTable(
uShiftTable * aShiftTable,
uMappingTable * aMappingTable,
PRUnichar * aFastTable,
PRInt32 aTableSize)
{
PRInt32 tableSize = aTableSize;
PRInt32 buffSize = aTableSize;
char * buff = new char [buffSize];
if (buff == NULL) return NS_ERROR_OUT_OF_MEMORY;
char * p = buff;
for (PRInt32 i=0; i<aTableSize; i++) *(p++) = i;
nsresult res = ConvertByTable(buff, &buffSize, aFastTable, &tableSize,
aShiftTable, aMappingTable);
delete [] buff;
return res;
}

View File

@@ -0,0 +1,96 @@
/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* ***** BEGIN LICENSE BLOCK *****
* Version: NPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Netscape Public License
* Version 1.1 (the "License"); you may not use this file except in
* compliance with the License. You may obtain a copy of the License at
* http://www.mozilla.org/NPL/
*
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the
* License.
*
* The Original Code is mozilla.org code.
*
* The Initial Developer of the Original Code is
* Netscape Communications Corporation.
* Portions created by the Initial Developer are Copyright (C) 1998
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
*
*
* Alternatively, the contents of this file may be used under the terms of
* either the GNU General Public License Version 2 or later (the "GPL"), or
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
* in which case the provisions of the GPL or the LGPL are applicable instead
* of those above. If you wish to allow use of your version of this file only
* under the terms of either the GPL or the LGPL, and not to allow others to
* use your version of this file under the terms of the NPL, indicate your
* decision by deleting the provisions above and replace them with the notice
* and other provisions required by the GPL or the LGPL. If you do not delete
* the provisions above, a recipient may use your version of this file under
* the terms of any one of the NPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
#ifndef nsUnicodeDecodeHelper_h__
#define nsUnicodeDecodeHelper_h__
#include "nsIUnicodeDecodeHelper.h"
#include "nsIUnicodeDecoder.h"
//----------------------------------------------------------------------
// Class nsUnicodeDecodeHelper [declaration]
/**
* The actual implementation of the nsIUnicodeDecodeHelper interface.
*
* @created 18/Mar/1998
* @author Catalin Rotaru [CATA]
*/
class nsUnicodeDecodeHelper : public nsIUnicodeDecodeHelper
{
NS_DECL_ISUPPORTS
public:
/**
* Class constructor.
*/
nsUnicodeDecodeHelper();
/**
* Class destructor.
*/
virtual ~nsUnicodeDecodeHelper();
//--------------------------------------------------------------------
// Interface nsIUnicodeDecodeHelper [declaration]
NS_IMETHOD ConvertByTable(const char * aSrc, PRInt32 * aSrcLength,
PRUnichar * aDest, PRInt32 * aDestLength, uShiftTable * aShiftTable,
uMappingTable * aMappingTable);
NS_IMETHOD ConvertByMultiTable(const char * aSrc, PRInt32 * aSrcLength,
PRUnichar * aDest, PRInt32 * aDestLength, PRInt32 aTableCount,
uRange * aRangeArray, uShiftTable ** aShiftTable,
uMappingTable ** aMappingTable);
NS_IMETHOD ConvertByFastTable(const char * aSrc, PRInt32 * aSrcLength,
PRUnichar * aDest, PRInt32 * aDestLength, PRUnichar * aFastTable,
PRInt32 aTableSize);
NS_IMETHOD CreateFastTable( uShiftTable * aShiftTable,
uMappingTable * aMappingTable, PRUnichar * aFastTable,
PRInt32 aTableSize);
NS_IMETHOD CreateCache(nsMappingCacheType aType, nsIMappingCache* aResult);
NS_IMETHOD DestroyCache(nsIMappingCache aResult);
};
#endif // nsUnicodeDecodeHelper_h__

View File

@@ -0,0 +1,170 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* ***** BEGIN LICENSE BLOCK *****
* Version: NPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Netscape Public License
* Version 1.1 (the "License"); you may not use this file except in
* compliance with the License. You may obtain a copy of the License at
* http://www.mozilla.org/NPL/
*
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the
* License.
*
* The Original Code is Mozilla Communicator client code.
*
* The Initial Developer of the Original Code is
* Netscape Communications Corporation.
* Portions created by the Initial Developer are Copyright (C) 1998
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
*
*
* Alternatively, the contents of this file may be used under the terms of
* either the GNU General Public License Version 2 or later (the "GPL"), or
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
* in which case the provisions of the GPL or the LGPL are applicable instead
* of those above. If you wish to allow use of your version of this file only
* under the terms of either the GPL or the LGPL, and not to allow others to
* use your version of this file under the terms of the NPL, indicate your
* decision by deleting the provisions above and replace them with the notice
* and other provisions required by the GPL or the LGPL. If you do not delete
* the provisions above, a recipient may use your version of this file under
* the terms of any one of the NPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
#include "pratom.h"
#include "unicpriv.h"
#include "nsIUnicodeEncoder.h"
#include "nsIUnicodeEncodeHelper.h"
#include "nsUConvDll.h"
#include "nsIMappingCache.h"
#include "nsMappingCache.h"
#include "nsUnicodeEncodeHelper.h"
//----------------------------------------------------------------------
// Class nsUnicodeEncodeHelper [implementation]
NS_IMPL_ISUPPORTS1(nsUnicodeEncodeHelper, nsIUnicodeEncodeHelper)
nsUnicodeEncodeHelper::nsUnicodeEncodeHelper()
{
NS_INIT_REFCNT();
}
nsUnicodeEncodeHelper::~nsUnicodeEncodeHelper()
{
}
//----------------------------------------------------------------------
// Interface nsIUnicodeEncodeHelper [implementation]
NS_IMETHODIMP nsUnicodeEncodeHelper::ConvertByTable(
const PRUnichar * aSrc,
PRInt32 * aSrcLength,
char * aDest,
PRInt32 * aDestLength,
uShiftTable * aShiftTable,
uMappingTable * aMappingTable)
{
const PRUnichar * src = aSrc;
const PRUnichar * srcEnd = aSrc + *aSrcLength;
char * dest = aDest;
PRInt32 destLen = *aDestLength;
PRUnichar med;
PRInt32 bcw; // byte count for write;
nsresult res = NS_OK;
while (src < srcEnd) {
if (!uMapCode((uTable*) aMappingTable, NS_STATIC_CAST(PRUnichar, *(src++)), NS_REINTERPRET_CAST(PRUint16*, &med))) {
res = NS_ERROR_UENC_NOMAPPING;
break;
}
if (!uGenerate(aShiftTable, 0, med, (PRUint8 *)dest, destLen,
(PRUint32 *)&bcw)) {
src--;
res = NS_OK_UENC_MOREOUTPUT;
break;
}
dest += bcw;
destLen -= bcw;
}
*aSrcLength = src - aSrc;
*aDestLength = dest - aDest;
return res;
}
NS_IMETHODIMP nsUnicodeEncodeHelper::ConvertByMultiTable(
const PRUnichar * aSrc,
PRInt32 * aSrcLength,
char * aDest,
PRInt32 * aDestLength,
PRInt32 aTableCount,
uShiftTable ** aShiftTable,
uMappingTable ** aMappingTable)
{
const PRUnichar * src = aSrc;
const PRUnichar * srcEnd = aSrc + *aSrcLength;
char * dest = aDest;
PRInt32 destLen = *aDestLength;
PRUnichar med;
PRInt32 bcw; // byte count for write;
nsresult res = NS_OK;
PRInt32 i;
while (src < srcEnd) {
for (i=0; i<aTableCount; i++)
if (uMapCode((uTable*) aMappingTable[i], NS_STATIC_CAST(PRUint16, *src), NS_REINTERPRET_CAST(PRUint16*, &med))) break;
src++;
if (i == aTableCount) {
res = NS_ERROR_UENC_NOMAPPING;
break;
}
if (!uGenerate(aShiftTable[i], 0, med, (PRUint8 *)dest, destLen,
(PRUint32 *)&bcw)) {
src--;
res = NS_OK_UENC_MOREOUTPUT;
break;
}
dest += bcw;
destLen -= bcw;
}
*aSrcLength = src - aSrc;
*aDestLength = dest - aDest;
return res;
}
NS_IMETHODIMP nsUnicodeEncodeHelper::CreateCache(nsMappingCacheType aType, nsIMappingCache* aResult)
{
return nsMappingCache::CreateCache(aType, aResult);
}
NS_IMETHODIMP nsUnicodeEncodeHelper::DestroyCache(nsIMappingCache aCache)
{
return nsMappingCache::DestroyCache(aCache);
}
NS_IMETHODIMP nsUnicodeEncodeHelper::FillInfo(PRUint32 *aInfo, uMappingTable * aMappingTable)
{
uFillInfo((uTable*) aMappingTable, aInfo);
return NS_OK;
}
NS_IMETHODIMP nsUnicodeEncodeHelper::FillInfo(PRUint32 *aInfo, PRInt32 aTableCount, uMappingTable ** aMappingTable)
{
for (PRInt32 i=0; i<aTableCount; i++)
uFillInfo((uTable*) aMappingTable[i], aInfo);
return NS_OK;
}

View File

@@ -0,0 +1,90 @@
/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* ***** BEGIN LICENSE BLOCK *****
* Version: NPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Netscape Public License
* Version 1.1 (the "License"); you may not use this file except in
* compliance with the License. You may obtain a copy of the License at
* http://www.mozilla.org/NPL/
*
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the
* License.
*
* The Original Code is mozilla.org code.
*
* The Initial Developer of the Original Code is
* Netscape Communications Corporation.
* Portions created by the Initial Developer are Copyright (C) 1998
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
*
*
* Alternatively, the contents of this file may be used under the terms of
* either the GNU General Public License Version 2 or later (the "GPL"), or
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
* in which case the provisions of the GPL or the LGPL are applicable instead
* of those above. If you wish to allow use of your version of this file only
* under the terms of either the GPL or the LGPL, and not to allow others to
* use your version of this file under the terms of the NPL, indicate your
* decision by deleting the provisions above and replace them with the notice
* and other provisions required by the GPL or the LGPL. If you do not delete
* the provisions above, a recipient may use your version of this file under
* the terms of any one of the NPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
#ifndef nsUnicodeEncodeHelper_h__
#define nsUnicodeEncodeHelper_h__
#include "nsIUnicodeEncoder.h"
#include "nsIUnicodeEncodeHelper.h"
//----------------------------------------------------------------------
// Class nsUnicodeEncodeHelper [declaration]
/**
* The actual implementation of the nsIUnicodeEncodeHelper interface.
*
* @created 22/Nov/1998
* @author Catalin Rotaru [CATA]
*/
class nsUnicodeEncodeHelper : public nsIUnicodeEncodeHelper
{
NS_DECL_ISUPPORTS
public:
/**
* Class constructor.
*/
nsUnicodeEncodeHelper();
/**
* Class destructor.
*/
virtual ~nsUnicodeEncodeHelper();
//--------------------------------------------------------------------
// Interface nsIUnicodeEncodeHelper [declaration]
NS_IMETHOD ConvertByTable(const PRUnichar * aSrc, PRInt32 * aSrcLength,
char * aDest, PRInt32 * aDestLength, uShiftTable * aShiftTable,
uMappingTable * aMappingTable);
NS_IMETHOD ConvertByMultiTable(const PRUnichar * aSrc, PRInt32 * aSrcLength,
char * aDest, PRInt32 * aDestLength, PRInt32 aTableCount,
uShiftTable ** aShiftTable, uMappingTable ** aMappingTable);
NS_IMETHOD CreateCache(nsMappingCacheType aType, nsIMappingCache* aResult);
NS_IMETHOD DestroyCache(nsIMappingCache aCache);
NS_IMETHOD FillInfo(PRUint32* aInfo, uMappingTable * aMappingTable);
NS_IMETHOD FillInfo(PRUint32* aInfo, PRInt32 aTableCount, uMappingTable ** aMappingTable);
};
#endif // nsUnicodeEncodeHelper_h__

View File

@@ -0,0 +1,62 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* ***** BEGIN LICENSE BLOCK *****
* Version: NPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Netscape Public License
* Version 1.1 (the "License"); you may not use this file except in
* compliance with the License. You may obtain a copy of the License at
* http://www.mozilla.org/NPL/
*
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the
* License.
*
* The Original Code is Mozilla Communicator client code.
*
* The Initial Developer of the Original Code is
* Netscape Communications Corporation.
* Portions created by the Initial Developer are Copyright (C) 1998
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
*
*
* Alternatively, the contents of this file may be used under the terms of
* either the GNU General Public License Version 2 or later (the "GPL"), or
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
* in which case the provisions of the GPL or the LGPL are applicable instead
* of those above. If you wish to allow use of your version of this file only
* under the terms of either the GPL or the LGPL, and not to allow others to
* use your version of this file under the terms of the NPL, indicate your
* decision by deleting the provisions above and replace them with the notice
* and other provisions required by the GPL or the LGPL. If you do not delete
* the provisions above, a recipient may use your version of this file under
* the terms of any one of the NPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
#include "nsUCSupport.h"
#include "nsUnicodeToCP1252.h"
//----------------------------------------------------------------------
// Global functions and data [declaration]
static const PRUint16 g_ufMappingTable[] = {
#include "cp1252.uf"
};
static const PRInt16 g_ufShiftTable[] = {
0, u1ByteCharset ,
ShiftCell(0,0,0,0,0,0,0,0)
};
//----------------------------------------------------------------------
// Class nsUnicodeToCP1252 [implementation]
nsUnicodeToCP1252::nsUnicodeToCP1252()
: nsTableEncoderSupport((uShiftTable*) &g_ufShiftTable,
(uMappingTable*) &g_ufMappingTable, 1)
{
}

View File

@@ -0,0 +1,72 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* ***** BEGIN LICENSE BLOCK *****
* Version: NPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Netscape Public License
* Version 1.1 (the "License"); you may not use this file except in
* compliance with the License. You may obtain a copy of the License at
* http://www.mozilla.org/NPL/
*
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the
* License.
*
* The Original Code is Mozilla Communicator client code.
*
* The Initial Developer of the Original Code is
* Netscape Communications Corporation.
* Portions created by the Initial Developer are Copyright (C) 1998
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
*
*
* Alternatively, the contents of this file may be used under the terms of
* either the GNU General Public License Version 2 or later (the "GPL"), or
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
* in which case the provisions of the GPL or the LGPL are applicable instead
* of those above. If you wish to allow use of your version of this file only
* under the terms of either the GPL or the LGPL, and not to allow others to
* use your version of this file under the terms of the NPL, indicate your
* decision by deleting the provisions above and replace them with the notice
* and other provisions required by the GPL or the LGPL. If you do not delete
* the provisions above, a recipient may use your version of this file under
* the terms of any one of the NPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
#ifndef nsUnicodeToCP1252_h___
#define nsUnicodeToCP1252_h___
// Class ID for our UnicodeToCP1252 charset converter
// {7B8556AC-EC79-11d2-8AAC-00600811A836}
#define NS_UNICODETOCP1252_CID \
{ 0x7b8556ac, 0xec79, 0x11d2, {0x8a, 0xac, 0x0, 0x60, 0x8, 0x11, 0xa8, 0x36}}
#define NS_UNICODETOCP1252_CONTRACTID "@mozilla.org/intl/unicode/encoder;1?charset=windows-1252"
//#define NS_ERROR_UCONV_NOUNICODETOCP1252
// NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_UCONV, 0x31)
//----------------------------------------------------------------------
// Class nsUnicodeToCP1252 [declaration]
/**
* A character set converter from Unicode to CP1252.
*
* @created 20/Apr/1999
* @author Catalin Rotaru [CATA]
*/
class nsUnicodeToCP1252 : public nsTableEncoderSupport
{
public:
/**
* Class constructor.
*/
nsUnicodeToCP1252();
};
#endif /* nsUnicodeToCP1252_h___ */

View File

@@ -0,0 +1,62 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* ***** BEGIN LICENSE BLOCK *****
* Version: NPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Netscape Public License
* Version 1.1 (the "License"); you may not use this file except in
* compliance with the License. You may obtain a copy of the License at
* http://www.mozilla.org/NPL/
*
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the
* License.
*
* The Original Code is Mozilla Communicator client code.
*
* The Initial Developer of the Original Code is
* Netscape Communications Corporation.
* Portions created by the Initial Developer are Copyright (C) 1998
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
*
*
* Alternatively, the contents of this file may be used under the terms of
* either the GNU General Public License Version 2 or later (the "GPL"), or
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
* in which case the provisions of the GPL or the LGPL are applicable instead
* of those above. If you wish to allow use of your version of this file only
* under the terms of either the GPL or the LGPL, and not to allow others to
* use your version of this file under the terms of the NPL, indicate your
* decision by deleting the provisions above and replace them with the notice
* and other provisions required by the GPL or the LGPL. If you do not delete
* the provisions above, a recipient may use your version of this file under
* the terms of any one of the NPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
#include "nsUCSupport.h"
#include "nsUnicodeToISO88591.h"
//----------------------------------------------------------------------
// Global functions and data [declaration]
static const PRUint16 g_ufMappingTable[] = {
#include "8859-1.uf"
};
static const PRInt16 g_ufShiftTable[] = {
0, u1ByteCharset ,
ShiftCell(0,0,0,0,0,0,0,0)
};
//----------------------------------------------------------------------
// Class nsUnicodeToISO88591 [implementation]
nsUnicodeToISO88591::nsUnicodeToISO88591()
: nsTableEncoderSupport((uShiftTable*) &g_ufShiftTable,
(uMappingTable*) &g_ufMappingTable, 1)
{
}

View File

@@ -0,0 +1,71 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* ***** BEGIN LICENSE BLOCK *****
* Version: NPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Netscape Public License
* Version 1.1 (the "License"); you may not use this file except in
* compliance with the License. You may obtain a copy of the License at
* http://www.mozilla.org/NPL/
*
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the
* License.
*
* The Original Code is Mozilla Communicator client code.
*
* The Initial Developer of the Original Code is
* Netscape Communications Corporation.
* Portions created by the Initial Developer are Copyright (C) 1998
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
*
*
* Alternatively, the contents of this file may be used under the terms of
* either the GNU General Public License Version 2 or later (the "GPL"), or
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
* in which case the provisions of the GPL or the LGPL are applicable instead
* of those above. If you wish to allow use of your version of this file only
* under the terms of either the GPL or the LGPL, and not to allow others to
* use your version of this file under the terms of the NPL, indicate your
* decision by deleting the provisions above and replace them with the notice
* and other provisions required by the GPL or the LGPL. If you do not delete
* the provisions above, a recipient may use your version of this file under
* the terms of any one of the NPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
#ifndef nsUnicodeToISO88591_h___
#define nsUnicodeToISO88591_h___
// {920307B0-C6E8-11d2-8AA8-00600811A836}
#define NS_UNICODETOISO88591_CID \
{ 0x920307b0, 0xc6e8, 0x11d2, {0x8a, 0xa8, 0x0, 0x60, 0x8, 0x11, 0xa8, 0x36}}
#define NS_UNICODETOISO88591_CONTRACTID "@mozilla.org/intl/unicode/encoder;1?charset=ISO-8859-1"
//#define NS_ERROR_UCONV_NOUNICODETOISO88591
// NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_UCONV, 0x31)
//----------------------------------------------------------------------
// Class nsUnicodeToISO88591 [declaration]
/**
* A character set converter from Unicode to ISO88591.
*
* @created 17/Feb/1999
* @author Catalin Rotaru [CATA]
*/
class nsUnicodeToISO88591 : public nsTableEncoderSupport
{
public:
/**
* Class constructor.
*/
nsUnicodeToISO88591();
};
#endif /* nsUnicodeToISO88591_h___ */

View File

@@ -0,0 +1,62 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* ***** BEGIN LICENSE BLOCK *****
* Version: NPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Netscape Public License
* Version 1.1 (the "License"); you may not use this file except in
* compliance with the License. You may obtain a copy of the License at
* http://www.mozilla.org/NPL/
*
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the
* License.
*
* The Original Code is Mozilla Communicator client code.
*
* The Initial Developer of the Original Code is
* Netscape Communications Corporation.
* Portions created by the Initial Developer are Copyright (C) 1998
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
*
*
* Alternatively, the contents of this file may be used under the terms of
* either the GNU General Public License Version 2 or later (the "GPL"), or
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
* in which case the provisions of the GPL or the LGPL are applicable instead
* of those above. If you wish to allow use of your version of this file only
* under the terms of either the GPL or the LGPL, and not to allow others to
* use your version of this file under the terms of the NPL, indicate your
* decision by deleting the provisions above and replace them with the notice
* and other provisions required by the GPL or the LGPL. If you do not delete
* the provisions above, a recipient may use your version of this file under
* the terms of any one of the NPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
#include "nsUCSupport.h"
#include "nsUnicodeToMacRoman.h"
//----------------------------------------------------------------------
// Global functions and data [declaration]
static const PRUint16 g_MacRomanMappingTable[] = {
#include "macroman.uf"
};
static const PRInt16 g_MacRomanShiftTable[] = {
1, u1ByteCharset ,
ShiftCell(0,0,0,0,0,0,0,0)
};
//----------------------------------------------------------------------
// Class nsUnicodeToMacRoman [implementation]
nsUnicodeToMacRoman::nsUnicodeToMacRoman()
: nsTableEncoderSupport((uShiftTable*) &g_MacRomanShiftTable,
(uMappingTable*) &g_MacRomanMappingTable, 1)
{
}

View File

@@ -0,0 +1,69 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* ***** BEGIN LICENSE BLOCK *****
* Version: NPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Netscape Public License
* Version 1.1 (the "License"); you may not use this file except in
* compliance with the License. You may obtain a copy of the License at
* http://www.mozilla.org/NPL/
*
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the
* License.
*
* The Original Code is Mozilla Communicator client code.
*
* The Initial Developer of the Original Code is
* Netscape Communications Corporation.
* Portions created by the Initial Developer are Copyright (C) 1998
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
*
*
* Alternatively, the contents of this file may be used under the terms of
* either the GNU General Public License Version 2 or later (the "GPL"), or
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
* in which case the provisions of the GPL or the LGPL are applicable instead
* of those above. If you wish to allow use of your version of this file only
* under the terms of either the GPL or the LGPL, and not to allow others to
* use your version of this file under the terms of the NPL, indicate your
* decision by deleting the provisions above and replace them with the notice
* and other provisions required by the GPL or the LGPL. If you do not delete
* the provisions above, a recipient may use your version of this file under
* the terms of any one of the NPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
#ifndef nsUnicodeToMacRoman_h___
#define nsUnicodeToMacRoman_h___
// Class ID for our UnicodeToMacRoman charset converter
// {7B8556AF-EC79-11d2-8AAC-00600811A836}
#define NS_UNICODETOMACROMAN_CID \
{ 0x7b8556af, 0xec79, 0x11d2, {0x8a, 0xac, 0x0, 0x60, 0x8, 0x11, 0xa8, 0x36}}
#define NS_UNICODETOMACROMAN_CONTRACTID "@mozilla.org/intl/unicode/encoder;1?charset=x-mac-roman"
//----------------------------------------------------------------------
// Class nsUnicodeToMacRoman [declaration]
/**
* A character set converter from Unicode to MacRoman.
*
* @created 05/Apr/1999
* @author Catalin Rotaru [CATA]
*/
class nsUnicodeToMacRoman : public nsTableEncoderSupport
{
public:
/**
* Class constructor.
*/
nsUnicodeToMacRoman();
};
#endif /* nsUnicodeToMacRoman_h___ */

View File

@@ -0,0 +1,185 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* ***** BEGIN LICENSE BLOCK *****
* Version: NPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Netscape Public License
* Version 1.1 (the "License"); you may not use this file except in
* compliance with the License. You may obtain a copy of the License at
* http://www.mozilla.org/NPL/
*
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the
* License.
*
* The Original Code is Mozilla Communicator client code.
*
* The Initial Developer of the Original Code is
* Netscape Communications Corporation.
* Portions created by the Initial Developer are Copyright (C) 1998
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
*
*
* Alternatively, the contents of this file may be used under the terms of
* either the GNU General Public License Version 2 or later (the "GPL"), or
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
* in which case the provisions of the GPL or the LGPL are applicable instead
* of those above. If you wish to allow use of your version of this file only
* under the terms of either the GPL or the LGPL, and not to allow others to
* use your version of this file under the terms of the NPL, indicate your
* decision by deleting the provisions above and replace them with the notice
* and other provisions required by the GPL or the LGPL. If you do not delete
* the provisions above, a recipient may use your version of this file under
* the terms of any one of the NPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
//----------------------------------------------------------------------
// Global functions and data [declaration]
#include "nsUCSupport.h"
#include "nsUnicodeToUTF8.h"
#include <string.h>
NS_IMPL_ISUPPORTS1(nsUnicodeToUTF8, nsIUnicodeEncoder)
//----------------------------------------------------------------------
// nsUnicodeToUTF8 class [implementation]
NS_IMETHODIMP nsUnicodeToUTF8::GetMaxLength(const PRUnichar * aSrc,
PRInt32 aSrcLength,
PRInt32 * aDestLength)
{
// aSrc is interpreted as UTF16, 3 is normally enough.
// But when previous buffer only contains part of the surrogate pair, we
// need to complete it here. If the first word in following buffer is not
// in valid surrogate rang, we need to convert the remaining of last buffer
// to 3 bytes.
*aDestLength = 3*aSrcLength + 3;
return NS_OK;
}
NS_IMETHODIMP nsUnicodeToUTF8::FillInfo(PRUint32 *aInfo)
{
memset(aInfo, 0xFF, (0x10000L >> 3));
return NS_OK;
}
NS_IMETHODIMP nsUnicodeToUTF8::Convert(const PRUnichar * aSrc,
PRInt32 * aSrcLength,
char * aDest,
PRInt32 * aDestLength)
{
const PRUnichar * src = aSrc;
const PRUnichar * srcEnd = aSrc + *aSrcLength;
char * dest = aDest;
PRInt32 destLen = *aDestLength;
PRUint32 n;
//complete remaining of last conversion
if (mHighSurrogate) {
if (src < srcEnd) {
*aDestLength = 0;
return NS_OK_UENC_MOREINPUT;
}
if (*aDestLength < 4) {
*aSrcLength = 0;
*aDestLength = 0;
return NS_OK_UENC_MOREOUTPUT;
}
if (*src < (PRUnichar)0xdc00 || *src > (PRUnichar)0xdfff) { //not a pair
*dest++ = (char)0xe0 | (mHighSurrogate >> 12);
*dest++ = (char)0x80 | ((mHighSurrogate >> 6) & 0x003f);
*dest++ = (char)0x80 | (mHighSurrogate & 0x003f);
destLen -= 3;
} else {
n = ((mHighSurrogate - (PRUnichar)0xd800) << 10) +
(*src - (PRUnichar)0xdc00) + 0x10000;
*dest++ = (char)0xf0 | (n >> 18);
*dest++ = (char)0x80 | ((n >> 12) & 0x3f);
*dest++ = (char)0x80 | ((n >> 6) & 0x3f);
*dest++ = (char)0x80 | (n & 0x3f);
++src;
destLen -= 4;
}
mHighSurrogate = 0;
}
while (src < srcEnd) {
if ( *src < 0x007f) {
if (destLen < 1)
goto error_more_output;
*dest++ = (char)*src;
--destLen;
} else if (*src < 0x07ff) {
if (destLen < 2)
goto error_more_output;
*dest++ = (char)0xc0 | (*src >> 6);
*dest++ = (char)0x80 | (*src & 0x003f);
destLen -= 2;
} else if (*src >= (PRUnichar)0xD800 && *src < (PRUnichar)0xDA00) {
if ((src+1) >= srcEnd) {
//we need another surrogate to complete this unicode char
mHighSurrogate = *src;
*aDestLength = dest - aDest;
return NS_OK_UENC_MOREINPUT;
}
//handle surrogate
if (destLen < 4)
goto error_more_output;
if (*(src+1) < (PRUnichar)0xdc00 || *(src+1) > 0xdfff) { //not a pair
*dest++ = (char)0xe0 | (*src >> 12);
*dest++ = (char)0x80 | ((*src >> 6) & 0x003f);
*dest++ = (char)0x80 | (*src & 0x003f);
destLen -= 3;
} else {
n = ((*src - (PRUnichar)0xd800) << 10) + (*(src+1) - (PRUnichar)0xdc00) + (PRUnichar)0x10000;
*dest++ = (char)0xf0 | (n >> 18);
*dest++ = (char)0x80 | ((n >> 12) & 0x3f);
*dest++ = (char)0x80 | ((n >> 6) & 0x3f);
*dest++ = (char)0x80 | (n & 0x3f);
destLen -= 4;
++src;
}
} else {
if (destLen < 3)
goto error_more_output;
//treat rest of the character as BMP
*dest++ = (char)0xe0 | (*src >> 12);
*dest++ = (char)0x80 | ((*src >> 6) & 0x003f);
*dest++ = (char)0x80 | (*src & 0x003f);
destLen -= 3;
}
++src;
}
*aDestLength = dest - aDest;
return NS_OK;
error_more_output:
*aSrcLength = src - aSrc;
*aDestLength = dest - aDest;
return NS_OK_UENC_MOREOUTPUT;
}
NS_IMETHODIMP nsUnicodeToUTF8::Finish(char * aDest, PRInt32 * aDestLength)
{
char * dest = aDest;
if (mHighSurrogate) {
if (*aDestLength < 3) {
*aDestLength = 0;
return NS_OK_UENC_MOREOUTPUT;
}
*dest++ = (char)0xe0 | (mHighSurrogate >> 12);
*dest++ = (char)0x80 | ((mHighSurrogate >> 6) & 0x003f);
*dest++ = (char)0x80 | (mHighSurrogate & 0x003f);
mHighSurrogate = 0;
*aDestLength = 3;
return NS_OK;
}
*aDestLength = 0;
return NS_OK;
}

View File

@@ -0,0 +1,94 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* ***** BEGIN LICENSE BLOCK *****
* Version: NPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Netscape Public License
* Version 1.1 (the "License"); you may not use this file except in
* compliance with the License. You may obtain a copy of the License at
* http://www.mozilla.org/NPL/
*
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the
* License.
*
* The Original Code is Mozilla Communicator client code.
*
* The Initial Developer of the Original Code is
* Netscape Communications Corporation.
* Portions created by the Initial Developer are Copyright (C) 1998
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
*
*
* Alternatively, the contents of this file may be used under the terms of
* either the GNU General Public License Version 2 or later (the "GPL"), or
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
* in which case the provisions of the GPL or the LGPL are applicable instead
* of those above. If you wish to allow use of your version of this file only
* under the terms of either the GPL or the LGPL, and not to allow others to
* use your version of this file under the terms of the NPL, indicate your
* decision by deleting the provisions above and replace them with the notice
* and other provisions required by the GPL or the LGPL. If you do not delete
* the provisions above, a recipient may use your version of this file under
* the terms of any one of the NPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
#ifndef nsUnicodeToUTF8_h___
#define nsUnicodeToUTF8_h___
// Class ID for our UnicodeToUTF8 charset converter
// {7C657D18-EC5E-11d2-8AAC-00600811A836}
#define NS_UNICODETOUTF8_CID \
{ 0x7c657d18, 0xec5e, 0x11d2, {0x8a, 0xac, 0x0, 0x60, 0x8, 0x11, 0xa8, 0x36}}
#define NS_UNICODETOUTF8_CONTRACTID "@mozilla.org/intl/unicode/encoder;1?charset=UTF-8"
//#define NS_ERROR_UCONV_NOUNICODETOUTF8
// NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_UCONV, 0x31)
//----------------------------------------------------------------------
// Class nsUnicodeToUTF8 [declaration]
/**
* A character set converter from Unicode to UTF8.
*
* @created 05/Apr/1999
* @author Catalin Rotaru [CATA]
*/
class nsUnicodeToUTF8 : public nsIUnicodeEncoder
{
NS_DECL_ISUPPORTS
public:
/**
* Class constructor.
*/
nsUnicodeToUTF8() {NS_INIT_REFCNT(); mHighSurrogate = 0;};
NS_IMETHOD FillInfo(PRUint32* aInfo);
NS_IMETHOD Convert(const PRUnichar * aSrc,
PRInt32 * aSrcLength,
char * aDest,
PRInt32 * aDestLength);
NS_IMETHOD Finish(char * aDest, PRInt32 * aDestLength);
NS_IMETHOD GetMaxLength(const PRUnichar * aSrc, PRInt32 aSrcLength,
PRInt32 * aDestLength);
NS_IMETHOD Reset() {mHighSurrogate = 0; return NS_OK;}
NS_IMETHOD SetOutputErrorBehavior(PRInt32 aBehavior,
nsIUnicharEncoder * aEncoder, PRUnichar aChar) {return NS_OK;};
protected:
PRUnichar mHighSurrogate;
};
#endif /* nsUnicodeToUTF8_h___ */

View File

@@ -0,0 +1,190 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* ***** BEGIN LICENSE BLOCK *****
* Version: NPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Netscape Public License
* Version 1.1 (the "License"); you may not use this file except in
* compliance with the License. You may obtain a copy of the License at
* http://www.mozilla.org/NPL/
*
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the
* License.
*
* The Original Code is Mozilla Communicator client code.
*
* The Initial Developer of the Original Code is
* Netscape Communications Corporation.
* Portions created by the Initial Developer are Copyright (C) 1998
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
*
*
* Alternatively, the contents of this file may be used under the terms of
* either the GNU General Public License Version 2 or later (the "GPL"), or
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
* in which case the provisions of the GPL or the LGPL are applicable instead
* of those above. If you wish to allow use of your version of this file only
* under the terms of either the GPL or the LGPL, and not to allow others to
* use your version of this file under the terms of the NPL, indicate your
* decision by deleting the provisions above and replace them with the notice
* and other provisions required by the GPL or the LGPL. If you do not delete
* the provisions above, a recipient may use your version of this file under
* the terms of any one of the NPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
#include "nsIPlatformCharset.h"
#include "nsURLProperties.h"
#include "pratom.h"
#include <windows.h>
#include "nsUConvDll.h"
#include "nsIWin32Locale.h"
#include "nsCOMPtr.h"
#include "nsReadableUtils.h"
#include "nsLocaleCID.h"
#include "nsIComponentManager.h"
#include "nsITimelineService.h"
#include "nsPlatformCharset.h"
static nsURLProperties *gInfo = nsnull;
static PRInt32 gCnt= 0;
NS_IMPL_ISUPPORTS1(nsPlatformCharset, nsIPlatformCharset)
nsPlatformCharset::nsPlatformCharset()
{
NS_TIMELINE_START_TIMER("nsPlatformCharset()");
NS_INIT_REFCNT();
UINT acp = ::GetACP();
PRInt32 acpint = (PRInt32)(acp & 0x00FFFF);
nsAutoString acpKey; acpKey.Assign(NS_LITERAL_STRING("acp."));
acpKey.AppendInt(acpint, 10);
nsresult res = MapToCharset(acpKey, mCharset);
NS_TIMELINE_STOP_TIMER("nsPlatformCharset()");
NS_TIMELINE_MARK_TIMER("nsPlatformCharset()");
}
nsPlatformCharset::~nsPlatformCharset()
{
PR_AtomicDecrement(&gCnt);
if ((0 == gCnt) && (nsnull != gInfo)) {
delete gInfo;
gInfo = nsnull;
}
}
nsresult
nsPlatformCharset::InitInfo()
{
PR_AtomicIncrement(&gCnt); // count for gInfo
if (gInfo == nsnull) {
nsURLProperties *info = new nsURLProperties(NS_LITERAL_CSTRING("resource:/res/wincharset.properties"));
NS_ASSERTION(info , "cannot open properties file");
NS_ENSURE_TRUE(info, NS_ERROR_FAILURE);
gInfo = info;
}
return NS_OK;
}
nsresult
nsPlatformCharset::MapToCharset(nsAString& inANSICodePage, nsAString& outCharset)
{
//delay loading wincharset.properties bundle if possible
if (inANSICodePage.Equals(NS_LITERAL_STRING("acp.1252"))) {
outCharset = NS_LITERAL_STRING("windows-1252");
return NS_OK;
}
if (inANSICodePage.Equals(NS_LITERAL_STRING("acp.932"))) {
outCharset = NS_LITERAL_STRING("Shift_JIS");
return NS_OK;
}
// ensure the .property file is loaded
nsresult rv = InitInfo();
if (NS_FAILED(rv)) {
outCharset.Assign(NS_LITERAL_STRING("windows-1252"));
return rv;
}
rv = gInfo->Get(inANSICodePage, outCharset);
if (NS_FAILED(rv)) {
outCharset.Assign(NS_LITERAL_STRING("windows-1252"));
return rv;
}
return NS_OK;
}
NS_IMETHODIMP
nsPlatformCharset::GetCharset(nsPlatformCharsetSel selector, nsAString& oResult)
{
oResult = mCharset;
return NS_OK;
}
NS_IMETHODIMP
nsPlatformCharset::GetDefaultCharsetForLocale(const PRUnichar* localeName, PRUnichar** _retValue)
{
nsCOMPtr<nsIWin32Locale> winLocale;
LCID localeAsLCID;
char acp_name[6];
nsAutoString charset;
nsAutoString localeAsNSString(localeName);
//
// convert locale name to a code page (through the LCID)
//
nsresult result;
winLocale = do_CreateInstance(NS_WIN32LOCALE_CONTRACTID, &result);
result = winLocale->GetPlatformLocale(&localeAsNSString,&localeAsLCID);
if (NS_FAILED(result)) { *_retValue = ToNewUnicode(charset); return result; }
if (GetLocaleInfo(localeAsLCID,LOCALE_IDEFAULTANSICODEPAGE,acp_name,sizeof(acp_name))==0) {
*_retValue = ToNewUnicode(charset);
return NS_ERROR_FAILURE;
}
nsAutoString acp_key; acp_key.Assign(NS_LITERAL_STRING("acp."));
acp_key.AppendWithConversion(acp_name);
result = MapToCharset(acp_key,charset);
*_retValue = ToNewUnicode(charset);
return result;
}
NS_IMETHODIMP
nsPlatformCharset::Init()
{
return NS_OK;
}
nsresult
nsPlatformCharset::MapToCharset(short script, short region, nsAString& outCharset)
{
return NS_OK;
}
nsresult
nsPlatformCharset::InitGetCharset(nsAString &oString)
{
return NS_OK;
}
nsresult
nsPlatformCharset::ConvertLocaleToCharsetUsingDeprecatedConfig(nsAutoString& locale, nsAString& oResult)
{
return NS_OK;
}
nsresult
nsPlatformCharset::VerifyCharset(nsString &aCharset)
{
return NS_OK;
}

View File

@@ -0,0 +1,40 @@
##
## The contents of this file are subject to the Netscape Public
## License Version 1.1 (the "License"); you may not use this file
## except in compliance with the License. You may obtain a copy of
## the License at http://www.mozilla.org/NPL/
##
## Software distributed under the License is distributed on an "AS
## IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
## implied. See the License for the specific language governing
## rights and limitations under the License.
##
## The Original Code is mozilla.org code.
##
## The Initial Developer of the Original Code is Netscape
## Communications Corporation. Portions created by Netscape are
## Copyright (C) 1999 Netscape Communications Corporation. All
## Rights Reserved.
##
## Contributor(s):
##
## This file map an OS/2 codepage to a charset name
## We use this to figure out the charset of file system, clipboard, etc
##
os2.850=IBM850
os2.852=IBM852
os2.855=IBM855
os2.857=IBM857
os2.862=IBM862
os2.864=IBM864
os2.866=IBM866
os2.874=TIS-620
os2.932=Shift_JIS
os2.936=GB2312
os2.949=EUC-KR
os2.950=Big5
os2.1381=GB2312
os2.1386=GB2312
os2.813=ISO-8859-7
os2.915=ISO-8859-5
os2.1004=ISO-8859-1

View File

@@ -0,0 +1,58 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* ***** BEGIN LICENSE BLOCK *****
* Version: NPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Netscape Public License
* Version 1.1 (the "License"); you may not use this file except in
* compliance with the License. You may obtain a copy of the License at
* http://www.mozilla.org/NPL/
*
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the
* License.
*
* The Original Code is Mozilla Communicator client code.
*
* The Initial Developer of the Original Code is
* Netscape Communications Corporation.
* Portions created by the Initial Developer are Copyright (C) 1998
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
*
*
* Alternatively, the contents of this file may be used under the terms of
* either the GNU General Public License Version 2 or later (the "GPL"), or
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
* in which case the provisions of the GPL or the LGPL are applicable instead
* of those above. If you wish to allow use of your version of this file only
* under the terms of either the GPL or the LGPL, and not to allow others to
* use your version of this file under the terms of the NPL, indicate your
* decision by deleting the provisions above and replace them with the notice
* and other provisions required by the GPL or the LGPL. If you do not delete
* the provisions above, a recipient may use your version of this file under
* the terms of any one of the NPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
#ifndef ubase_h__
#define ubase_h__
#ifdef _WIN32
#ifndef NS_WIN32
#define NS_WIN32 1
#endif
#endif
#if defined(__unix)
#ifndef NS_UNIX
#define NS_UNIX 1
#endif
#endif
#include "prtypes.h"
#define PRIVATE
#define MODULE_PRIVATE
#endif

View File

@@ -0,0 +1,987 @@
/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* ***** BEGIN LICENSE BLOCK *****
* Version: NPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Netscape Public License
* Version 1.1 (the "License"); you may not use this file except in
* compliance with the License. You may obtain a copy of the License at
* http://www.mozilla.org/NPL/
*
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the
* License.
*
* The Original Code is mozilla.org code.
*
* The Initial Developer of the Original Code is
* Netscape.
* Portions created by the Initial Developer are Copyright (C) 1998
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
* jeroen.dobbelaere@acunia.com
*
*
* Alternatively, the contents of this file may be used under the terms of
* either the GNU General Public License Version 2 or later (the "GPL"), or
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
* in which case the provisions of the GPL or the LGPL are applicable instead
* of those above. If you wish to allow use of your version of this file only
* under the terms of either the GPL or the LGPL, and not to allow others to
* use your version of this file under the terms of the NPL, indicate your
* decision by deleting the provisions above and replace them with the notice
* and other provisions required by the GPL or the LGPL. If you do not delete
* the provisions above, a recipient may use your version of this file under
* the terms of any one of the NPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
#include "unicpriv.h"
/*=================================================================================
=================================================================================*/
typedef PRBool (*uSubGeneratorFunc) (PRUint16 in, unsigned char* out);
/*=================================================================================
=================================================================================*/
typedef PRBool (*uGeneratorFunc) (
uShiftTable *shift,
PRInt32* state,
PRUint16 in,
unsigned char* out,
PRUint32 outbuflen,
PRUint32* outlen
);
MODULE_PRIVATE PRBool uGenerate(
uShiftTable *shift,
PRInt32* state,
PRUint16 in,
unsigned char* out,
PRUint32 outbuflen,
PRUint32* outlen
);
#define uSubGennerator(sub,in,out) (* m_subgenerator[sub])((in),(out))
PRIVATE PRBool uCheckAndGenAlways1Byte(
uShiftTable *shift,
PRInt32* state,
PRUint16 in,
unsigned char* out,
PRUint32 outbuflen,
PRUint32* outlen
);
PRIVATE PRBool uCheckAndGenAlways2Byte(
uShiftTable *shift,
PRInt32* state,
PRUint16 in,
unsigned char* out,
PRUint32 outbuflen,
PRUint32* outlen
);
PRIVATE PRBool uCheckAndGenAlways2ByteShiftGR(
uShiftTable *shift,
PRInt32* state,
PRUint16 in,
unsigned char* out,
PRUint32 outbuflen,
PRUint32* outlen
);
PRIVATE PRBool uCheckAndGenByTable(
uShiftTable *shift,
PRInt32* state,
PRUint16 in,
unsigned char* out,
PRUint32 outbuflen,
PRUint32* outlen
);
PRIVATE PRBool uCheckAndGen2ByteGRPrefix8F(
uShiftTable *shift,
PRInt32* state,
PRUint16 in,
unsigned char* out,
PRUint32 outbuflen,
PRUint32* outlen
);
PRIVATE PRBool uCheckAndGen2ByteGRPrefix8EA2(
uShiftTable *shift,
PRInt32* state,
PRUint16 in,
unsigned char* out,
PRUint32 outbuflen,
PRUint32* outlen
);
PRIVATE PRBool uCheckAndGenAlways2ByteSwap(
uShiftTable *shift,
PRInt32* state,
PRUint16 in,
unsigned char* out,
PRUint32 outbuflen,
PRUint32* outlen
);
PRIVATE PRBool uCheckAndGenAlways4Byte(
uShiftTable *shift,
PRInt32* state,
PRUint16 in,
unsigned char* out,
PRUint32 outbuflen,
PRUint32* outlen
);
PRIVATE PRBool uCheckAndGenAlways4ByteSwap(
uShiftTable *shift,
PRInt32* state,
PRUint16 in,
unsigned char* out,
PRUint32 outbuflen,
PRUint32* outlen
);
PRIVATE PRBool uCheckAndGen2ByteGRPrefix8EA3(
uShiftTable *shift,
PRInt32* state,
PRUint16 in,
unsigned char* out,
PRUint32 outbuflen,
PRUint32* outlen
);
PRIVATE PRBool uCheckAndGen2ByteGRPrefix8EA4(
uShiftTable *shift,
PRInt32* state,
PRUint16 in,
unsigned char* out,
PRUint32 outbuflen,
PRUint32* outlen
);
PRIVATE PRBool uCheckAndGen2ByteGRPrefix8EA5(
uShiftTable *shift,
PRInt32* state,
PRUint16 in,
unsigned char* out,
PRUint32 outbuflen,
PRUint32* outlen
);
PRIVATE PRBool uCheckAndGen2ByteGRPrefix8EA6(
uShiftTable *shift,
PRInt32* state,
PRUint16 in,
unsigned char* out,
PRUint32 outbuflen,
PRUint32* outlen
);
PRIVATE PRBool uCheckAndGen2ByteGRPrefix8EA7(
uShiftTable *shift,
PRInt32* state,
PRUint16 in,
unsigned char* out,
PRUint32 outbuflen,
PRUint32* outlen
);
PRIVATE PRBool uCheckAndGenAlways1ByteShiftGL(
uShiftTable *shift,
PRInt32* state,
PRUint16 in,
unsigned char* out,
PRUint32 outbuflen,
PRUint32* outlen
);
PRIVATE PRBool uCnGAlways8BytesDecomposedHangul(
uShiftTable *shift,
PRInt32* state,
PRUint16 in,
unsigned char* out,
PRUint32 outbuflen,
PRUint32* outlen
);
PRIVATE PRBool uCnGAlways6BytesGLDecomposedHangul(
uShiftTable *shift,
PRInt32* state,
PRUint16 in,
unsigned char* out,
PRUint32 outbuflen,
PRUint32* outlen
);
PRIVATE PRBool uCheckAndGenJohabHangul(
uShiftTable *shift,
PRInt32* state,
PRUint16 in,
unsigned char* out,
PRUint32 outbuflen,
PRUint32* outlen
);
PRIVATE PRBool uCheckAndGenJohabSymbol(
uShiftTable *shift,
PRInt32* state,
PRUint16 in,
unsigned char* out,
PRUint32 outbuflen,
PRUint32* outlen
);
PRIVATE PRBool uCheckAndGen4BytesGB18030(
uShiftTable *shift,
PRInt32* state,
PRUint16 in,
unsigned char* out,
PRUint32 outbuflen,
PRUint32* outlen
);
PRIVATE PRBool uGenDecomposedHangulCommon(
uShiftTable *shift,
PRInt32* state,
PRUint16 in,
unsigned char* out,
PRUint32 outbuflen,
PRUint32* outlen,
PRUint8 mask,
PRUint16 nbyte
);
PRIVATE PRBool uGenAlways2Byte(
PRUint16 in,
unsigned char* out
);
PRIVATE PRBool uGenAlways2ByteShiftGR(
PRUint16 in,
unsigned char* out
);
PRIVATE PRBool uGenAlways1Byte(
PRUint16 in,
unsigned char* out
);
PRIVATE PRBool uGenAlways1BytePrefix8E(
PRUint16 in,
unsigned char* out
);
PRIVATE PRBool uGenAlways2ByteUTF8(
PRUint16 in,
unsigned char* out
);
PRIVATE PRBool uGenAlways3ByteUTF8(
PRUint16 in,
unsigned char* out
);
/*=================================================================================
=================================================================================*/
PRIVATE uGeneratorFunc m_generator[uNumOfCharsetType] =
{
uCheckAndGenAlways1Byte,
uCheckAndGenAlways2Byte,
uCheckAndGenByTable,
uCheckAndGenAlways2ByteShiftGR,
uCheckAndGen2ByteGRPrefix8F,
uCheckAndGen2ByteGRPrefix8EA2,
uCheckAndGenAlways2ByteSwap,
uCheckAndGenAlways4Byte,
uCheckAndGenAlways4ByteSwap,
uCheckAndGen2ByteGRPrefix8EA3,
uCheckAndGen2ByteGRPrefix8EA4,
uCheckAndGen2ByteGRPrefix8EA5,
uCheckAndGen2ByteGRPrefix8EA6,
uCheckAndGen2ByteGRPrefix8EA7,
uCheckAndGenAlways1ByteShiftGL,
uCnGAlways8BytesDecomposedHangul,
uCnGAlways6BytesGLDecomposedHangul,
uCheckAndGenJohabHangul,
uCheckAndGenJohabSymbol,
uCheckAndGen4BytesGB18030,
uCheckAndGenAlways2Byte /* place-holder for GR128 */
};
/*=================================================================================
=================================================================================*/
PRIVATE uSubGeneratorFunc m_subgenerator[uNumOfCharType] =
{
uGenAlways1Byte,
uGenAlways2Byte,
uGenAlways2ByteShiftGR,
uGenAlways1BytePrefix8E,
uGenAlways2ByteUTF8,
uGenAlways3ByteUTF8
};
/*=================================================================================
=================================================================================*/
MODULE_PRIVATE PRBool uGenerate(
uShiftTable *shift,
PRInt32* state,
PRUint16 in,
unsigned char* out,
PRUint32 outbuflen,
PRUint32* outlen
)
{
return (* m_generator[shift->classID]) (shift,state,in,out,outbuflen,outlen);
}
/*=================================================================================
=================================================================================*/
PRIVATE PRBool uGenAlways1Byte(
PRUint16 in,
unsigned char* out
)
{
out[0] = (unsigned char)in;
return PR_TRUE;
}
/*=================================================================================
=================================================================================*/
PRIVATE PRBool uGenAlways2Byte(
PRUint16 in,
unsigned char* out
)
{
out[0] = (unsigned char)((in >> 8) & 0xff);
out[1] = (unsigned char)(in & 0xff);
return PR_TRUE;
}
/*=================================================================================
=================================================================================*/
PRIVATE PRBool uGenAlways2ByteShiftGR(
PRUint16 in,
unsigned char* out
)
{
out[0] = (unsigned char)(((in >> 8) & 0xff) | 0x80);
out[1] = (unsigned char)((in & 0xff) | 0x80);
return PR_TRUE;
}
/*=================================================================================
=================================================================================*/
PRIVATE PRBool uGenAlways1BytePrefix8E(
PRUint16 in,
unsigned char* out
)
{
out[0] = 0x8E;
out[1] = (unsigned char)(in & 0xff);
return PR_TRUE;
}
/*=================================================================================
=================================================================================*/
PRIVATE PRBool uGenAlways2ByteUTF8(
PRUint16 in,
unsigned char* out
)
{
out[0] = (unsigned char)(0xC0 | (( in >> 6 ) & 0x1F));
out[1] = (unsigned char)(0x80 | (( in ) & 0x3F));
return PR_TRUE;
}
/*=================================================================================
=================================================================================*/
PRIVATE PRBool uGenAlways3ByteUTF8(
PRUint16 in,
unsigned char* out
)
{
out[0] = (unsigned char)(0xE0 | (( in >> 12 ) & 0x0F));
out[1] = (unsigned char)(0x80 | (( in >> 6 ) & 0x3F));
out[2] = (unsigned char)(0x80 | (( in ) & 0x3F));
return PR_TRUE;
}
/*=================================================================================
=================================================================================*/
PRIVATE PRBool uCheckAndGenAlways1Byte(
uShiftTable *shift,
PRInt32* state,
PRUint16 in,
unsigned char* out,
PRUint32 outbuflen,
PRUint32* outlen
)
{
/* Don't check inlen. The caller should ensure it is larger than 0 */
/* Oops, I don't agree. Code changed to check every time. [CATA] */
if(outbuflen < 1)
return PR_FALSE;
else
{
*outlen = 1;
out[0] = in & 0xff;
return PR_TRUE;
}
}
/*=================================================================================
=================================================================================*/
PRIVATE PRBool uCheckAndGenAlways2Byte(
uShiftTable *shift,
PRInt32* state,
PRUint16 in,
unsigned char* out,
PRUint32 outbuflen,
PRUint32* outlen
)
{
if(outbuflen < 2)
return PR_FALSE;
else
{
*outlen = 2;
out[0] = ((in >> 8 ) & 0xff);
out[1] = in & 0xff;
return PR_TRUE;
}
}
/*=================================================================================
=================================================================================*/
PRIVATE PRBool uCheckAndGenAlways2ByteShiftGR(
uShiftTable *shift,
PRInt32* state,
PRUint16 in,
unsigned char* out,
PRUint32 outbuflen,
PRUint32* outlen
)
{
if(outbuflen < 2)
return PR_FALSE;
else
{
*outlen = 2;
out[0] = ((in >> 8 ) & 0xff) | 0x80;
out[1] = (in & 0xff) | 0x80;
return PR_TRUE;
}
}
/*=================================================================================
=================================================================================*/
PRIVATE PRBool uCheckAndGenByTable(
uShiftTable *shift,
PRInt32* state,
PRUint16 in,
unsigned char* out,
PRUint32 outbuflen,
PRUint32* outlen
)
{
PRInt16 i;
uShiftCell* cell = &(shift->shiftcell[0]);
PRInt16 itemnum = shift->numOfItem;
unsigned char inH, inL;
inH = (in >> 8) & 0xff;
inL = (in & 0xff );
for(i=0;i<itemnum;i++)
{
if( ( inL >= cell[i].shiftout_MinLB) &&
( inL <= cell[i].shiftout_MaxLB) &&
( inH >= cell[i].shiftout_MinHB) &&
( inH <= cell[i].shiftout_MaxHB) )
{
if(outbuflen < cell[i].reserveLen)
return PR_FALSE;
else
{
*outlen = cell[i].reserveLen;
return (uSubGennerator(cell[i].classID,in,out));
}
}
}
return PR_FALSE;
}
/*=================================================================================
=================================================================================*/
PRIVATE PRBool uCheckAndGen2ByteGRPrefix8F( uShiftTable *shift,
PRInt32* state,
PRUint16 in,
unsigned char* out,
PRUint32 outbuflen,
PRUint32* outlen
)
{
if(outbuflen < 3)
return PR_FALSE;
else
{
*outlen = 3;
out[0] = 0x8F;
out[1] = ((in >> 8 ) & 0xff) | 0x80;
out[2] = (in & 0xff) | 0x80;
return PR_TRUE;
}
}
/*=================================================================================
=================================================================================*/
PRIVATE PRBool uCheckAndGen2ByteGRPrefix8EA2( uShiftTable *shift,
PRInt32* state,
PRUint16 in,
unsigned char* out,
PRUint32 outbuflen,
PRUint32* outlen
)
{
if(outbuflen < 4)
return PR_FALSE;
else
{
*outlen = 4;
out[0] = 0x8E;
out[1] = 0xA2;
out[2] = ((in >> 8 ) & 0xff) | 0x80;
out[3] = (in & 0xff) | 0x80;
return PR_TRUE;
}
}
/*=================================================================================
=================================================================================*/
PRIVATE PRBool uCheckAndGenAlways2ByteSwap(
uShiftTable *shift,
PRInt32* state,
PRUint16 in,
unsigned char* out,
PRUint32 outbuflen,
PRUint32* outlen
)
{
if(outbuflen < 2)
return PR_FALSE;
else
{
*outlen = 2;
out[0] = in & 0xff;
out[1] = ((in >> 8 ) & 0xff);
return PR_TRUE;
}
}
/*=================================================================================
=================================================================================*/
PRIVATE PRBool uCheckAndGenAlways4Byte(
uShiftTable *shift,
PRInt32* state,
PRUint16 in,
unsigned char* out,
PRUint32 outbuflen,
PRUint32* outlen
)
{
if(outbuflen < 4)
return PR_FALSE;
else
{
*outlen = 4;
out[0] = out[1] = 0x00;
out[2] = ((in >> 8 ) & 0xff);
out[3] = in & 0xff;
return PR_TRUE;
}
}
/*=================================================================================
=================================================================================*/
PRIVATE PRBool uCheckAndGenAlways4ByteSwap(
uShiftTable *shift,
PRInt32* state,
PRUint16 in,
unsigned char* out,
PRUint32 outbuflen,
PRUint32* outlen
)
{
if(outbuflen < 4)
return PR_FALSE;
else
{
*outlen = 4;
out[0] = ((in >> 8 ) & 0xff);
out[1] = in & 0xff;
out[2] = out[3] = 0x00;
return PR_TRUE;
}
}
/*=================================================================================
=================================================================================*/
PRIVATE PRBool uCheckAndGen2ByteGRPrefix8EA3( uShiftTable *shift,
PRInt32* state,
PRUint16 in,
unsigned char* out,
PRUint32 outbuflen,
PRUint32* outlen
)
{
if(outbuflen < 4)
return PR_FALSE;
else
{
*outlen = 4;
out[0] = 0x8E;
out[1] = 0xA3;
out[2] = ((in >> 8 ) & 0xff) | 0x80;
out[3] = (in & 0xff) | 0x80;
return PR_TRUE;
}
}
/*=================================================================================
=================================================================================*/
PRIVATE PRBool uCheckAndGen2ByteGRPrefix8EA4( uShiftTable *shift,
PRInt32* state,
PRUint16 in,
unsigned char* out,
PRUint32 outbuflen,
PRUint32* outlen
)
{
if(outbuflen < 4)
return PR_FALSE;
else
{
*outlen = 4;
out[0] = 0x8E;
out[1] = 0xA4;
out[2] = ((in >> 8 ) & 0xff) | 0x80;
out[3] = (in & 0xff) | 0x80;
return PR_TRUE;
}
}
/*=================================================================================
=================================================================================*/
PRIVATE PRBool uCheckAndGen2ByteGRPrefix8EA5( uShiftTable *shift,
PRInt32* state,
PRUint16 in,
unsigned char* out,
PRUint32 outbuflen,
PRUint32* outlen
)
{
if(outbuflen < 4)
return PR_FALSE;
else
{
*outlen = 4;
out[0] = 0x8E;
out[1] = 0xA5;
out[2] = ((in >> 8 ) & 0xff) | 0x80;
out[3] = (in & 0xff) | 0x80;
return PR_TRUE;
}
}
/*=================================================================================
=================================================================================*/
PRIVATE PRBool uCheckAndGen2ByteGRPrefix8EA6( uShiftTable *shift,
PRInt32* state,
PRUint16 in,
unsigned char* out,
PRUint32 outbuflen,
PRUint32* outlen
)
{
if(outbuflen < 4)
return PR_FALSE;
else
{
*outlen = 4;
out[0] = 0x8E;
out[1] = 0xA6;
out[2] = ((in >> 8 ) & 0xff) | 0x80;
out[3] = (in & 0xff) | 0x80;
return PR_TRUE;
}
}
/*=================================================================================
=================================================================================*/
PRIVATE PRBool uCheckAndGen2ByteGRPrefix8EA7( uShiftTable *shift,
PRInt32* state,
PRUint16 in,
unsigned char* out,
PRUint32 outbuflen,
PRUint32* outlen
)
{
if(outbuflen < 4)
return PR_FALSE;
else
{
*outlen = 4;
out[0] = 0x8E;
out[1] = 0xA7;
out[2] = ((in >> 8 ) & 0xff) | 0x80;
out[3] = (in & 0xff) | 0x80;
return PR_TRUE;
}
}
/*=================================================================================
=================================================================================*/
PRIVATE PRBool uCheckAndGenAlways1ByteShiftGL(
uShiftTable *shift,
PRInt32* state,
PRUint16 in,
unsigned char* out,
PRUint32 outbuflen,
PRUint32* outlen
)
{
/* Don't check inlen. The caller should ensure it is larger than 0 */
/* Oops, I don't agree. Code changed to check every time. [CATA] */
if(outbuflen < 1)
return PR_FALSE;
else
{
*outlen = 1;
out[0] = in & 0x7f;
return PR_TRUE;
}
}
#define SBase 0xAC00
#define LCount 19
#define VCount 21
#define TCount 28
#define NCount (VCount * TCount)
/*=================================================================================
=================================================================================*/
PRIVATE PRBool uGenDecomposedHangulCommon(
uShiftTable *shift,
PRInt32* state,
PRUint16 in,
unsigned char* out,
PRUint32 outbuflen,
PRUint32* outlen,
PRUint8 mask,
PRUint16 nbyte
)
{
if(outbuflen < 8)
return PR_FALSE;
else
{
static PRUint8 lMap[LCount] = {
0xa1, 0xa2, 0xa4, 0xa7, 0xa8, 0xa9, 0xb1, 0xb2, 0xb3, 0xb5,
0xb6, 0xb7, 0xb8, 0xb9, 0xba, 0xbb, 0xbc, 0xbd, 0xbe
};
static PRUint8 tMap[TCount] = {
0xd4, 0xa1, 0xa2, 0xa3, 0xa4, 0xa5, 0xa6, 0xa7, 0xa9, 0xaa,
0xab, 0xac, 0xad, 0xae, 0xaf, 0xb0, 0xb1, 0xb2, 0xb4, 0xb5,
0xb6, 0xb7, 0xb8, 0xba, 0xbb, 0xbc, 0xbd, 0xbe
};
PRUint16 SIndex, LIndex, VIndex, TIndex;
PRUint16 offset;
/* the following line are copy from Unicode 2.0 page 3-13 */
/* item 1 of Hangul Syllabel Decomposition */
SIndex = in - SBase;
/* the following lines are copy from Unicode 2.0 page 3-14 */
/* item 2 of Hangul Syllabel Decomposition w/ modification */
LIndex = SIndex / NCount;
VIndex = (SIndex % NCount) / TCount;
TIndex = SIndex % TCount;
*outlen = nbyte;
offset = nbyte == 6 ? 0 : 2;
out[0] = out[2] = out[4] = 0xa4 & mask;
out[1+offset] = lMap[LIndex] & mask;
out[3+offset] = (VIndex + 0xbf) & mask;
out[5+offset] = tMap[TIndex] & mask;
if ( nbyte == 8 )
{
out[6] = 0xa4 & mask;
out[1] = 0xd4 & mask;
}
return PR_TRUE;
}
}
PRIVATE PRBool uCnGAlways8BytesDecomposedHangul(
uShiftTable *shift,
PRInt32* state,
PRUint16 in,
unsigned char* out,
PRUint32 outbuflen,
PRUint32* outlen
)
{
return uGenDecomposedHangulCommon(shift,state,in,out,outbuflen,outlen,0xff,8);
}
/*
For rendering of Hangul in X11 with fonts with glyphs for only
2350 syllables, drop the first 2bytes anchoring the representation
of Hangul syllables with 8byte sequence.
*/
PRIVATE PRBool uCnGAlways6BytesGLDecomposedHangul(
uShiftTable *shift,
PRInt32* state,
PRUint16 in,
unsigned char* out,
PRUint32 outbuflen,
PRUint32* outlen
)
{
return uGenDecomposedHangulCommon(shift,state,in,out,outbuflen,outlen,0x7f,6);
}
PRIVATE PRBool uCheckAndGenJohabHangul(
uShiftTable *shift,
PRInt32* state,
PRUint16 in,
unsigned char* out,
PRUint32 outbuflen,
PRUint32* outlen
)
{
if(outbuflen < 2)
return PR_FALSE;
else
{
/*
See Table 4-45 (page 183) of CJKV Information Processing
for detail explaination of the following table
*/
/*
static PRUint8 lMap[LCount] = {
2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20
};
Therefore lMap[i] == i+2;
*/
static PRUint8 vMap[VCount] = {
/* no 0,1,2 */
3,4,5,6,7, /* no 8,9 */
10,11,12,13,14,15, /* no 16,17 */
18,19,20,21,22,23, /* no 24,25 */
26,27,28,29
};
static PRUint8 tMap[TCount] = {
1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17, /* no 18 */
19,20,21,22,23,24,25,26,27,28,29
};
PRUint16 SIndex, LIndex, VIndex, TIndex, ch;
/* the following line are copy from Unicode 2.0 page 3-13 */
/* item 1 of Hangul Syllabel Decomposition */
SIndex = in - SBase;
/* the following lines are copy from Unicode 2.0 page 3-14 */
/* item 2 of Hangul Syllabel Decomposition w/ modification */
LIndex = SIndex / NCount;
VIndex = (SIndex % NCount) / TCount;
TIndex = SIndex % TCount;
*outlen = 2;
ch = 0x8000 |
((LIndex+2)<<10) |
(vMap[VIndex]<<5)|
tMap[TIndex];
out[0] = (ch >> 8);
out[1] = ch & 0x00FF;
#if 0
printf("Johab Hangul %x %x in=%x L=%d V=%d T=%d\n", out[0], out[1], in, LIndex, VIndex, TIndex);
#endif
return PR_TRUE;
}
}
PRIVATE PRBool uCheckAndGenJohabSymbol(
uShiftTable *shift,
PRInt32* state,
PRUint16 in,
unsigned char* out,
PRUint32 outbuflen,
PRUint32* outlen
)
{
if(outbuflen < 2)
return PR_FALSE;
else
{
/* The following code are based on the Perl code listed under
* "ISO-2022-KR or EUC-KR to Johab Conversion" (page 1013)
* in the book "CJKV Information Processing" by
* Ken Lunde <lunde@adobe.com>
*
* sub convert2johab($) { # Convert ISO-2022-KR or EUC-KR to Johab
* my @euc = unpack("C*", $_[0]);
* my ($fe_off, $hi_off, $lo_off) = (0,0,1);
* my @out = ();
* while(($hi, $lo) = splice(@euc, 0, 2)) {
* $hi &= 127; $lo &= 127;
* $fe_off = 21 if $hi == 73;
* $fe_off = 34 if $hi == 126;
* ($hi_off, $lo_off) = ($lo_off, $hi_off) if ($hi <74 or $hi >125);
* push(@out, ((($hi+$hi_off) >> 1)+ ($hi <74 ? 200:187)- $fe_off),
* $lo + ((($hi+$lo_off) & 1) ? ($lo > 110 ? 34:16):128));
* }
* return pack("C*", @out);
*/
unsigned char fe_off = 0;
unsigned char hi_off = 0;
unsigned char lo_off = 1;
unsigned char hi = (in >> 8) & 0x7F;
unsigned char lo = in & 0x7F;
if(73 == hi)
fe_off = 21;
if(126 == hi)
fe_off = 34;
if( (hi < 74) || ( hi > 125) )
{
hi_off = 1;
lo_off = 0;
}
*outlen = 2;
out[0] = ((hi+hi_off) >> 1) + ((hi<74) ? 200 : 187 ) - fe_off;
out[1] = lo + (((hi+lo_off) & 1) ? ((lo > 110) ? 34 : 16) :
128);
#if 0
printf("Johab Symbol %x %x in=%x\n", out[0], out[1], in);
#endif
return PR_TRUE;
}
}
PRIVATE PRBool uCheckAndGen4BytesGB18030(
uShiftTable *shift,
PRInt32* state,
PRUint16 in,
unsigned char* out,
PRUint32 outbuflen,
PRUint32* outlen
)
{
if(outbuflen < 4)
return PR_FALSE;
out[0] = (in / (10*126*10)) + 0x81;
in %= (10*126*10);
out[1] = (in / (10*126)) + 0x30;
in %= (10*126);
out[2] = (in / (10)) + 0x81;
out[3] = (in % 10) + 0x30;
*outlen = 4;
return PR_TRUE;
}

View File

@@ -0,0 +1,225 @@
/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* ***** BEGIN LICENSE BLOCK *****
* Version: NPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Netscape Public License
* Version 1.1 (the "License"); you may not use this file except in
* compliance with the License. You may obtain a copy of the License at
* http://www.mozilla.org/NPL/
*
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the
* License.
*
* The Original Code is mozilla.org code.
*
* The Initial Developer of the Original Code is
* Netscape.
* Portions created by the Initial Developer are Copyright (C) 1998
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
* jeroen.dobbelaere@acunia.com
*
*
* Alternatively, the contents of this file may be used under the terms of
* either the GNU General Public License Version 2 or later (the "GPL"), or
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
* in which case the provisions of the GPL or the LGPL are applicable instead
* of those above. If you wish to allow use of your version of this file only
* under the terms of either the GPL or the LGPL, and not to allow others to
* use your version of this file under the terms of the NPL, indicate your
* decision by deleting the provisions above and replace them with the notice
* and other provisions required by the GPL or the LGPL. If you do not delete
* the provisions above, a recipient may use your version of this file under
* the terms of any one of the NPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
/* #include "PRIntlpriv.h" */
#include "unicpriv.h"
typedef PRUint16 (* MapFormatFunc)(PRUint16 in,const uTable *uT,const uMapCell *cell);
typedef PRBool (* HitFormateFunc)(PRUint16 in,const uMapCell *cell);
typedef void (* FillInfoFormateFunc)(const uTable *uT, const uMapCell *cell, PRUint32* info);
PRIVATE PRBool uHitFormate0(PRUint16 in,const uMapCell *cell);
PRIVATE PRBool uHitFormate2(PRUint16 in,const uMapCell *cell);
PRIVATE PRUint16 uMapFormate0(PRUint16 in,const uTable *uT,const uMapCell *cell);
PRIVATE PRUint16 uMapFormate1(PRUint16 in,const uTable *uT,const uMapCell *cell);
PRIVATE PRUint16 uMapFormate2(PRUint16 in,const uTable *uT,const uMapCell *cell);
PRIVATE void uFillInfoFormate0(const uTable *uT,const uMapCell *cell,PRUint32* aInfo);
PRIVATE void uFillInfoFormate1(const uTable *uT,const uMapCell *cell,PRUint32* aInfo);
PRIVATE void uFillInfoFormate2(const uTable *uT,const uMapCell *cell,PRUint32* aInfo);
PRIVATE const uMapCell *uGetMapCell(const uTable *uT, PRInt16 item);
PRIVATE char uGetFormat(const uTable *uT, PRInt16 item);
/*=================================================================================
=================================================================================*/
PRIVATE const MapFormatFunc m_map[uNumFormatTag] =
{
uMapFormate0,
uMapFormate1,
uMapFormate2,
};
/*=================================================================================
=================================================================================*/
PRIVATE const FillInfoFormateFunc m_fillinfo[uNumFormatTag] =
{
uFillInfoFormate0,
uFillInfoFormate1,
uFillInfoFormate2,
};
/*=================================================================================
=================================================================================*/
PRIVATE const HitFormateFunc m_hit[uNumFormatTag] =
{
uHitFormate0,
uHitFormate0,
uHitFormate2,
};
#define uHit(format,in,cell) (* m_hit[(format)])((in),(cell))
#define uMap(format,in,uT,cell) (* m_map[(format)])((in),(uT),(cell))
#define uFillInfoCell(format,uT,cell,info) (* m_fillinfo[(format)])((uT),(cell),(info))
#define uGetMapCell(uT, item) ((uMapCell *)(((PRUint16 *)uT) + (uT)->offsetToMapCellArray + (item)*(UMAPCELL_SIZE/sizeof(PRUint16))))
#define uGetFormat(uT, item) (((((PRUint16 *)uT) + (uT)->offsetToFormatArray)[(item)>> 2 ] >> (((item)% 4 ) << 2)) & 0x0f)
/*=================================================================================
=================================================================================*/
MODULE_PRIVATE void uFillInfo(const uTable *uT, PRUint32* aInfo)
{
PRUint16 itemOfList = uT->itemOfList;
PRUint16 i;
for(i=0;i<itemOfList;i++)
{
const uMapCell* uCell;
PRInt8 format = uGetFormat(uT,i);
uCell = uGetMapCell(uT,i);
uFillInfoCell(format, uT, uCell, aInfo);
}
}
/*=================================================================================
=================================================================================*/
MODULE_PRIVATE PRBool uMapCode(const uTable *uT, PRUint16 in, PRUint16* out)
{
PRBool done = PR_FALSE;
PRUint16 itemOfList = uT->itemOfList;
PRUint16 i;
*out = NOMAPPING;
for(i=0;i<itemOfList;i++)
{
const uMapCell* uCell;
PRInt8 format = uGetFormat(uT,i);
uCell = uGetMapCell(uT,i);
if(uHit(format, in, uCell))
{
*out = uMap(format, in, uT,uCell);
done = PR_TRUE;
break;
}
}
return ( done && (*out != NOMAPPING));
}
/*
member function
*/
/*=================================================================================
=================================================================================*/
PRIVATE PRBool uHitFormate0(PRUint16 in,const uMapCell *cell)
{
return ( (in >= cell->fmt.format0.srcBegin) &&
(in <= cell->fmt.format0.srcEnd) ) ;
}
/*=================================================================================
=================================================================================*/
PRIVATE PRBool uHitFormate2(PRUint16 in,const uMapCell *cell)
{
return (in == cell->fmt.format2.srcBegin);
}
/*=================================================================================
=================================================================================*/
PRIVATE PRUint16 uMapFormate0(PRUint16 in,const uTable *uT,const uMapCell *cell)
{
return ((in - cell->fmt.format0.srcBegin) + cell->fmt.format0.destBegin);
}
/*=================================================================================
=================================================================================*/
PRIVATE PRUint16 uMapFormate1(PRUint16 in,const uTable *uT,const uMapCell *cell)
{
return (*(((PRUint16 *)uT) + uT->offsetToMappingTable
+ cell->fmt.format1.mappingOffset + in - cell->fmt.format1.srcBegin));
}
/*=================================================================================
=================================================================================*/
PRIVATE PRUint16 uMapFormate2(PRUint16 in,const uTable *uT,const uMapCell *cell)
{
return (cell->fmt.format2.destBegin);
}
#define SET_REPRESENTABLE(info, c) (info)[(c) >> 5] |= (1L << ((c) & 0x1f))
/*=================================================================================
=================================================================================*/
PRIVATE void uFillInfoFormate0(const uTable *uT,const uMapCell *cell,PRUint32* info)
{
PRUint16 begin, end, i;
begin = cell->fmt.format0.srcBegin;
end = cell->fmt.format0.srcEnd;
if( (begin >> 5) == (end >> 5)) /* High 17 bits are the same */
{
for(i = begin; i <= end; i++)
SET_REPRESENTABLE(info, i);
}
else {
PRUint32 b = begin >> 5;
PRUint32 e = end >> 5;
info[ b ] |= (0xFFFFFFFFL << ((begin) & 0x1f));
info[ e ] |= (0xFFFFFFFFL >> (31 - ((end) & 0x1f)));
for(b++ ; b < e ; b++)
info[b] |= 0xFFFFFFFFL;
}
}
/*=================================================================================
=================================================================================*/
PRIVATE void uFillInfoFormate1(const uTable *uT,const uMapCell *cell,PRUint32* info)
{
PRUint16 begin, end, i;
PRUint16 *base;
begin = cell->fmt.format0.srcBegin;
end = cell->fmt.format0.srcEnd;
base = (((PRUint16 *)uT) + uT->offsetToMappingTable + cell->fmt.format1.mappingOffset);
for(i = begin; i <= end; i++)
{
if(0xFFFD != base[i - begin]) /* check every item */
SET_REPRESENTABLE(info, i);
}
}
/*=================================================================================
=================================================================================*/
PRIVATE void uFillInfoFormate2(const uTable *uT,const uMapCell *cell,PRUint32* info)
{
SET_REPRESENTABLE(info, cell->fmt.format2.srcBegin);
}

View File

@@ -0,0 +1,87 @@
/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* ***** BEGIN LICENSE BLOCK *****
* Version: NPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Netscape Public License
* Version 1.1 (the "License"); you may not use this file except in
* compliance with the License. You may obtain a copy of the License at
* http://www.mozilla.org/NPL/
*
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the
* License.
*
* The Original Code is mozilla.org code.
*
* The Initial Developer of the Original Code is
* Netscape Communications Corporation.
* Portions created by the Initial Developer are Copyright (C) 1998
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
* jeroen.dobbelaere@acunia.com
*
*
* Alternatively, the contents of this file may be used under the terms of
* either the GNU General Public License Version 2 or later (the "GPL"), or
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
* in which case the provisions of the GPL or the LGPL are applicable instead
* of those above. If you wish to allow use of your version of this file only
* under the terms of either the GPL or the LGPL, and not to allow others to
* use your version of this file under the terms of the NPL, indicate your
* decision by deleting the provisions above and replace them with the notice
* and other provisions required by the GPL or the LGPL. If you do not delete
* the provisions above, a recipient may use your version of this file under
* the terms of any one of the NPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
#ifndef __UMAP__
#define __UMAP__
#define NOMAPPING 0xfffd
enum {
uFormat0Tag = 0,
uFormat1Tag,
uFormat2Tag,
uNumFormatTag
};
typedef struct {
PRUint16 srcBegin; /* 2 byte */
PRUint16 srcEnd; /* 2 byte */
PRUint16 destBegin; /* 2 byte */
} uFormat0;
typedef struct {
PRUint16 srcBegin; /* 2 byte */
PRUint16 srcEnd; /* 2 byte */
PRUint16 mappingOffset; /* 2 byte */
} uFormat1;
typedef struct {
PRUint16 srcBegin; /* 2 byte */
PRUint16 srcEnd; /* 2 byte -waste */
PRUint16 destBegin; /* 2 byte */
} uFormat2;
typedef struct {
union {
uFormat0 format0;
uFormat1 format1;
uFormat2 format2;
} fmt;
} uMapCell;
#define UMAPCELL_SIZE (3*sizeof(PRUint16))
typedef struct {
PRUint16 itemOfList;
PRUint16 offsetToFormatArray;
PRUint16 offsetToMapCellArray;
PRUint16 offsetToMappingTable;
PRUint16 data[1];
} uTable;
#endif

View File

@@ -0,0 +1,74 @@
/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* ***** BEGIN LICENSE BLOCK *****
* Version: NPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Netscape Public License
* Version 1.1 (the "License"); you may not use this file except in
* compliance with the License. You may obtain a copy of the License at
* http://www.mozilla.org/NPL/
*
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the
* License.
*
* The Original Code is mozilla.org code.
*
* The Initial Developer of the Original Code is
* Netscape Communications Corporation.
* Portions created by the Initial Developer are Copyright (C) 1998
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
*
*
* Alternatively, the contents of this file may be used under the terms of
* either the GNU General Public License Version 2 or later (the "GPL"), or
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
* in which case the provisions of the GPL or the LGPL are applicable instead
* of those above. If you wish to allow use of your version of this file only
* under the terms of either the GPL or the LGPL, and not to allow others to
* use your version of this file under the terms of the NPL, indicate your
* decision by deleting the provisions above and replace them with the notice
* and other provisions required by the GPL or the LGPL. If you do not delete
* the provisions above, a recipient may use your version of this file under
* the terms of any one of the NPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
#ifndef __UNIPRIV__
#define __UNIPRIV__
#include "ubase.h"
#include "umap.h"
#include "uconvutil.h"
#ifdef __cplusplus
extern "C" {
#endif
void uFillInfo(const uTable *uT,
PRUint32 *info);
PRBool uMapCode(const uTable *uT,
PRUint16 in,
PRUint16* out);
PRBool uGenerate( uShiftTable *shift,
PRInt32* state,
PRUint16 in,
unsigned char* out,
PRUint32 outbuflen,
PRUint32* outlen);
PRBool uScan( uShiftTable *shift,
PRInt32 *state,
unsigned char *in,
PRUint16 *out,
PRUint32 inbuflen,
PRUint32* inscanlen);
#ifdef __cplusplus
}
#endif
#endif /* __UNIPRIV__ */

View File

@@ -0,0 +1,605 @@
##
## NOTE: THIS FILE IS DEPRECATED
## except for those *nix systems that do not support
## nl_langinfo(CODESET) this file should not be used
##
##
## The contents of this file are subject to the Netscape Public
## License Version 1.1 (the "License"); you may not use this file
## except in compliance with the License. You may obtain a copy of
## the License at http://www.mozilla.org/NPL/
##
## Software distributed under the License is distributed on an "AS
## IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
## implied. See the License for the specific language governing
## rights and limitations under the License.
##
## The Original Code is mozilla.org code.
##
## The Initial Developer of the Original Code is Netscape
## Communications Corporation. Portions created by Netscape are
## Copyright (C) 1999 Netscape Communications Corporation. All
## Rights Reserved.
##
## Contributor(s):
##
##
## Platform specific section.
## Map a given locale name in a particular platform (OS) to a charset name
## This have highgher priority than the all section
## Use this section to overwrite those locale name which *CONFLICT WITH*
## most other platform
## Do not use this section if the locale is unique in the platform. Only use
## this when it have CONFLICT w/ other platform.
##
## Example, most platform use EUC-JP in "japanese" locale, but
## hpux, unixware, and sco use Shift_JIS, so we put
## locale.all.japanese=EUC-JP
## in the all platform section and put
## locale.HP-UXB.10.japanese=Shift_JIS
## locale.SCOOS5.0.japanese=Shift_JIS
## in the platform specific section
##
## The key is "locale." + OSTYPE + "." + locale name
## Read mozilla/config/config.mk to find out the correct OSTYPE
## for your system.
##
## References:
## Solaris - http://www.sun.com/software/white-papers/wp-unicode/
## - http://www.sun.com/software/white-papers/wp-eurocurrency/
## - http://www.sun.com/software/white-papers/wp-cttlanguage/
## AIX - http://www.software.ibm.com/ts/mqseries/library/manuals/amqaac/AMQAAC2Q.HTM
## <have not check the following>
## http://www.rs6000.ibm.com/doc_link/en_US/a_doc_lib/aixbman/baseadmn/locale.htm
## HP - http://www.hp.com/unixwork/euro/release_notes/index.html
## <have not check the following>
## IRIX -
##
locale.HP-UXB.10.japanese=Shift_JIS
locale.SCOOS5.0.japanese=Shift_JIS
##
## All platform section
## Put the general locale to charset mapping here.
## If somehow two platform use the same locale name with different
## charset, put the least common one in the platform specific section
## This section have lower priority than the platform specific section
##
## The key is "locale.all." + locale name
# AIX
locale.all.ar_AA=ISO-8859-6
# AIX
#locale.all.Ar_AA=IBM-1046
# Solaris
locale.all.Ar_ARM=ISO-8859-6
locale.all.american.iso88591=ISO-8859-1
locale.all.bulgarian=ISO-8859-2
locale.all.bg_BG.ISO8859-5=ISO-8859-5
# AIX
locale.all.bg_BG=ISO-8859-5
locale.all.C=ISO-8859-1
# HP
locale.all.C.iso885915=ISO-8859-15
locale.all.c-french.iso88591=ISO-8859-1
locale.all.chinese=GB2312
locale.all.chinese-s=GB2312
locale.all.chinese-t.big5=Big5
locale.all.cs=ISO-8859-2
locale.all.cs_CZ=ISO-8859-2
locale.all.cs_CZ.ISO8859-2=ISO-8859-2
locale.all.cs_CZ.88592=ISO-8859-2
locale.all.czech=ISO-8859-2
locale.all.da=ISO-8859-1
# Solaris
locale.all.da.ISO8859-15=ISO-8859-15
locale.all.da_DK.ISO8859-15=ISO-8859-15
locale.all.da_DK.ISO8859-15@euro=ISO-8859-15
# Solaris
locale.all.da.ISO8859-15@euro=ISO-8859-15
locale.all.da_DK.88591=ISO-8859-1
# HP
locale.all.da_DK.iso885915@euro=ISO-8859-15
locale.all.da_DK.ISO8859-1=ISO-8859-1
locale.all.da_DK=ISO-8859-1
# AIX
#locale.all.Da_DK=IBM-850
locale.all.danish.iso88591=ISO-8859-1
locale.all.dutch.iso88591=ISO-8859-1
locale.all.de=ISO-8859-1
# Solaris
locale.all.de.ISO8859-15=ISO-8859-15
# Solaris
locale.all.de.ISO8859-15@euro=ISO-8859-15
# Solaris
locale.all.de.UTF-8=UTF-8
# Solaris
locale.all.de.UTF-8@euro=UTF-8
locale.all.de_AT=ISO-8859-1
# Solaris
locale.all.de_AT.ISO8859-15=ISO-8859-15
# Solaris
locale.all.de_AT.ISO8859-15@euro=ISO-8859-15
locale.all.de_CH=ISO-8859-1
locale.all.de_CH.88591=ISO-8859-1
locale.all.de_CH.ISO8859-1=ISO-8859-1
locale.all.de_DE.ISO8859-15=ISO-8859-15
locale.all.de_DE.ISO8859-15@euro=ISO-8859-15
# AIX
#locale.all.De_CH=IBM-850
locale.all.de_DE=ISO-8859-1
locale.all.de_DE.88591=ISO-8859-1
# HP
locale.all.de_DE.iso885915=ISO-8859-15
# HP
locale.all.de_DE.iso885915@euro=ISO-8859-15
locale.all.de_DE.ISO8859-1=ISO-8859-1
# AIX
#locale.all.De_DE=IBM-850
# Solaris
locale.all.el_GR.ISO8859-7=ISO-8859-7
locale.all.el_GR.ISO8859-7@euro=ISO-8859-7
locale.all.en_AU.ISO8859-1=ISO-8859-1
locale.all.en_CA.ISO8859-1=ISO-8859-1
# AIX
locale.all.el_GR=ISO-8859-7
locale.all.en=ISO-8859-1
locale.all.en_AU=ISO-8859-1
locale.all.en_CA=ISO-8859-1
locale.all.en_GB=ISO-8859-1
# Solaris
locale.all.en_GB.ISO8859-15=ISO-8859-15
# Solaris
locale.all.en_GB.ISO8859-15@euro=ISO-8859-15
locale.all.en_GB.88591=ISO-8859-1
locale.all.en_GB.ISO8859-1=ISO-8859-1
# HP
locale.all.en_GB.iso885915@euro=ISO-8859-15
# AIX
#locale.all.En_GB=IBM-850
# Solaris
locale.all.en_IE.ISO8859-1=ISO-8859-1
locale.all.en_IE.ISO8859-15=ISO-8859-15
# Solaris
locale.all.en_IE.ISO8859-15@euro=ISO-8859-15
locale.all.en_JP=EUC-JP
locale.all.en_JP.IBM-eucJP=EUC-JP
locale.all.En_JP.IBM-932=Shift_JIS
locale.all.En_JP=Shift_JIS
locale.all.en_KR=EUC-KR
locale.all.en_KR.IBM-eucKR=EUC-KR
locale.all.en_TH=ISO-8859-1
locale.all.en_TW=x-euc-tw
locale.all.en_TW.IBM-eucTW=x-euc-tw
locale.all.en_US=ISO-8859-1
locale.all.en_US.88591=ISO-8859-1
locale.all.en_US.ISO8859-1=ISO-8859-1
#FreeBSD
locale.all.en_US.ISO_8859-1=ISO-8859-1
locale.all.da_DK.ISO_8859-1=ISO-8859-1
locale.all.de_AT.ISO_8859-1=ISO-8859-1
locale.all.de_CH.ISO_8859-1=ISO-8859-1
locale.all.de_DE.ISO_8859-1=ISO-8859-1
locale.all.en_AU.ISO_8859-1=ISO-8859-1
locale.all.en_CA.ISO_8859-1=ISO-8859-1
locale.all.en_GB.ISO_8859-1=ISO-8859-1
locale.all.es_ES.ISO_8859-1=ISO-8859-1
locale.all.fi_FI.ISO_8859-1=ISO-8859-1
locale.all.fr_BE.ISO_8859-1=ISO-8859-1
locale.all.fr_CA.ISO_8859-1=ISO-8859-1
locale.all.fr_CH.ISO_8859-1=ISO-8859-1
locale.all.fr_FR.ISO_8859-1=ISO-8859-1
locale.all.is_IS.ISO_8859-1=ISO-8859-1
locale.all.it_CH.ISO_8859-1=ISO-8859-1
locale.all.it_IT.ISO_8859-1=ISO-8859-1
locale.all.la_LN.ISO_8859-1=ISO-8859-1
locale.all.nl_BE.ISO_8859-1=ISO-8859-1
locale.all.nl_NL.ISO_8859-1=ISO-8859-1
locale.all.no_NO.ISO_8859-1=ISO-8859-1
locale.all.pt_PT.ISO_8859-1=ISO-8859-1
locale.all.sv_SE.ISO_8859-1=ISO-8859-1
# FreeBSD 8859-15
locale.all.da_DK.DIS_8859-15=ISO-8859-15
locale.all.de_AT.DIS_8859-15=ISO-8859-15
locale.all.de_CH.DIS_8859-15=ISO-8859-15
locale.all.de_DE.DIS_8859-15=ISO-8859-15
locale.all.en_AU.DIS_8859-15=ISO-8859-15
locale.all.en_CA.DIS_8859-15=ISO-8859-15
locale.all.en_GB.DIS_8859-15=ISO-8859-15
locale.all.en_US.DIS_8859-15=ISO-8859-15
locale.all.es_ES.DIS_8859-15=ISO-8859-15
locale.all.fi_FI.DIS_8859-15=ISO-8859-15
locale.all.fr_BE.DIS_8859-15=ISO-8859-15
locale.all.fr_CA.DIS_8859-15=ISO-8859-15
locale.all.fr_CH.DIS_8859-15=ISO-8859-15
locale.all.fr_FR.DIS_8859-15=ISO-8859-15
locale.all.is_IS.DIS_8859-15=ISO-8859-15
locale.all.it_CH.DIS_8859-15=ISO-8859-15
locale.all.it_IT.DIS_8859-15=ISO-8859-15
locale.all.la_LN.DIS_8859-15=ISO-8859-15
locale.all.nl_BE.DIS_8859-15=ISO-8859-15
locale.all.nl_NL.DIS_8859-15=ISO-8859-15
locale.all.no_NO.DIS_8859-15=ISO-8859-15
locale.all.pt_PT.DIS_8859-15=ISO-8859-15
locale.all.sv_SE.DIS_8859-15=ISO-8859-15
# FreeBSD 8859-2
locale.all.cs_CZ.ISO_8859-2=ISO-8859-2
locale.all.hr_HR.ISO_8859-2=ISO-8859-2
locale.all.hu_HU.ISO_8859-2=ISO-8859-2
locale.all.la_LN.ISO_8859-2=ISO-8859-2
locale.all.pl_PL.ISO_8859-2=ISO-8859-2
locale.all.sl_SI.ISO_8859-2=ISO-8859-2
# FreeBSD 8859-4
locale.all.la_LN.ISO_8859-4=ISO-8859-4
locale.all.lt_LT.ISO_8859-4=ISO-8859-4
# FreeBSD 8859-5
locale.all.ru_RU.ISO_8859-5=ISO-8859-5
locale.all.ru_SU.ISO_8859-5=ISO-8859-5
# FreeBSD Russian
locale.all.ru_SU.KOI8-R=KOI8-R
# FreeBSD Ukrainian
locale.all.uk_UA.KOI8-U=KOI8-U
# Solaris
locale.all.en_US.UTF-8=UTF-8
# Solaris
locale.all.en_US.UTF-8@euro=UTF-8
# AIX
#locale.all.En_US=IBM-850
locale.all.english.iso88591=ISO-8859-1
locale.all.es=ISO-8859-1
# Solaris
locale.all.es.ISO8859-15=ISO-8859-15
# Solaris
locale.all.es.ISO8859-15@euro=ISO-8859-15
# Solaris
locale.all.es.UTF-8=UTF-8
# Solaris
locale.all.es.UTF-8@euro=UTF-8
locale.all.es_ES=ISO-8859-1
locale.all.es_ES.ISO8859-15=ISO-8859-15
locale.all.es_ES.ISO8859-15@euro=ISO-8859-15
locale.all.es_AR.ISO8859-1=ISO-8859-1
locale.all.es_BO.ISO8859-1=ISO-8859-1
locale.all.es_CL.ISO8859-1=ISO-8859-1
locale.all.es_CO.ISO8859-1=ISO-8859-1
locale.all.es_CR.ISO8859-1=ISO-8859-1
locale.all.es_EC.ISO8859-1=ISO-8859-1
locale.all.es_GT.ISO8859-1=ISO-8859-1
locale.all.es_MX.ISO8859-1=ISO-8859-1
locale.all.es_NI.ISO8859-1=ISO-8859-1
locale.all.es_PA.ISO8859-1=ISO-8859-1
locale.all.es_PE.ISO8859-1=ISO-8859-1
locale.all.es_PY.ISO8859-1=ISO-8859-1
locale.all.es_SV.ISO8859-1=ISO-8859-1
locale.all.es_UY.ISO8859-1=ISO-8859-1
locale.all.es_VE.ISO8859-1=ISO-8859-1
# HP
locale.all.es_ES.iso885915=ISO-8859-15
# HP
locale.all.es_ES.iso885915@euro=ISO-8859-15
locale.all.es_ES.88591=ISO-8859-1
locale.all.es_ES.ISO8859-1=ISO-8859-1
# AIX
#locale.all.En_ES=IBM-850
# Solaris
locale.all.et_EE.ISO8859-15=ISO-8859-15
# AIX
#locale.all.Et_ET=IBM-922
# AIX
locale.all.ET_ET=UTF-8
locale.all.fi=ISO-8859-1
# Solaris
locale.all.fi.ISO8859-15=ISO-8859-15
# Solaris
locale.all.fi.ISO8859-15@euro=ISO-8859-15
locale.all.fi_FI=ISO-8859-1
locale.all.fi_FI.88591=ISO-8859-1
locale.all.fi_FI.ISO8859-1=ISO-8859-1
locale.all.fi_FI.ISO8859-15=ISO-8859-15
locale.all.fi_FI.ISO8859-15@euro=ISO-8859-15
# HP
locale.all.fi_FI.iso885915@euro=ISO-8859-15
# AIX
#locale.all.Fi_ES=IBM-850
locale.all.finnish.iso88591=ISO-8859-1
locale.all.fr=ISO-8859-1
# Solaris
locale.all.fr.ISO8859-15=ISO-8859-15
# Solaris
locale.all.fr.ISO8859-15@euro=ISO-8859-15
# Solaris
locale.all.fr.UTF-8=UTF-8
# Solaris
locale.all.fr.UTF-8@euro=UTF-8
locale.all.fr_BE=ISO-8859-1
# Solaris
locale.all.fr_BE.ISO8859-15=ISO-8859-15
# Solaris
locale.all.fr_BE.ISO8859-15@euro=ISO-8859-15
locale.all.fr_BE.88591=ISO-8859-1
locale.all.fr_BE.ISO8859-1=ISO-8859-1
locale.all.fr_BE.iso8859=ISO-8859-1
# AIX
#locale.all.Fr_BE=IBM-850
locale.all.fr_CA=ISO-8859-1
locale.all.fr_CA.88591=ISO-8859-1
locale.all.fr_CA.iso8859=ISO-8859-1
# HP
locale.all.fr_CA.iso885915@euro=ISO-8859-15
locale.all.fr_CA.ISO8859-1=ISO-8859-1
# AIX
#locale.all.Fr_CA=IBM-850
locale.all.fr_CH=ISO-8859-1
locale.all.fr_CH.88591=ISO-8859-1
locale.all.fr_CH.iso8859=ISO-8859-1
locale.all.fr_CH.ISO8859-1=ISO-8859-1
# Solaris
locale.all.fr_FR.ISO8859-15=ISO-8859-15
locale.all.fr_FR.ISO8859-15@euro=ISO-8859-15
# AIX
#locale.all.Fr_CH=IBM-850
locale.all.fr_FR=ISO-8859-1
locale.all.fr_FR.88591=ISO-8859-1
locale.all.fr_FR.iso8859=ISO-8859-1
# HP
locale.all.fr_FR.iso885915=ISO-8859-15
# HP
locale.all.fr_FR.iso885915@euro=ISO-8859-15
locale.all.fr_FR.ISO8859-1=ISO-8859-1
# AIX
#locale.all.Fr_FR=IBM-850
locale.all.french.iso88591=ISO-8859-1
locale.all.german.iso88591=ISO-8859-1
# Solaris
locale.all.he_HE=ISO-8859-8
locale.all.he_IL=ISO-8859-8
locale.all.hr_HR.ISO8859-2=ISO-8859-2
# AIX
locale.all.hr_HR=ISO-8859-2
locale.all.hu_HU=ISO-8859-2
locale.all.hu_HU.88592=ISO-8859-2
locale.all.hu_HU.ISO8859-2=ISO-8859-2
locale.all.hungarian=ISO-8859-2
locale.all.icelandic.iso88591=ISO-8859-1
locale.all.iso_8859_1=ISO-8859-1
locale.all.is=ISO-8859-1
locale.all.is_IS=ISO-8859-1
locale.all.is_IS.88591=ISO-8859-1
locale.all.is_IS.ISO8859-1=ISO-8859-1
# HP
locale.all.is_IS.iso885915@euro=ISO-8859-15
# AIX
#locale.all.Is_IS=IBM-850
locale.all.it=ISO-8859-1
# Solaris
locale.all.it.ISO8859-15=ISO-8859-15
# Solaris
locale.all.it.ISO8859-15@euro=ISO-8859-15
# Solaris
locale.all.it.UTF-8=UTF-8
# Solaris
locale.all.it.UTF-8@euro=UTF-8
locale.all.it_IT.ISO8859-15=ISO-8859-15
locale.all.it_IT.ISO8859-15@euro=ISO-8859-15
# AIX
#locale.all.It_IT=IBM-850
locale.all.italian.iso8859-1=ISO-8859-1
locale.all.it_CH=ISO-8859-1
locale.all.it_IT=ISO-8859-1
locale.all.it_IT.88591=ISO-8859-1
locale.all.it_IT.ISO8859-1=ISO-8859-1
# HP
locale.all.it_IT.iso885915=ISO-8859-15
# HP
locale.all.it_IT.iso885915@euro=ISO-8859-15
# AIX
locale.all.iw_IL=ISO-8859-8
# AIX
#locale.all.Iw_IL=IBM-856
locale.all.ja=EUC-JP
locale.all.Ja_JP.IBM-932=Shift_JIS
locale.all.Ja_JP=Shift_JIS
locale.all.japanese=EUC-JP
locale.all.japanese.euc=EUC-JP
locale.all.ja_JP=EUC-JP
# Solaris
locale.all.ja_JP.UTF-8=UTF-8
# Solaris
locale.all.ja_JP.UTF-8@euro=UTF-8
locale.all.ja_JP.EUC=EUC-JP
locale.all.ja_JP.eucJP=EUC-JP
locale.all.ja_JP.SJIS=Shift_JIS
locale.all.ja_JP.PCK=Shift_JIS
locale.all.ja_JP.IBM-eucJP=EUC-JP
locale.all.ja_JP.mscode=Shift_JIS
locale.all.ja_JP.ujis=EUC-JP
locale.all.katakana=Shift_JIS
locale.all.ko=EUC-KR
locale.all.ko_KR=EUC-KR
# Solaris
locale.all.ko_KR.UTF-8=UTF-8
# Solaris
locale.all.ko_KR.UTF-8@euro=UTF-8
locale.all.ko_KR.euc=EUC-KR
locale.all.ko_KR.euckr=EUC-KR
locale.all.ko_KR.eucKR=EUC-KR
locale.all.ko_KR.IBM-eucKR=EUC-KR
locale.all.ko_KR.EUC=EUC-KR
locale.all.ko.UTF-8=UTF-8
locale.all.korean=EUC-KR
# Solaris
locale.all.lt_LT.ISO8859-13=ISO-8859-13
# AIX
#locale.all.Lt_LT=IBM-921
# AIX
locale.all.LT_LT=UTF-8
# Solaris
locale.all.lv_LV.ISO8859-13=ISO-8859-13
# AIX
#locale.all.Lt_LV=IBM-921
# AIX
locale.all.LT_LV=UTF-8
# Solaris
locale.all.mk_MK.ISO8859-5=ISO-8859-5
# AIX
locale.all.mk_MK=ISO-8859-5
locale.all.nl=ISO-8859-1
# Solaris
locale.all.nl.ISO8859-15=ISO-8859-15
# Solaris
locale.all.nl.ISO8859-15@euro=ISO-8859-15
locale.all.nl_BE=ISO-8859-1
# Solaris
locale.all.nl_BE.ISO8859-15=ISO-8859-15
# Solaris
locale.all.nl_BE.ISO8859-15@euro=ISO-8859-15
locale.all.nl_BE.88591=ISO-8859-1
locale.all.nl_BE.ISO8859-1=ISO-8859-1
# Solaris
locale.all.nl_NL.ISO8859-15=ISO-8859-15
locale.all.nl_NL.ISO8859-15@euro=ISO-8859-15
# AIX
#locale.all.NL_BE=IBM-850
locale.all.nl_NL=ISO-8859-1
locale.all.nl_NL.88591=ISO-8859-1
locale.all.nl_NL.ISO8859-1=ISO-8859-1
# HP
locale.all.nl_NL.iso885915@euro=ISO-8859-15
# AIX
#locale.all.NL_NL=IBM-850
locale.all.no=ISO-8859-1
locale.all.no_NO=ISO-8859-1
locale.all.no_NO.88591=ISO-8859-1
locale.all.no_NO.ISO8859-1=ISO-8859-1
# Solaris
locale.all.no_NO.ISO8859-1@bokmal=ISO-8859-1
locale.all.no_NO.ISO8859-1@nynorsk=ISO-8859-1
# HP
locale.all.no_NO.iso885915@euro=ISO-8859-15
# AIX
#locale.all.No_NO=IBM-850
locale.all.norwegian.iso88591=ISO-8859-1
locale.all.pl=ISO-8859-2
locale.all.pl_PL=ISO-8859-2
locale.all.pl_PL.88592=ISO-8859-2
locale.all.pl_PL.ISO8859-2=ISO-8859-2
locale.all.polish=ISO-8859-2
locale.all.portuguese.iso88591=ISO-8859-1
locale.all.pt=ISO-8859-1
# Solaris
locale.all.pt.ISO8859-15=ISO-8859-15
# Solaris
locale.all.pt.ISO8859-15@euro=ISO-8859-15
# Solaris
locale.all.pt_BR.ISO8859-1=ISO-8859-1
locale.all.pt_PT.ISO8859-15=ISO-8859-15
locale.all.pt_PT.ISO8859-15@euro=ISO-8859-15
# AIX
#locale.all.Pt.PT=IBM-850
locale.all.pt_PT=ISO-8859-1
locale.all.pt_PT.88591=ISO-8859-1
# HP
locale.all.pt_PT.iso885915@euro=ISO-8859-15
locale.all.pt_PT.ISO8859-1=ISO-8859-1
# Solaris
locale.all.ro_RO.ISO8859-2=ISO-8859-2
# AIX
locale.all.ro_RO=ISO-8859-5
# Solaris
#locale.all.ru_RU.ANSI1251= ??? ANSI-1251 ???
locale.all.ru_RU.ISO8859-5=ISO-8859-5
# AIX
locale.all.ru_RU=ISO-8859-5
locale.all.ru_RU.KOI8-R=KOI8-R
# RedHat 7 reported by Garaschenko Slava <slava@maze.ambernet.kiev.ua bug 70601
locale.all.ru_RU.koi8r=KOI8-R
# RedHat 7 reported by Garaschenko Slava <slava@maze.ambernet.kiev.ua bug 70601
locale.all.ru_UA=KOI8-U
locale.all.rumanian=ISO-8859-2
locale.all.serbocroatian=ISO-8859-2
locale.all.sh=ISO-8859-2
# Solaris
locale.all.sh_BA.ISO8859-2@bosnia=ISO-8859-2
locale.all.sl_SI.ISO8859-2=ISO-8859-2
locale.all.sq_AL.ISO8859-2=ISO-8859-2
# AIX
locale.all.sh_SP=ISO-8859-2
locale.all.sk=ISO-8859-2
locale.all.sk_SK=ISO-8859-2
locale.all.sk_SK.88592=ISO-8859-2
locale.all.sk_SK.ISO8859-2=ISO-8859-2
locale.all.slovene=ISO-8859-2
locale.all.spanish.iso88591=ISO-8859-1
# AIX
locale.all.sq_AL=ISO-8859-1
# Solaris
locale.all.sr_YU.ISO8859-5=ISO-8859-5
# AIX
locale.all.sr_SP=ISO-8859-5
locale.all.sv=ISO-8859-1
# Solaris
locale.all.sv.ISO8859-15=ISO-8859-15
# Solaris
locale.all.sv.ISO8859-15@euro=ISO-8859-15
# Solaris
locale.all.sv.UTF-8=UTF-8
# Solaris
locale.all.sv.UTF-8@euro=UTF-8
locale.all.sv_SE=ISO-8859-1
locale.all.sv_SE.88591=ISO-8859-1
locale.all.sv_SE.ISO8859-15=ISO-8859-15
locale.all.sv_SE.ISO8859-15@euro=ISO-8859-15
# HP
locale.all.sv_SE.iso885915=ISO-8859-15
# HP
locale.all.sv_SE.iso885915@euro=ISO-8859-15
locale.all.sv_SE.ISO8859-1=ISO-8859-1
locale.all.Sv_SE=IBM-850
# AIX
locale.all.swedish.iso88591=ISO-8859-1
# Solaris
locale.all.tr_TR.ISO8859-9=ISO-8859-9
# AIX
locale.all.tr_TR=ISO-8859-9
# Solaris
locale.all.th_TH=TIS-620
locale.all.th_TH.TIS620=TIS-620
locale.all.th=TIS-620
locale.all.th_TH.UTF-8=UTF-8
locale.all.tchinese=x-euc-tw
# RedHat 7 reported by Garaschenko Slava <slava@maze.ambernet.kiev.ua bug 70601
locale.all.uk_UA=KOI8-U
locale.all.zh=GB2312
locale.all.zh_CN=GB2312
locale.all.zh_CN.EUC=GB2312
locale.all.zh.GBK=x-gbk
locale.all.zh_CN.UTF-8=UTF-8
locale.all.zh.UTF-8=UTF-8
locale.all.zh_TW.EUC=x-euc-tw
locale.all.zh_TW.BIG5=Big5
locale.all.zh_HK.HKSCS=x-hkscs
# saw the following name from news://xcin.linux.org.tw/tlug.cle-devel
locale.all.zh_CN.GB2312=GB2312
# AIX
locale.all.ZH_CN=UTF-8
locale.all.zh_CN.ugb=GB2312
locale.all.zh_CN.GBK=x-gbk
locale.all.zh_HK.big5=Big5
locale.all.zh_HK.eucTW=x-euc-tw
locale.all.zh_TW=x-euc-tw
locale.all.zh_TW.IBM-eucTW=x-euc-tw
locale.all.zh_TW.eucTW=x-euc-tw
locale.all.zh_TW.eucTW@chuyin=x-euc-tw
locale.all.zh_TW.eucTW@radical=x-euc-tw
locale.all.zh_TW.eucTW@stroke=x-euc-tw
locale.all.zh_TW.big5=Big5
locale.all.zh_TW.big5@chuyin=Big5
locale.all.zh_TW.big5@radical=Big5
locale.all.zh_TW.big5@stroke=Big5
locale.all.zh_TW.ucns=x-euc-tw
# AIX
locale.all.Zh_TW.big5=Big5
# CLE 0.8
locale.all.zh_TW.Big5=Big5
# SunOS 5.7 according to pofeng@linux.org.tw (already above)
# locale.all.zh_TW.BIG5=Big5
# OpenVMS
locale.all.ja_JP.sdeckanji=EUC-JP

View File

@@ -0,0 +1,67 @@
##
##
## The contents of this file are subject to the Netscape Public
## License Version 1.1 (the "License"); you may not use this file
## except in compliance with the License. You may obtain a copy of
## the License at http://www.mozilla.org/NPL/
##
## Software distributed under the License is distributed on an "AS
## IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
## implied. See the License for the specific language governing
## rights and limitations under the License.
##
## The Original Code is mozilla.org code.
##
## The Initial Developer of the Original Code is Netscape
## Communications Corporation. Portions created by Netscape are
## Copyright (C) 1999 Netscape Communications Corporation. All
## Rights Reserved.
##
## Contributor(s):
##
## This file (unixcharset.sample.properties) is a sample file for
## mapping between nl_langinfo(CODESET) and the charset name aliases
## that Mozilla uses. For Linux ($OSARCH=Linux) the file name would be
## unixcharset.Linux.properties
## These mappings are only needed if a nl_langinfo(CODESET)
## return value is in conflict with the Mozilla charset name
## aliases.
##
## The left hand side specifies a nl_langinfo(CODESET) return
## value to remap to right hand side Mozilla charset name alias.
##
## There are 2 ways to specify a mapping:
##
## 1) generic (all glib versions)
## 2) GLIBC version specific
##
## The generic form is:
##
## nllic.$NLLIC_CODESET=$MOZ_CODESET
##
## eg:
##
## nllic.KOI8=KOI8-R
##
## The GLIBC specific form is:
##
## nllic.$GLIBC.$NLLIC_CODESET=$MOZ_CODESET
##
## (nllic = nl_langinfo(CODESET))
## ( nl l i c )
##
## eg: for a glibc version 2.1.3:
##
## nllic.2.1.3.KOI8=KOI8-R
##
## If different glibc versions of nl_langinfo(CODESET) need
## different remappings these may coexist in this file as needed.
##
## (To determine a system's glibc version use: glib-config --version)
##
##
## Note:
## At present this is a sample file.
## The nl_langinfo(CODESET) return values on Linux can be used
## directly and thus this file is not needed.
##

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,172 @@
_uHitFormate0 ; 9665
_uMapCode ; 7105
_uMapFormate0 ; 6593
?AddRef@nsUnicodeDecodeHelper@@UAGKXZ ; 4303
_uScan ; 4096
_uCheckAndScanAlways1Byte ; 4096
_uGenerate ; 3009
_uCheckAndGenAlways1Byte ; 3009
?Release@nsBasicDecoderSupport@@UAGKXZ ; 2970
?AddRef@nsCharsetConverterManager@@UAGKXZ ; 1724
?QueryInterface@nsCharsetConverterManager@@UAGIABUnsID@@PAPAX@Z ; 1723
?Release@nsCharsetConverterManager@@UAGKXZ ; 1721
?GetUnicodeDecoder@nsCharsetConverterManager@@UAGIPBVnsString@@PAPAVnsIUnicodeDecoder@@@Z ; 1667
?QueryInterface@nsBasicDecoderSupport@@UAGIABUnsID@@PAPAX@Z ; 1426
?Convert@nsOneByteDecoderSupport@@MAGIPBDPAHPAG1@Z ; 1375
?ConvertByFastTable@nsUnicodeDecodeHelper@@UAGIPBDPAHPAG12H@Z ; 1375
?GetMaxLength@nsMacRomanToUnicode@@MAGIPBDHPAH@Z ; 1362
?Release@nsUnicodeEncodeHelper@@UAGKXZ ; 1288
?GetPreferred@nsCharsetAlias2@@UAGIABVnsString@@AAV2@@Z ; 1280
?Get@nsURLProperties@@UAGIABVnsString@@AAV2@@Z ; 1260
?QueryInterface@nsCharsetAlias2@@UAGIABUnsID@@PAPAX@Z ; 1229
?do_GetService@@YA?BVnsGetServiceByContractID@@PBDPAI@Z ; 1189
?Convert@nsUTF8ToUnicode@@MAGIPBDPAHPAG1@Z ; 793
?Reset@nsOneByteDecoderSupport@@MAGIXZ ; 761
?GetCharsetAtom@nsCharsetConverterManager@@UAGIPBGPAPAVnsIAtom@@@Z ; 748
?GetMaxLength@nsUTF8ToUnicode@@MAGIPBDHPAH@Z ; 578
_uMapFormate1 ; 512
?QueryInterface@nsCharsetMenu@@UAGIABUnsID@@PAPAX@Z ; 495
?AddRef@nsCharsetMenu@@UAGKXZ ; 493
?Equals@nsCharsetAlias2@@UAGIABVnsString@@0PAH@Z ; 440
?GetBundleValue@nsCharsetConverterManager@@AAEIPAVnsIStringBundle@@PBVnsIAtom@@PAVnsString@@PAPAG@Z ; 385
?Release@nsCharsetMenu@@UAGKXZ ; 382
?FlushBuffer@nsEncoderSupport@@IAEIPAPADPBD@Z ; 372
?ConvertNoBuffNoErr@nsTableEncoderSupport@@MAGIPBGPAHPAD1@Z ; 288
?ConvertByTable@nsUnicodeEncodeHelper@@UAGIPBGPAHPAD1PAUuShiftTable@@PAPAG@Z ; 288
?Convert@nsEncoderSupport@@UAGIPBGPAHPAD1@Z ; 288
?ConvertNoBuff@nsEncoderSupport@@MAGIPBGPAHPAD1@Z ; 288
?GetMaxLength@nsUnicodeToISO88591@@MAGIPBGHPAH@Z ; 286
??0nsBasicDecoderSupport@@QAE@XZ ; 239
??1nsBasicDecoderSupport@@UAE@XZ ; 236
?Reset@nsUTF8ToUnicode@@MAGIXZ ; 232
??0nsUTF8ToUnicode@@QAE@XZ ; 223
?NS_NewUTF8ToUnicode@@YGIPAVnsISupports@@ABUnsID@@PAPAX@Z ; 223
??_EnsBasicDecoderSupport@@UAEPAXI@Z ; 220
?assign_assuming_AddRef@nsCOMPtr_base@@IAEXPAVnsISupports@@@Z ; 192
?Assert@nsCharsetMenu@@UAGIPAVnsIRDFResource@@0PAVnsIRDFNode@@H@Z ; 183
?AddMenuItemToContainer@nsCharsetMenu@@AAEIPAVnsIRDFContainer@@PAVnsMenuEntry@@PAVnsIRDFResource@@PADH@Z ; 171
?AddCharsetToItemArray@nsCharsetMenu@@AAEIPAVnsVoidArray@@PAVnsIAtom@@PAPAVnsMenuEntry@@H@Z ; 168
?GetCharsetTitle2@nsCharsetConverterManager@@UAGIPBVnsIAtom@@PAVnsString@@@Z ; 168
?GetCharsetTitle@nsCharsetConverterManager@@UAGIPBVnsIAtom@@PAPAG@Z ; 168
?GetBundleValue@nsCharsetConverterManager@@AAEIPAVnsIStringBundle@@PBVnsIAtom@@PAVnsString@@PAPAV3@@Z ; 116
?GetCharsetLangGroup@nsCharsetConverterManager@@UAGIPBVnsIAtom@@PAPAV2@@Z ; 116
?GetCharsetData2@nsCharsetConverterManager@@UAGIPBVnsIAtom@@PBGPAVnsString@@@Z ; 101
?GetCharsetData@nsCharsetConverterManager@@UAGIPBVnsIAtom@@PBGPAPAG@Z ; 101
?Release@nsBasicEncoder@@UAGKXZ ; 86
?AddCharsetToContainer@nsCharsetMenu@@AAEIPAVnsVoidArray@@PAVnsIRDFContainer@@PAVnsIAtom@@PADHH@Z ; 82
?GetCharsetAtom2@nsCharsetConverterManager@@UAGIPBDPAPAVnsIAtom@@@Z ; 82
?WriteCacheToPrefs@nsCharsetMenu@@AAEIPAVnsVoidArray@@HPBD@Z ; 76
?AddCharsetToCache@nsCharsetMenu@@AAEIPAVnsIAtom@@PAVnsVoidArray@@PAVnsIRDFResource@@HHH@Z ; 76
?FindMenuItemInArray@nsCharsetMenu@@AAEHPAVnsVoidArray@@PAVnsIAtom@@PAPAVnsMenuEntry@@@Z ; 76
?SetCurrentCharset@nsCharsetMenu@@UAGIPBG@Z ; 75
?Reset@nsEncoderSupport@@UAGIXZ ; 70
??0nsTableEncoderSupport@@QAE@PAUuShiftTable@@PAPAG@Z ; 43
?NS_NewUnicodeEncodeHelper@@YGIPAVnsISupports@@ABUnsID@@PAPAX@Z ; 43
?QueryInterface@nsBasicEncoder@@UAGIABUnsID@@PAPAX@Z ; 43
?QueryInterface@nsUnicodeEncodeHelper@@UAGIABUnsID@@PAPAX@Z ; 43
?GetUnicodeEncoder@nsCharsetConverterManager@@UAGIPBVnsString@@PAPAVnsIUnicodeEncoder@@@Z ; 43
??1nsBasicEncoder@@UAE@XZ ; 43
??0nsBasicEncoder@@QAE@XZ ; 43
??_EnsUnicodeEncodeHelper@@UAEPAXI@Z ; 43
??_GnsUnicodeToCP1252@@UAEPAXI@Z ; 43
??1nsEncoderSupport@@UAE@XZ ; 43
??1nsUnicodeEncodeHelper@@UAE@XZ ; 43
??1nsTableEncoderSupport@@UAE@XZ ; 43
??0nsEncoderSupport@@QAE@XZ ; 43
??0nsUnicodeEncodeHelper@@QAE@XZ ; 43
?Finish@nsEncoderSupport@@UAGIPADPAH@Z ; 42
?FinishNoBuff@nsEncoderSupport@@MAGIPADPAH@Z ; 42
?AddObserver@nsCharsetMenu@@UAGIPAVnsIRDFObserver@@@Z ; 33
?NS_NewUnicodeToISO88591@@YGIPAVnsISupports@@ABUnsID@@PAPAX@Z ; 29
??0nsUnicodeToISO88591@@QAE@XZ ; 29
?NewRDFContainer@nsCharsetMenu@@AAEIPAVnsIRDFDataSource@@PAVnsIRDFResource@@PAPAVnsIRDFContainer@@@Z ; 18
?SetOutputErrorBehavior@nsEncoderSupport@@UAGIHPAVnsIUnicharEncoder@@G@Z ; 17
??1nsUnicodeDecodeHelper@@UAE@XZ ; 16
??_GnsUnicodeDecodeHelper@@UAEPAXI@Z ; 16
?ConvertByTable@nsUnicodeDecodeHelper@@UAGIPBDPAHPAG1PAUuShiftTable@@PAPAG@Z ; 16
??_GnsCP1252ToUnicode@@UAEPAXI@Z ; 16
??1nsOneByteDecoderSupport@@UAE@XZ ; 16
?CreateFastTable@nsUnicodeDecodeHelper@@UAGIPAUuShiftTable@@PAPAGPAGH@Z ; 16
?QueryInterface@nsUnicodeDecodeHelper@@UAGIABUnsID@@PAPAX@Z ; 16
?NS_NewUnicodeDecodeHelper@@YGIPAVnsISupports@@ABUnsID@@PAPAX@Z ; 16
??0nsOneByteDecoderSupport@@QAE@PAUuShiftTable@@PAPAG@Z ; 16
??0nsUnicodeDecodeHelper@@QAE@XZ ; 16
?NS_NewCP1252ToUnicode@@YGIPAVnsISupports@@ABUnsID@@PAPAX@Z ; 15
??0nsCP1252ToUnicode@@QAE@XZ ; 15
?Release@nsUConvModule@@UAGKXZ ; 14
?NS_NewUnicodeToCP1252@@YGIPAVnsISupports@@ABUnsID@@PAPAX@Z ; 14
??0nsUnicodeToCP1252@@QAE@XZ ; 14
?Release@nsWinCharset@@UAGKXZ ; 13
?AddFromStringToMenu@nsCharsetMenu@@AAEIPADPAVnsVoidArray@@PAVnsIRDFContainer@@PAVnsISupportsArray@@0@Z ; 12
?GetClassObject@nsUConvModule@@UAGIPAVnsIComponentManager@@ABUnsID@@1PAPAX@Z ; 12
?QueryInterface@nsCharsetMenuObserver@@UAGIABUnsID@@PAPAX@Z ; 10
?Release@nsCharsetMenuObserver@@UAGKXZ ; 10
?AddFromPrefsToMenu@nsCharsetMenu@@AAEIPAVnsVoidArray@@PAVnsIRDFContainer@@PBDPAVnsISupportsArray@@PAD@Z ; 9
?RemoveObserver@nsCharsetMenu@@UAGIPAVnsIRDFObserver@@@Z ; 8
?QueryInterface@nsWinCharset@@UAGIABUnsID@@PAPAX@Z ; 8
?GetRegistryEnumeration2@nsCharsetConverterManager@@AAEIPADHPAPAVnsISupportsArray@@@Z ; 6
?GetDecoderList@nsCharsetConverterManager@@UAGIPAPAVnsISupportsArray@@@Z ; 5
?GetCharset@nsWinCharset@@UAGIW4nsPlatformCharsetSel@@AAVnsString@@@Z ; 4
?GetDefaultCharsetForLocale@nsWinCharset@@UAGIPBGPAPAG@Z ; 4
?AddCharsetArrayToItemArray@nsCharsetMenu@@AAEIPAVnsVoidArray@@PAVnsISupportsArray@@@Z ; 3
?GetCollation@nsCharsetMenu@@AAEIPAPAVnsICollation@@@Z ; 3
?ConvertAndEscape@nsTextToSubURI@@UAGIPBDPBGPAPAD@Z ; 3
?AddMenuItemArrayToContainer@nsCharsetMenu@@AAEIPAVnsIRDFContainer@@PAVnsVoidArray@@PAVnsIRDFResource@@@Z ; 3
?do_GetService@@YA?BVnsGetServiceByCID@@ABUnsID@@PAI@Z ; 3
?AddSeparatorToContainer@nsCharsetMenu@@AAEIPAVnsIRDFContainer@@@Z ; 3
?InitCacheMenu@nsCharsetMenu@@AAEIPAVnsISupportsArray@@PAVnsIRDFResource@@PBDPAVnsVoidArray@@@Z ; 3
?AddFromNolocPrefsToMenu@nsCharsetMenu@@AAEIPAVnsVoidArray@@PAVnsIRDFContainer@@PBDPAVnsISupportsArray@@PAD@Z ; 3
?InitStaticMenu@nsCharsetMenu@@AAEIPAVnsISupportsArray@@PAVnsIRDFResource@@PBDPAVnsVoidArray@@@Z ; 3
?QueryInterface@nsTextToSubURI@@UAGIABUnsID@@PAPAX@Z ; 3
?FreeMenuItemArray@nsCharsetMenu@@AAEXPAVnsVoidArray@@@Z ; 3
?ReorderMenuItemArray@nsCharsetMenu@@AAEIPAVnsVoidArray@@@Z ; 3
?UnEscapeAndConvert@nsTextToSubURI@@UAGIPBD0PAPAG@Z ; 3
?NS_OpenURI@@YAIPAPAVnsIChannel@@PAVnsIURI@@PAVnsIIOService@@PAVnsILoadGroup@@PAVnsIInterfaceRequestor@@I@Z ; 2
?RemoveFlaggedCharsets@nsCharsetMenu@@AAEIPAVnsISupportsArray@@PAVnsString@@@Z ; 2
??0nsURLProperties@@QAE@AAVnsString@@@Z ; 2
?InitMoreMenu@nsCharsetMenu@@AAEIPAVnsISupportsArray@@PAVnsIRDFResource@@PAD@Z ; 2
?NS_OpenURI@@YAIPAPAVnsIInputStream@@PAVnsIURI@@PAVnsIIOService@@PAVnsILoadGroup@@PAVnsIInterfaceRequestor@@I@Z ; 2
?LoadExtensibleBundle@nsCharsetConverterManager@@AAEIPBDPAPAVnsIStringBundle@@@Z ; 2
?CanUnload@nsUConvModule@@UAGIPAVnsIComponentManager@@PAH@Z ; 1
?GetCharsetLangGroup@nsCharsetConverterManager@@UAGIPAVnsString@@PAPAVnsIAtom@@@Z ; 1
?InitOthers@nsCharsetMenu@@AAEIXZ ; 1
?GetURI@nsCharsetMenu@@UAGIPAPAD@Z ; 1
?InitComposerMenu@nsCharsetMenu@@AAEIXZ ; 1
?GetRegistryEnumeration@nsCharsetConverterManager@@AAEIPAD0PAPAVnsISupportsArray@@@Z ; 1
??0nsCharsetConverterManager@@QAE@XZ ; 1
?NS_NewCharsetMenu@@YGIPAVnsISupports@@ABUnsID@@PAPAX@Z ; 1
?InitSecodaryTiers@nsCharsetMenu@@AAEIXZ ; 1
??0nsISO88591ToUnicode@@QAE@XZ ; 1
??_EnsWinCharset@@UAEPAXI@Z ; 1
??0nsUConvModule@@QAE@XZ ; 1
?InitMaileditMenu@nsCharsetMenu@@AAEIXZ ; 1
?GetCharsetDetectorList@nsCharsetConverterManager@@UAGIPAPAVnsISupportsArray@@@Z ; 1
??0nsWinCharset@@QAE@XZ ; 1
??0nsTextToSubURI@@QAE@XZ ; 1
??_GnsTextToSubURI@@UAEPAXI@Z ; 1
?InitMoreSubmenus@nsCharsetMenu@@AAEIPAVnsISupportsArray@@@Z ; 1
??1nsURLProperties@@UAE@XZ ; 1
?NS_NewCharsetAlias@@YGIPAVnsISupports@@ABUnsID@@PAPAX@Z ; 1
?QueryInterface@nsUConvModule@@UAGIABUnsID@@PAPAX@Z ; 1
_NSGetModule ; 1
??_EnsURLProperties@@UAEPAXI@Z ; 1
?NS_NewPlatformCharset@@YGIPAVnsISupports@@ABUnsID@@PAPAX@Z ; 1
?InitResources@nsCharsetMenu@@AAEIXZ ; 1
?InitAutodetMenu@nsCharsetMenu@@AAEIPAVnsIRDFResource@@@Z ; 1
?GetUnicodeDecoder@nsCharsetConverterManager@@UAGIPBVnsIAtom@@PAPAVnsIUnicodeDecoder@@@Z ; 1
?SetCurrentMailCharset@nsCharsetMenu@@UAGIPBG@Z ; 1
??_GnsUConvModule@@UAEPAXI@Z ; 1
?InitMailviewMenu@nsCharsetMenu@@AAEIXZ ; 1
?NS_NewISO88591ToUnicode@@YGIPAVnsISupports@@ABUnsID@@PAPAX@Z ; 1
?NS_NewCharsetConverterManager@@YGIPAVnsISupports@@ABUnsID@@PAPAX@Z ; 1
??0nsCharsetMenu@@QAE@XZ ; 1
?GetEncoderList@nsCharsetConverterManager@@UAGIPAPAVnsISupportsArray@@@Z ; 1
?NS_NewTextToSubURI@@YGIPAVnsISupports@@ABUnsID@@PAPAX@Z ; 1
??1nsTextToSubURI@@UAE@XZ ; 1
?InitBrowserMenu@nsCharsetMenu@@AAEIXZ ; 1
?Init@nsCharsetMenu@@AAEIXZ ; 1
??1nsUConvModule@@UAE@XZ ; 1
??1nsWinCharset@@UAE@XZ ; 1
?Shutdown@nsUConvModule@@IAEXXZ ; 1
_uCheckAndScanJohabHangul ; 1
??0nsCharsetAlias2@@QAE@XZ ; 1

View File

@@ -0,0 +1,38 @@
##
## The contents of this file are subject to the Netscape Public
## License Version 1.1 (the "License"); you may not use this file
## except in compliance with the License. You may obtain a copy of
## the License at http://www.mozilla.org/NPL/
##
## Software distributed under the License is distributed on an "AS
## IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
## implied. See the License for the specific language governing
## rights and limitations under the License.
##
## The Original Code is mozilla.org code.
##
## The Initial Developer of the Original Code is Netscape
## Communications Corporation. Portions created by Netscape are
## Copyright (C) 1999 Netscape Communications Corporation. All
## Rights Reserved.
##
## Contributor(s):
##
## This file map a ACP to a charset name
## We use this to figure out the charset of file system, clipboard, etc
##
acp.874=TIS-620
acp.932=Shift_JIS
acp.936=gb18030
acp.949=x-windows-949
acp.950=Big5
acp.951=Big5-HKSCS
acp.1250=windows-1250
acp.1251=windows-1251
acp.1252=windows-1252
acp.1253=windows-1253
acp.1254=windows-1254
acp.1255=windows-1255
acp.1256=windows-1256
acp.1257=windows-1257
acp.1258=windows-1258

View File

@@ -0,0 +1,70 @@
#
# The contents of this file are subject to the Netscape Public
# License Version 1.1 (the "License"); you may not use this file
# except in compliance with the License. You may obtain a copy of
# the License at http://www.mozilla.org/NPL/
#
# Software distributed under the License is distributed on an "AS
# IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
# implied. See the License for the specific language governing
# rights and limitations under the License.
#
# The Original Code is mozilla.org code.
#
# The Initial Developer of the Original Code is Netscape
# Communications Corporation. Portions created by Netscape are
# Copyright (C) 1998 Netscape Communications Corporation. All
# Rights Reserved.
#
# Contributor(s):
#
DEPTH = ../../..
topsrcdir = @top_srcdir@
srcdir = @srcdir@
VPATH = @srcdir@
include $(DEPTH)/config/autoconf.mk
REQUIRES = \
string \
xpcom \
uconv \
locale \
$(NULL)
CPPSRCS = \
TestUConv.cpp \
nsconv.cpp \
plattest.cpp \
$(NULL)
ifeq ($(OS_ARCH),WINNT)
CPPSRCS += convperf.cpp
endif
SIMPLE_PROGRAMS = $(CPPSRCS:.cpp=$(BIN_SUFFIX))
include $(topsrcdir)/config/rules.mk
DEFINES += -DUSE_NSREG
INCLUDES += \
-I$(srcdir)/../ucvlatin \
-I$(srcdir)/../ucvja \
-I$(srcdir)/../util \
$(NULL)
LIBS += \
$(LIBS_DIR) \
$(XPCOM_LIBS) \
$(NSPR_LIBS) \
$(NULL)
# needed for mac linux
ifeq ($(OS_ARCH),Linux)
ifneq ($(OS_RELEASE),1.2)
OS_LIBS += /usr/lib/libdl.so
endif
endif

Some files were not shown because too many files have changed in this diff Show More