Modified UTF-7 converters added.

This commit is contained in:
cata%netscape.com 1999-05-18 22:43:57 +00:00
parent ade3d6f8b6
commit 568eac6dff
3 changed files with 28 additions and 2 deletions

View File

@ -17,7 +17,7 @@
* Netscape Communications Corporation. All Rights Reserved.
*/
mDecSize = 42;
mDecSize = 43;
mDecArray = new ConverterInfo [mDecSize];
mDecArray[0].mCID = &kISO88591ToUnicodeCID;
@ -66,7 +66,9 @@
mDecArray[40].mCID = &kKOI8RToUnicodeCID;
mDecArray[41].mCID = &kKOI8UToUnicodeCID;
mEncSize = 42;
mDecArray[42].mCID = &kMUTF7ToUnicodeCID;
mEncSize = 43;
mEncArray = new ConverterInfo [mEncSize];
mEncArray[0].mCID = &kUnicodeToISO88591CID;
@ -114,3 +116,5 @@
mEncArray[39].mCID = &kUnicodeToVPSCID;
mEncArray[40].mCID = &kUnicodeToKOI8RCID;
mEncArray[41].mCID = &kUnicodeToKOI8UCID;
mEncArray[42].mCID = &kUnicodeToMUTF7CID;

View File

@ -198,6 +198,10 @@ NS_DECLARE_ID(kVPSToUnicodeCID,
NS_DECLARE_ID(kUTF8ToUnicodeCID,
0x5534ddc0, 0xdd96, 0x11d2, 0x8a, 0xac, 0x0, 0x60, 0x8, 0x11, 0xa8, 0x36);
// Class ID for our MUTF7ToUnicode charset converter
// {B57F97C1-0D70-11d3-8AAE-00600811A836}
NS_DECLARE_ID(kMUTF7ToUnicodeCID,
0xb57f97c1, 0xd70, 0x11d3, 0x8a, 0xae, 0x0, 0x60, 0x8, 0x11, 0xa8, 0x36);
// {920307B0-C6E8-11d2-8AA8-00600811A836}
NS_DECLARE_ID(kUnicodeToISO88591CID,
@ -373,5 +377,9 @@ NS_DECLARE_ID(kUnicodeToVPSCID,
NS_DECLARE_ID(kUnicodeToUTF8CID,
0x7c657d18, 0xec5e, 0x11d2, 0x8a, 0xac, 0x0, 0x60, 0x8, 0x11, 0xa8, 0x36);
// Class ID for our UnicodeToMUTF7 charset converter
// {B57F97C2-0D70-11d3-8AAE-00600811A836}
NS_DECLARE_ID(kUnicodeToMUTF7CID,
0xb57f97c2, 0xd70, 0x11d3, 0x8a, 0xae, 0x0, 0x60, 0x8, 0x11, 0xa8, 0x36);
#endif /* nsUCvLatinCID_h___ */

View File

@ -62,6 +62,7 @@
#include "nsVISCIIToUnicode.h"
#include "nsVPSToUnicode.h"
#include "nsUTF8ToUnicode.h"
#include "nsMUTF7ToUnicode.h"
#include "nsUnicodeToISO88591.h"
#include "nsUnicodeToISO88592.h"
#include "nsUnicodeToISO88593.h"
@ -97,6 +98,7 @@
#include "nsUnicodeToVISCII.h"
#include "nsUnicodeToVPS.h"
#include "nsUnicodeToUTF8.h"
#include "nsUnicodeToMUTF7.h"
// just for NS_IMPL_IDS; this is a good, central place to implement GUIDs
#include "nsIUnicodeDecoder.h"
@ -338,6 +340,12 @@ FactoryData g_FactoryData[] =
"UTF-8",
"Unicode"
},
{
&kMUTF7ToUnicodeCID,
nsMUTF7ToUnicode::CreateInstance,
"MUTF-7",
"Unicode"
},
{
&kUnicodeToISO88591CID,
nsUnicodeToISO88591::CreateInstance,
@ -547,6 +555,12 @@ FactoryData g_FactoryData[] =
nsUnicodeToUTF8::CreateInstance,
"Unicode",
"UTF-8"
},
{
&kUnicodeToMUTF7CID,
nsUnicodeToMUTF7::CreateInstance,
"Unicode",
"MUTF-7"
}
};