mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-26 14:22:01 +00:00
fix for bug 125617 - use the category manager instead of the registry to keep our list of encoders/decoders
r=dougt, sr=dveditz
This commit is contained in:
parent
739ade1186
commit
eed8e408de
@ -46,6 +46,7 @@
|
||||
#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}}
|
||||
@ -57,8 +58,6 @@
|
||||
// XXX change to NS_CHARSETCONVERTERMANAGER_PID
|
||||
#define NS_CHARSETCONVERTERMANAGER_CONTRACTID "@mozilla.org/charset-converter-manager;1"
|
||||
|
||||
#define NS_REGISTRY_UCONV_BASE "software/netscape/intl/uconv/"
|
||||
// XXX change "xuconv" to "uconv" when the new enc&dec trees are in place
|
||||
#define NS_DATA_BUNDLE_REGISTRY_KEY "software/netscape/intl/xuconv/data/"
|
||||
#define NS_TITLE_BUNDLE_REGISTRY_KEY "software/netscape/intl/xuconv/titles/"
|
||||
|
||||
@ -76,9 +75,12 @@
|
||||
#define REGSELF_PRINTF(x,y)
|
||||
#endif
|
||||
|
||||
#define NS_UNICODEDECODER_NAME "Charset Decoders"
|
||||
#define NS_UNICODEENCODER_NAME "Charset Encoders"
|
||||
|
||||
struct nsConverterRegistryInfo {
|
||||
const char *fromCharset;
|
||||
const char *toCharset;
|
||||
PRBool isEncoder; // PR_TRUE = encoder, PR_FALSE = decoder
|
||||
const char *charset;
|
||||
nsCID cid;
|
||||
};
|
||||
|
||||
@ -97,63 +99,96 @@ nsUConverterRegSelf(nsIComponentManager *aCompMgr, \
|
||||
const char* componentType, \
|
||||
const nsModuleComponentInfo *info) \
|
||||
{ \
|
||||
nsresult res = NS_OK; \
|
||||
nsRegistryKey key; \
|
||||
char buff[1024]; \
|
||||
PRBool isOpen = PR_FALSE; \
|
||||
nsCOMPtr<nsIRegistry> registry = \
|
||||
do_GetService(NS_REGISTRY_CONTRACTID, &res); \
|
||||
if (NS_FAILED(res)) \
|
||||
return res; \
|
||||
res = registry->IsOpen(&isOpen); \
|
||||
if (NS_FAILED(res)) \
|
||||
return res; \
|
||||
if(! isOpen) { \
|
||||
res = registry->OpenWellKnownRegistry( \
|
||||
nsIRegistry::ApplicationComponentRegistry); \
|
||||
if (NS_FAILED(res)) \
|
||||
return res; \
|
||||
} \
|
||||
int i; \
|
||||
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++) { \
|
||||
char * cid_string; \
|
||||
cid_string = gConverterRegistryInfo[i].cid.ToString(); \
|
||||
sprintf(buff, "%s/%s", "software/netscape/intl/uconv", cid_string); \
|
||||
nsCRT::free(cid_string); \
|
||||
res = registry->AddSubtree(nsIRegistry::Common, buff, &key); \
|
||||
if (NS_FAILED(res)) \
|
||||
continue; \
|
||||
res = registry->SetStringUTF8(key, "source", \
|
||||
gConverterRegistryInfo[i].fromCharset);\
|
||||
if (NS_FAILED(res)) \
|
||||
continue; \
|
||||
res = registry->SetStringUTF8(key, "destination", \
|
||||
gConverterRegistryInfo[i].toCharset); \
|
||||
if (NS_FAILED(res)) \
|
||||
continue; \
|
||||
REGSELF_PRINTF(gConverterRegistryInfo[i].fromCharset, \
|
||||
gConverterRegistryInfo[i].toCharset); \
|
||||
} \
|
||||
return res; \
|
||||
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) \
|
||||
{ \
|
||||
return NS_OK; \
|
||||
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(_From, _To, _CID ) \
|
||||
{ \
|
||||
_From, \
|
||||
_To, \
|
||||
_CID, \
|
||||
#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.
|
||||
*
|
||||
|
@ -44,6 +44,7 @@
|
||||
#include "nsICharsetAlias.h"
|
||||
#include "nsIRegistry.h"
|
||||
#include "nsIServiceManager.h"
|
||||
#include "nsICategoryManager.h"
|
||||
#include "nsICharsetConverterManager.h"
|
||||
#include "nsICharsetConverterManager2.h"
|
||||
#include "nsIStringBundle.h"
|
||||
@ -52,13 +53,15 @@
|
||||
#include "prmem.h"
|
||||
#include "nsCRT.h"
|
||||
|
||||
#include "nsISupportsPrimitives.h"
|
||||
|
||||
// just for CIDs
|
||||
#include "nsIUnicodeDecodeHelper.h"
|
||||
#include "nsIUnicodeEncodeHelper.h"
|
||||
#include "nsCharsetConverterManager.h"
|
||||
|
||||
static NS_DEFINE_IID(kRegistryNodeIID, NS_IREGISTRYNODE_IID);
|
||||
static NS_DEFINE_CID(kRegistryCID, NS_REGISTRY_CID);
|
||||
static NS_DEFINE_CID(kRegistryCID, NS_REGISTRY_CID);
|
||||
static NS_DEFINE_CID(kStringBundleServiceCID, NS_STRINGBUNDLESERVICE_CID);
|
||||
static NS_DEFINE_CID(kLocaleServiceCID, NS_LOCALESERVICE_CID);
|
||||
static NS_DEFINE_CID(kSupportsArrayCID, NS_SUPPORTSARRAY_CID);
|
||||
@ -85,6 +88,7 @@ nsCharsetConverterManager::~nsCharsetConverterManager()
|
||||
NS_IF_RELEASE(mTitleBundle);
|
||||
}
|
||||
|
||||
|
||||
nsresult nsCharsetConverterManager::RegisterConverterManagerData()
|
||||
{
|
||||
nsresult res = NS_OK;
|
||||
@ -113,12 +117,11 @@ nsresult nsCharsetConverterManager::RegisterConverterTitles(
|
||||
nsresult res;
|
||||
nsRegistryKey key;
|
||||
|
||||
nsAutoString str; str.AssignWithConversion(aRegistryPath);
|
||||
str.Append(NS_LITERAL_STRING("defaultFile"));
|
||||
nsCAutoString str(aRegistryPath);
|
||||
str.Append(NS_LITERAL_CSTRING("defaultFile"));
|
||||
|
||||
char * p = ToNewCString(str);
|
||||
res = aRegistry->AddSubtree(nsIRegistry::Common, p, &key);
|
||||
nsMemory::Free(p);
|
||||
res = aRegistry->AddSubtree(nsIRegistry::Common, str.get(), &key);
|
||||
|
||||
if (NS_FAILED(res)) return res;
|
||||
res = aRegistry->SetStringUTF8(key, "name", "chrome://global/locale/charsetTitles.properties");
|
||||
if (NS_FAILED(res)) return res;
|
||||
@ -133,12 +136,11 @@ nsresult nsCharsetConverterManager::RegisterConverterData(
|
||||
nsresult res;
|
||||
nsRegistryKey key;
|
||||
|
||||
nsAutoString str; str.AssignWithConversion(aRegistryPath);
|
||||
str.Append(NS_LITERAL_STRING("defaultFile"));
|
||||
nsCAutoString str(aRegistryPath);
|
||||
str.Append(NS_LITERAL_CSTRING("defaultFile"));
|
||||
|
||||
res = aRegistry->AddSubtree(nsIRegistry::Common, str.get(), &key);
|
||||
|
||||
char * p = ToNewCString(str);
|
||||
res = aRegistry->AddSubtree(nsIRegistry::Common, p, &key);
|
||||
nsMemory::Free(p);
|
||||
if (NS_FAILED(res)) return res;
|
||||
res = aRegistry->SetStringUTF8(key, "name", "resource:/res/charsetData.properties");
|
||||
if (NS_FAILED(res)) return res;
|
||||
@ -264,101 +266,6 @@ next:
|
||||
return res;
|
||||
}
|
||||
|
||||
// XXX deprecate this method and switch to GetRegistryEnumeration() when
|
||||
// changing the registration style for converters.
|
||||
// The idea is to have two trees:
|
||||
// .../uconv/decoder/name
|
||||
// .../uconv/encoder/name
|
||||
nsresult nsCharsetConverterManager::GetRegistryEnumeration2(
|
||||
const char * aRegistryKey,
|
||||
PRBool aDecoder,
|
||||
nsISupportsArray ** aArray)
|
||||
{
|
||||
nsresult res = NS_OK;
|
||||
nsCOMPtr<nsISupportsArray> array = NULL;
|
||||
nsRegistryKey key;
|
||||
|
||||
res = nsComponentManager::CreateInstance(kSupportsArrayCID, NULL,
|
||||
NS_GET_IID(nsISupportsArray), getter_AddRefs(array));
|
||||
if (NS_FAILED(res)) return res;
|
||||
|
||||
// get the registry
|
||||
nsCOMPtr<nsIRegistry> registry(do_GetService(kRegistryCID, &res));
|
||||
if (NS_FAILED(res)) return res;
|
||||
|
||||
// open registry if necessary
|
||||
PRBool regOpen = PR_FALSE;
|
||||
registry->IsOpen(®Open);
|
||||
if (!regOpen) {
|
||||
res = registry->OpenWellKnownRegistry(nsIRegistry::ApplicationComponentRegistry);
|
||||
if (NS_FAILED(res)) return res;
|
||||
}
|
||||
|
||||
// get subtree
|
||||
res = registry->GetSubtree(nsIRegistry::Common, aRegistryKey, &key);
|
||||
if (NS_FAILED(res)) return res;
|
||||
|
||||
// enumerate subtrees
|
||||
nsCOMPtr<nsIEnumerator> enumerator;
|
||||
res = registry->EnumerateSubtrees(key, getter_AddRefs(enumerator));
|
||||
if (NS_FAILED(res)) return res;
|
||||
|
||||
nsCOMPtr<nsIRegistryEnumerator> components = do_QueryInterface(enumerator, &res);
|
||||
if (NS_FAILED(res)) return res;
|
||||
|
||||
res = components->First();
|
||||
if (NS_FAILED(res)) return res;
|
||||
|
||||
while (NS_OK != components->IsDone()) {
|
||||
const char *name;
|
||||
char *src;
|
||||
char *dest;
|
||||
nsAutoString fullName;
|
||||
nsCOMPtr<nsIAtom> atom;
|
||||
|
||||
res = components->CurrentItemInPlaceUTF8(&key, &name);
|
||||
if (NS_FAILED(res)) goto done1;
|
||||
|
||||
res = registry->GetStringUTF8(key, "source", &src);
|
||||
if (NS_FAILED(res)) goto done1;
|
||||
|
||||
res = registry->GetStringUTF8(key, "destination", &dest);
|
||||
if (NS_FAILED(res)) goto done1;
|
||||
|
||||
if (aDecoder) {
|
||||
if (!strcmp(dest, "Unicode")) {
|
||||
fullName.AssignWithConversion(src);
|
||||
res = GetCharsetAtom(fullName.get(), getter_AddRefs(atom));
|
||||
if (NS_FAILED(res)) goto done1;
|
||||
|
||||
res = array->AppendElement(atom);
|
||||
if (NS_FAILED(res)) goto done1;
|
||||
}
|
||||
} else {
|
||||
if (!strcmp(src, "Unicode")) {
|
||||
fullName.AssignWithConversion(dest);
|
||||
res = GetCharsetAtom(fullName.get(), getter_AddRefs(atom));
|
||||
if (NS_FAILED(res)) goto done1;
|
||||
|
||||
res = array->AppendElement(atom);
|
||||
if (NS_FAILED(res)) goto done1;
|
||||
}
|
||||
}
|
||||
|
||||
done1:
|
||||
if (src != NULL) nsCRT::free(src);
|
||||
if (dest != NULL) nsCRT::free(dest);
|
||||
|
||||
res = components->Next();
|
||||
if (NS_FAILED(res)) break; // this is NOT supposed to fail!
|
||||
}
|
||||
|
||||
// everything was fine, set the result
|
||||
*aArray = array;
|
||||
NS_ADDREF(*aArray);
|
||||
|
||||
return res;
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
// Interface nsICharsetConverterManager [implementation]
|
||||
@ -467,27 +374,61 @@ NS_IMETHODIMP nsCharsetConverterManager::GetUnicodeEncoder(
|
||||
return GetUnicodeEncoder(&name, aResult);
|
||||
}
|
||||
|
||||
// XXX move this macro into the UnicodeDecoder/Encoder interface
|
||||
#define NS_CHARSET_CONVERTER_REG_BASE "software/netscape/intl/uconv"
|
||||
|
||||
NS_IMETHODIMP nsCharsetConverterManager::GetDecoderList(
|
||||
nsISupportsArray ** aResult)
|
||||
nsresult
|
||||
nsCharsetConverterManager::GetList(PRBool aEncoder, nsISupportsArray** aResult)
|
||||
{
|
||||
if (aResult == NULL) return NS_ERROR_NULL_POINTER;
|
||||
if (aResult == NULL)
|
||||
return NS_ERROR_NULL_POINTER;
|
||||
*aResult = NULL;
|
||||
|
||||
return GetRegistryEnumeration2(NS_CHARSET_CONVERTER_REG_BASE, PR_TRUE,
|
||||
aResult);
|
||||
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(aEncoder ? NS_UNICODEENCODER_NAME : NS_UNICODEDECODER_NAME,
|
||||
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;
|
||||
|
||||
nsXPIDLCString fullName;
|
||||
if (NS_FAILED(supStr->GetData(getter_Copies(fullName))))
|
||||
continue;
|
||||
|
||||
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(PR_FALSE, aResult);
|
||||
}
|
||||
|
||||
NS_IMETHODIMP nsCharsetConverterManager::GetEncoderList(
|
||||
nsISupportsArray ** aResult)
|
||||
{
|
||||
if (aResult == NULL) return NS_ERROR_NULL_POINTER;
|
||||
*aResult = NULL;
|
||||
|
||||
return GetRegistryEnumeration2(NS_CHARSET_CONVERTER_REG_BASE, PR_FALSE,
|
||||
aResult);
|
||||
return GetList(PR_TRUE, aResult);
|
||||
}
|
||||
|
||||
NS_IMETHODIMP nsCharsetConverterManager::GetCharsetDetectorList(
|
||||
|
@ -87,6 +87,7 @@ private:
|
||||
nsresult GetRegistryEnumeration2(const char * aRegistryKey, PRBool aDecoder,
|
||||
nsISupportsArray ** aArray);
|
||||
|
||||
nsresult GetList(PRBool encoder, nsISupportsArray** aResult);
|
||||
public:
|
||||
static nsresult RegisterConverterManagerData();
|
||||
|
||||
|
@ -37,14 +37,17 @@
|
||||
*
|
||||
* ***** END LICENSE BLOCK ***** */
|
||||
#include "nsCOMPtr.h"
|
||||
#include "nsIRegistry.h"
|
||||
#include "nsIModule.h"
|
||||
#include "nsIGenericFactory.h"
|
||||
#include "nsIComponentManager.h"
|
||||
#include "nsICategoryManager.h"
|
||||
#include "nsICharsetConverterManager.h"
|
||||
#include "nsICharsetConverterManager2.h"
|
||||
#include "nsIUnicodeDecodeHelper.h"
|
||||
#include "nsIUnicodeEncodeHelper.h"
|
||||
#include "nsIUnicodeDecoder.h"
|
||||
#include "nsIUnicodeEncoder.h"
|
||||
#include "nsICharsetConverterManager.h"
|
||||
#include "nsIPlatformCharset.h"
|
||||
#include "nsICharsetAlias.h"
|
||||
#include "nsITextToSubURI.h"
|
||||
@ -73,14 +76,10 @@
|
||||
#include "nsScriptableUConv.h"
|
||||
|
||||
NS_CONVERTER_REGISTRY_START
|
||||
NS_UCONV_REG_UNREG("ISO-8859-1", "Unicode", NS_ISO88591TOUNICODE_CID)
|
||||
NS_UCONV_REG_UNREG("windows-1252", "Unicode", NS_CP1252TOUNICODE_CID)
|
||||
NS_UCONV_REG_UNREG("x-mac-roman", "Unicode", NS_MACROMANTOUNICODE_CID)
|
||||
NS_UCONV_REG_UNREG("UTF-8", "Unicode", NS_UTF8TOUNICODE_CID)
|
||||
NS_UCONV_REG_UNREG("Unicode", "ISO-8859-1", NS_UNICODETOISO88591_CID)
|
||||
NS_UCONV_REG_UNREG("Unicode", "windows-1252", NS_UNICODETOCP1252_CID)
|
||||
NS_UCONV_REG_UNREG("Unicode", "x-mac-roman", NS_UNICODETOMACROMAN_CID)
|
||||
NS_UCONV_REG_UNREG("Unicode", "UTF-8", NS_UNICODETOUTF8_CID)
|
||||
NS_UCONV_REG_UNREG("ISO-8859-1", NS_ISO88591TOUNICODE_CID, NS_UNICODETOISO88591_CID)
|
||||
NS_UCONV_REG_UNREG("windows-1252", NS_CP1252TOUNICODE_CID, NS_UNICODETOCP1252_CID)
|
||||
NS_UCONV_REG_UNREG("x-mac-roman", NS_MACROMANTOUNICODE_CID, NS_UNICODETOMACROMAN_CID)
|
||||
NS_UCONV_REG_UNREG("UTF-8", NS_UTF8TOUNICODE_CID, NS_UNICODETOUTF8_CID)
|
||||
NS_CONVERTER_REGISTRY_END
|
||||
|
||||
NS_IMPL_NSUCONVERTERREGSELF
|
||||
|
@ -74,20 +74,15 @@ static NS_DEFINE_CID(kComponentManagerCID, NS_COMPONENTMANAGER_CID);
|
||||
//----------------------------------------------------------------------------
|
||||
|
||||
NS_CONVERTER_REGISTRY_START
|
||||
NS_UCONV_REG_UNREG("GB2312", "Unicode" , NS_GB2312TOUNICODE_CID)
|
||||
NS_UCONV_REG_UNREG("Unicode", "GB2312", NS_UNICODETOGB2312_CID)
|
||||
NS_UCONV_REG_UNREG("windows-936", "Unicode" , NS_CP936TOUNICODE_CID)
|
||||
NS_UCONV_REG_UNREG("Unicode", "windows-936", NS_UNICODETOCP936_CID)
|
||||
NS_UCONV_REG_UNREG("x-gbk", "Unicode" , NS_GBKTOUNICODE_CID)
|
||||
NS_UCONV_REG_UNREG("Unicode", "x-gbk", NS_UNICODETOGBK_CID)
|
||||
NS_UCONV_REG_UNREG("Unicode", "x-gbk-noascii", NS_UNICODETOGBKNOASCII_CID)
|
||||
NS_UCONV_REG_UNREG("HZ-GB-2312", "Unicode" , NS_HZTOUNICODE_CID)
|
||||
NS_UCONV_REG_UNREG("Unicode", "HZ-GB-2312", NS_UNICODETOHZ_CID)
|
||||
NS_UCONV_REG_UNREG("Unicode", "gb_2312-80", NS_UNICODETOGB2312GL_CID)
|
||||
NS_UCONV_REG_UNREG("gb18030", "Unicode" , NS_GB18030TOUNICODE_CID)
|
||||
NS_UCONV_REG_UNREG("Unicode", "gb18030", NS_UNICODETOGB18030_CID)
|
||||
NS_UCONV_REG_UNREG("Unicode", "gb18030.2000-0", NS_UNICODETOGB18030Font0_CID)
|
||||
NS_UCONV_REG_UNREG("Unicode", "gb18030.2000-1", NS_UNICODETOGB18030Font1_CID)
|
||||
NS_UCONV_REG_UNREG("GB2312", NS_GB2312TOUNICODE_CID, NS_UNICODETOGB2312_CID)
|
||||
NS_UCONV_REG_UNREG("windows-936", NS_CP936TOUNICODE_CID, NS_UNICODETOCP936_CID)
|
||||
NS_UCONV_REG_UNREG("x-gbk", NS_GBKTOUNICODE_CID, NS_UNICODETOGBK_CID)
|
||||
NS_UCONV_REG_UNREG_ENCODER("x-gbk-noascii", NS_UNICODETOGBKNOASCII_CID)
|
||||
NS_UCONV_REG_UNREG("HZ-GB-2312", NS_HZTOUNICODE_CID, NS_UNICODETOHZ_CID)
|
||||
NS_UCONV_REG_UNREG_ENCODER("gb_2312-80", NS_UNICODETOGB2312GL_CID)
|
||||
NS_UCONV_REG_UNREG("gb18030", NS_GB18030TOUNICODE_CID, NS_UNICODETOGB18030_CID)
|
||||
NS_UCONV_REG_UNREG_ENCODER("gb18030.2000-0", NS_UNICODETOGB18030Font0_CID)
|
||||
NS_UCONV_REG_UNREG_ENCODER("gb18030.2000-1", NS_UNICODETOGB18030Font1_CID)
|
||||
NS_CONVERTER_REGISTRY_END
|
||||
|
||||
NS_IMPL_NSUCONVERTERREGSELF
|
||||
|
@ -72,20 +72,13 @@ static NS_DEFINE_CID(kComponentManagerCID, NS_COMPONENTMANAGER_CID);
|
||||
|
||||
NS_CONVERTER_REGISTRY_START
|
||||
|
||||
NS_UCONV_REG_UNREG("IBM850", "Unicode" , NS_CP850TOUNICODE_CID)
|
||||
NS_UCONV_REG_UNREG("IBM852", "Unicode" , NS_CP852TOUNICODE_CID)
|
||||
NS_UCONV_REG_UNREG("IBM855", "Unicode" , NS_CP855TOUNICODE_CID)
|
||||
NS_UCONV_REG_UNREG("IBM857", "Unicode" , NS_CP857TOUNICODE_CID)
|
||||
NS_UCONV_REG_UNREG("IBM862", "Unicode" , NS_CP862TOUNICODE_CID)
|
||||
NS_UCONV_REG_UNREG("IBM864", "Unicode" , NS_CP864TOUNICODE_CID)
|
||||
NS_UCONV_REG_UNREG("IBM864i", "Unicode", NS_CP864ITOUNICODE_CID)
|
||||
NS_UCONV_REG_UNREG("Unicode", "IBM850", NS_UNICODETOCP850_CID)
|
||||
NS_UCONV_REG_UNREG("Unicode", "IBM852", NS_UNICODETOCP852_CID)
|
||||
NS_UCONV_REG_UNREG("Unicode", "IBM855", NS_UNICODETOCP855_CID)
|
||||
NS_UCONV_REG_UNREG("Unicode", "IBM857", NS_UNICODETOCP857_CID)
|
||||
NS_UCONV_REG_UNREG("Unicode", "IBM862", NS_UNICODETOCP862_CID)
|
||||
NS_UCONV_REG_UNREG("Unicode", "IBM864", NS_UNICODETOCP864_CID)
|
||||
NS_UCONV_REG_UNREG("Unicode", "IBM864i", NS_UNICODETOCP864I_CID)
|
||||
NS_UCONV_REG_UNREG("IBM850", NS_CP850TOUNICODE_CID, NS_UNICODETOCP850_CID)
|
||||
NS_UCONV_REG_UNREG("IBM852", NS_CP852TOUNICODE_CID, NS_UNICODETOCP852_CID)
|
||||
NS_UCONV_REG_UNREG("IBM855", NS_CP855TOUNICODE_CID, NS_UNICODETOCP855_CID)
|
||||
NS_UCONV_REG_UNREG("IBM857", NS_CP857TOUNICODE_CID, NS_UNICODETOCP857_CID)
|
||||
NS_UCONV_REG_UNREG("IBM862", NS_CP862TOUNICODE_CID, NS_UNICODETOCP862_CID)
|
||||
NS_UCONV_REG_UNREG("IBM864", NS_CP864TOUNICODE_CID, NS_UNICODETOCP864_CID)
|
||||
NS_UCONV_REG_UNREG("IBM864i", NS_CP864ITOUNICODE_CID, NS_UNICODETOCP864I_CID)
|
||||
|
||||
NS_CONVERTER_REGISTRY_END
|
||||
|
||||
|
@ -86,15 +86,13 @@ PRUint16 g_uf0212Mapping[] = {
|
||||
};
|
||||
|
||||
NS_CONVERTER_REGISTRY_START
|
||||
NS_UCONV_REG_UNREG("Shift_JIS", "Unicode" , NS_SJISTOUNICODE_CID)
|
||||
NS_UCONV_REG_UNREG("ISO-2022-JP", "Unicode" , NS_ISO2022JPTOUNICODE_CID)
|
||||
NS_UCONV_REG_UNREG("EUC-JP", "Unicode" , NS_EUCJPTOUNICODE_CID)
|
||||
NS_UCONV_REG_UNREG("Unicode", "Shift_JIS" , NS_UNICODETOSJIS_CID)
|
||||
NS_UCONV_REG_UNREG("Unicode", "EUC-JP" , NS_UNICODETOEUCJP_CID)
|
||||
NS_UCONV_REG_UNREG("Unicode", "ISO-2022-JP" , NS_UNICODETOISO2022JP_CID)
|
||||
NS_UCONV_REG_UNREG("Unicode", "jis_0201" , NS_UNICODETOJISX0201_CID)
|
||||
NS_UCONV_REG_UNREG("Unicode", "jis_0208-1983" , NS_UNICODETOJISX0208_CID)
|
||||
NS_UCONV_REG_UNREG("Unicode", "jis_0212-1990" , NS_UNICODETOJISX0212_CID)
|
||||
NS_UCONV_REG_UNREG("Shift_JIS", NS_SJISTOUNICODE_CID, NS_UNICODETOSJIS_CID)
|
||||
NS_UCONV_REG_UNREG("ISO-2022-JP", NS_ISO2022JPTOUNICODE_CID, NS_UNICODETOISO2022JP_CID)
|
||||
NS_UCONV_REG_UNREG("EUC-JP", NS_EUCJPTOUNICODE_CID, NS_UNICODETOEUCJP_CID)
|
||||
|
||||
NS_UCONV_REG_UNREG_ENCODER("jis_0201" , NS_UNICODETOJISX0201_CID)
|
||||
NS_UCONV_REG_UNREG_ENCODER("jis_0208-1983" , NS_UNICODETOJISX0208_CID)
|
||||
NS_UCONV_REG_UNREG_ENCODER("jis_0212-1990" , NS_UNICODETOJISX0212_CID)
|
||||
NS_CONVERTER_REGISTRY_END
|
||||
|
||||
NS_IMPL_NSUCONVERTERREGSELF
|
||||
|
@ -87,16 +87,14 @@ PRUint16 g_HangulNullMapping[] ={
|
||||
};
|
||||
|
||||
NS_CONVERTER_REGISTRY_START
|
||||
NS_UCONV_REG_UNREG("EUC-KR", "Unicode" , NS_EUCKRTOUNICODE_CID)
|
||||
NS_UCONV_REG_UNREG("Unicode", "EUC-KR", NS_UNICODETOEUCKR_CID)
|
||||
NS_UCONV_REG_UNREG("Unicode", "ks_c_5601-1987", NS_UNICODETOKSC5601_CID)
|
||||
NS_UCONV_REG_UNREG("Unicode", "x-x11johab", NS_UNICODETOX11JOHAB_CID)
|
||||
NS_UCONV_REG_UNREG("x-johab", "Unicode" , NS_JOHABTOUNICODE_CID)
|
||||
NS_UCONV_REG_UNREG("Unicode", "x-johab", NS_UNICODETOJOHAB_CID)
|
||||
NS_UCONV_REG_UNREG("Unicode", "x-johab-noascii", NS_UNICODETOJOHABNOASCII_CID)
|
||||
NS_UCONV_REG_UNREG("x-windows-949", "Unicode" , NS_CP949TOUNICODE_CID)
|
||||
NS_UCONV_REG_UNREG("Unicode", "x-windows-949", NS_UNICODETOCP949_CID)
|
||||
NS_UCONV_REG_UNREG("ISO-2022-KR", "Unicode" , NS_ISO2022KRTOUNICODE_CID)
|
||||
NS_UCONV_REG_UNREG("EUC-KR", NS_EUCKRTOUNICODE_CID, NS_UNICODETOEUCKR_CID)
|
||||
NS_UCONV_REG_UNREG("x-johab", NS_JOHABTOUNICODE_CID, NS_UNICODETOJOHAB_CID)
|
||||
NS_UCONV_REG_UNREG("x-windows-949", NS_CP949TOUNICODE_CID, NS_UNICODETOCP949_CID)
|
||||
NS_UCONV_REG_UNREG_DECODER("ISO-2022-KR", NS_ISO2022KRTOUNICODE_CID)
|
||||
|
||||
NS_UCONV_REG_UNREG_ENCODER("ks_c_5601-1987", NS_UNICODETOKSC5601_CID)
|
||||
NS_UCONV_REG_UNREG_ENCODER("x-x11johab", NS_UNICODETOX11JOHAB_CID)
|
||||
NS_UCONV_REG_UNREG_ENCODER("x-johab-noascii", NS_UNICODETOJOHABNOASCII_CID)
|
||||
NS_CONVERTER_REGISTRY_END
|
||||
|
||||
NS_IMPL_NSUCONVERTERREGSELF
|
||||
|
@ -55,7 +55,7 @@ public:
|
||||
* Class constructor.
|
||||
*/
|
||||
nsUnicodeToX11Johab();
|
||||
~nsUnicodeToX11Johab();
|
||||
virtual ~nsUnicodeToX11Johab();
|
||||
|
||||
NS_IMETHOD Convert(
|
||||
const PRUnichar * aSrc, PRInt32 * aSrcLength,
|
||||
|
@ -182,127 +182,69 @@ static NS_DEFINE_CID(kComponentManagerCID, NS_COMPONENTMANAGER_CID);
|
||||
#define ENCODER_NAME_BASE "Unicode Encoder-"
|
||||
|
||||
NS_CONVERTER_REGISTRY_START
|
||||
NS_UCONV_REG_UNREG("us-ascii", "Unicode" , NS_ASCIITOUNICODE_CID)
|
||||
NS_UCONV_REG_UNREG("x-u-escaped", "Unicode" , NS_UESCAPETOUNICODE_CID)
|
||||
NS_UCONV_REG_UNREG("ISO-8859-2", "Unicode" , NS_ISO88592TOUNICODE_CID)
|
||||
NS_UCONV_REG_UNREG("ISO-8859-3", "Unicode" , NS_ISO88593TOUNICODE_CID)
|
||||
NS_UCONV_REG_UNREG("ISO-8859-4", "Unicode" , NS_ISO88594TOUNICODE_CID)
|
||||
NS_UCONV_REG_UNREG("ISO-8859-5", "Unicode" , NS_ISO88595TOUNICODE_CID)
|
||||
NS_UCONV_REG_UNREG("ISO-8859-6", "Unicode" , NS_ISO88596TOUNICODE_CID)
|
||||
NS_UCONV_REG_UNREG("ISO-8859-6-I", "Unicode" , NS_ISO88596ITOUNICODE_CID)
|
||||
NS_UCONV_REG_UNREG("ISO-8859-6-E", "Unicode" , NS_ISO88596ETOUNICODE_CID)
|
||||
NS_UCONV_REG_UNREG("ISO-8859-7", "Unicode" , NS_ISO88597TOUNICODE_CID)
|
||||
NS_UCONV_REG_UNREG("ISO-8859-8", "Unicode" , NS_ISO88598TOUNICODE_CID)
|
||||
NS_UCONV_REG_UNREG("ISO-8859-8-I", "Unicode" , NS_ISO88598ITOUNICODE_CID)
|
||||
NS_UCONV_REG_UNREG("ISO-8859-8-E", "Unicode" , NS_ISO88598ETOUNICODE_CID)
|
||||
NS_UCONV_REG_UNREG("ISO-8859-9", "Unicode" , NS_ISO88599TOUNICODE_CID)
|
||||
NS_UCONV_REG_UNREG("ISO-8859-10", "Unicode" , NS_ISO885910TOUNICODE_CID)
|
||||
NS_UCONV_REG_UNREG("ISO-8859-13", "Unicode" , NS_ISO885913TOUNICODE_CID)
|
||||
NS_UCONV_REG_UNREG("ISO-8859-14", "Unicode" , NS_ISO885914TOUNICODE_CID)
|
||||
NS_UCONV_REG_UNREG("ISO-8859-15", "Unicode" , NS_ISO885915TOUNICODE_CID)
|
||||
NS_UCONV_REG_UNREG("ISO-8859-16", "Unicode" , NS_ISO885916TOUNICODE_CID)
|
||||
NS_UCONV_REG_UNREG("ISO-IR-111", "Unicode" , NS_ISOIR111TOUNICODE_CID)
|
||||
NS_UCONV_REG_UNREG("windows-1250", "Unicode" , NS_CP1250TOUNICODE_CID)
|
||||
NS_UCONV_REG_UNREG("windows-1251", "Unicode" , NS_CP1251TOUNICODE_CID)
|
||||
NS_UCONV_REG_UNREG("windows-1253", "Unicode" , NS_CP1253TOUNICODE_CID)
|
||||
NS_UCONV_REG_UNREG("windows-1254", "Unicode" , NS_CP1254TOUNICODE_CID)
|
||||
NS_UCONV_REG_UNREG("windows-1255", "Unicode" , NS_CP1255TOUNICODE_CID)
|
||||
NS_UCONV_REG_UNREG("windows-1256", "Unicode" , NS_CP1256TOUNICODE_CID)
|
||||
NS_UCONV_REG_UNREG("windows-1257", "Unicode" , NS_CP1257TOUNICODE_CID)
|
||||
NS_UCONV_REG_UNREG("windows-1258", "Unicode" , NS_CP1258TOUNICODE_CID)
|
||||
NS_UCONV_REG_UNREG("TIS-620", "Unicode" , NS_CP874TOUNICODE_CID)
|
||||
NS_UCONV_REG_UNREG("IBM866", "Unicode" , NS_CP866TOUNICODE_CID)
|
||||
NS_UCONV_REG_UNREG("KOI8-R", "Unicode" , NS_KOI8RTOUNICODE_CID)
|
||||
NS_UCONV_REG_UNREG("KOI8-U", "Unicode" , NS_KOI8UTOUNICODE_CID)
|
||||
NS_UCONV_REG_UNREG("x-mac-ce", "Unicode" , NS_MACCETOUNICODE_CID)
|
||||
NS_UCONV_REG_UNREG("x-mac-greek", "Unicode" , NS_MACGREEKTOUNICODE_CID)
|
||||
NS_UCONV_REG_UNREG("x-mac-turkish", "Unicode" , NS_MACTURKISHTOUNICODE_CID)
|
||||
NS_UCONV_REG_UNREG("x-mac-croatian", "Unicode" , NS_MACCROATIANTOUNICODE_CID)
|
||||
NS_UCONV_REG_UNREG("x-mac-romanian", "Unicode" , NS_MACROMANIANTOUNICODE_CID)
|
||||
NS_UCONV_REG_UNREG("x-mac-cyrillic", "Unicode" , NS_MACCYRILLICTOUNICODE_CID)
|
||||
NS_UCONV_REG_UNREG("x-mac-ukrainian", "Unicode" , NS_MACUKRAINIANTOUNICODE_CID)
|
||||
NS_UCONV_REG_UNREG("x-mac-icelandic", "Unicode" , NS_MACICELANDICTOUNICODE_CID)
|
||||
NS_UCONV_REG_UNREG("GEOSTD8", "Unicode" , NS_GEOSTD8TOUNICODE_CID)
|
||||
NS_UCONV_REG_UNREG("armscii-8", "Unicode" , NS_ARMSCII8TOUNICODE_CID)
|
||||
NS_UCONV_REG_UNREG("x-viet-tcvn5712", "Unicode" , NS_TCVN5712TOUNICODE_CID)
|
||||
NS_UCONV_REG_UNREG("VISCII", "Unicode" , NS_VISCIITOUNICODE_CID)
|
||||
NS_UCONV_REG_UNREG("x-viet-vps", "Unicode" , NS_VPSTOUNICODE_CID)
|
||||
NS_UCONV_REG_UNREG("UTF-7", "Unicode" , NS_UTF7TOUNICODE_CID)
|
||||
NS_UCONV_REG_UNREG("x-imap4-modified-utf7", "Unicode" , NS_MUTF7TOUNICODE_CID)
|
||||
NS_UCONV_REG_UNREG("UTF-16BE", "Unicode" , NS_UTF16BETOUNICODE_CID)
|
||||
NS_UCONV_REG_UNREG("UTF-16LE", "Unicode" , NS_UTF16LETOUNICODE_CID)
|
||||
NS_UCONV_REG_UNREG("UTF-32BE", "Unicode" , NS_UTF32BETOUNICODE_CID)
|
||||
NS_UCONV_REG_UNREG("UTF-32LE", "Unicode" , NS_UTF32LETOUNICODE_CID)
|
||||
NS_UCONV_REG_UNREG("T.61-8bit", "Unicode" , NS_T61TOUNICODE_CID)
|
||||
NS_UCONV_REG_UNREG("x-user-defined", "Unicode" , NS_USERDEFINEDTOUNICODE_CID)
|
||||
NS_UCONV_REG_UNREG("Unicode", "us-ascii" , NS_UNICODETOASCII_CID)
|
||||
NS_UCONV_REG_UNREG("Unicode", "x-u-escaped" , NS_UNICODETOUESCAPE_CID)
|
||||
NS_UCONV_REG_UNREG("Unicode", "ISO-8859-2" , NS_UNICODETOISO88592_CID)
|
||||
NS_UCONV_REG_UNREG("Unicode", "ISO-8859-3" , NS_UNICODETOISO88593_CID)
|
||||
NS_UCONV_REG_UNREG("Unicode", "ISO-8859-4" , NS_UNICODETOISO88594_CID)
|
||||
NS_UCONV_REG_UNREG("Unicode", "ISO-8859-5" , NS_UNICODETOISO88595_CID)
|
||||
NS_UCONV_REG_UNREG("Unicode", "ISO-8859-6" , NS_UNICODETOISO88596_CID)
|
||||
NS_UCONV_REG_UNREG("Unicode", "ISO-8859-6-I" , NS_UNICODETOISO88596I_CID)
|
||||
NS_UCONV_REG_UNREG("Unicode", "ISO-8859-6-E" , NS_UNICODETOISO88596E_CID)
|
||||
NS_UCONV_REG_UNREG("Unicode", "ISO-8859-7" , NS_UNICODETOISO88597_CID)
|
||||
NS_UCONV_REG_UNREG("Unicode", "ISO-8859-8" , NS_UNICODETOISO88598_CID)
|
||||
NS_UCONV_REG_UNREG("Unicode", "ISO-8859-8-I" , NS_UNICODETOISO88598I_CID)
|
||||
NS_UCONV_REG_UNREG("Unicode", "ISO-8859-8-E" , NS_UNICODETOISO88598E_CID)
|
||||
NS_UCONV_REG_UNREG("Unicode", "ISO-8859-9" , NS_UNICODETOISO88599_CID)
|
||||
NS_UCONV_REG_UNREG("Unicode", "ISO-8859-10" , NS_UNICODETOISO885910_CID)
|
||||
NS_UCONV_REG_UNREG("Unicode", "ISO-8859-13" , NS_UNICODETOISO885913_CID)
|
||||
NS_UCONV_REG_UNREG("Unicode", "ISO-8859-14" , NS_UNICODETOISO885914_CID)
|
||||
NS_UCONV_REG_UNREG("Unicode", "ISO-8859-15" , NS_UNICODETOISO885915_CID)
|
||||
NS_UCONV_REG_UNREG("Unicode", "ISO-8859-16" , NS_UNICODETOISO885916_CID)
|
||||
NS_UCONV_REG_UNREG("Unicode", "ISO-IR-111" , NS_UNICODETOISOIR111_CID)
|
||||
NS_UCONV_REG_UNREG("Unicode", "windows-1250" , NS_UNICODETOCP1250_CID)
|
||||
NS_UCONV_REG_UNREG("Unicode", "windows-1251" , NS_UNICODETOCP1251_CID)
|
||||
NS_UCONV_REG_UNREG("Unicode", "windows-1253" , NS_UNICODETOCP1253_CID)
|
||||
NS_UCONV_REG_UNREG("Unicode", "windows-1254" , NS_UNICODETOCP1254_CID)
|
||||
NS_UCONV_REG_UNREG("Unicode", "windows-1255" , NS_UNICODETOCP1255_CID)
|
||||
NS_UCONV_REG_UNREG("Unicode", "windows-1256" , NS_UNICODETOCP1256_CID)
|
||||
NS_UCONV_REG_UNREG("Unicode", "windows-1257" , NS_UNICODETOCP1257_CID)
|
||||
NS_UCONV_REG_UNREG("Unicode", "windows-1258" , NS_UNICODETOCP1258_CID)
|
||||
NS_UCONV_REG_UNREG("Unicode", "TIS-620" , NS_UNICODETOCP874_CID)
|
||||
NS_UCONV_REG_UNREG("Unicode", "IBM866" , NS_UNICODETOCP866_CID)
|
||||
NS_UCONV_REG_UNREG("Unicode", "KOI8-R" , NS_UNICODETOKOI8R_CID)
|
||||
NS_UCONV_REG_UNREG("Unicode", "KOI8-U" , NS_UNICODETOKOI8U_CID)
|
||||
NS_UCONV_REG_UNREG("Unicode", "x-mac-ce" , NS_UNICODETOMACCE_CID)
|
||||
NS_UCONV_REG_UNREG("Unicode", "x-mac-greek" , NS_UNICODETOMACGREEK_CID)
|
||||
NS_UCONV_REG_UNREG("Unicode", "x-mac-turkish" , NS_UNICODETOMACTURKISH_CID)
|
||||
NS_UCONV_REG_UNREG("Unicode", "x-mac-croatian" , NS_UNICODETOMACCROATIAN_CID)
|
||||
NS_UCONV_REG_UNREG("Unicode", "x-mac-romanian" , NS_UNICODETOMACROMANIAN_CID)
|
||||
NS_UCONV_REG_UNREG("Unicode", "x-mac-cyrillic" , NS_UNICODETOMACCYRILLIC_CID)
|
||||
NS_UCONV_REG_UNREG("Unicode", "x-mac-ukrainian" , NS_UNICODETOMACUKRAINIAN_CID)
|
||||
NS_UCONV_REG_UNREG("Unicode", "x-mac-icelandic" , NS_UNICODETOMACICELANDIC_CID)
|
||||
NS_UCONV_REG_UNREG("Unicode", "GEOSTD8" , NS_UNICODETOGEOSTD8_CID)
|
||||
NS_UCONV_REG_UNREG("Unicode", "armscii-8" , NS_UNICODETOARMSCII8_CID)
|
||||
NS_UCONV_REG_UNREG("Unicode", "x-viet-tcvn5712" , NS_UNICODETOTCVN5712_CID)
|
||||
NS_UCONV_REG_UNREG("Unicode", "VISCII" , NS_UNICODETOVISCII_CID)
|
||||
NS_UCONV_REG_UNREG("Unicode", "x-viet-vps" , NS_UNICODETOVPS_CID)
|
||||
NS_UCONV_REG_UNREG("Unicode", "UTF-7" , NS_UNICODETOUTF7_CID)
|
||||
NS_UCONV_REG_UNREG("Unicode", "x-imap4-modified-utf7" , NS_UNICODETOMUTF7_CID)
|
||||
NS_UCONV_REG_UNREG("Unicode", "UTF-16BE" , NS_UNICODETOUTF16BE_CID)
|
||||
NS_UCONV_REG_UNREG("Unicode", "UTF-16LE" , NS_UNICODETOUTF16LE_CID)
|
||||
NS_UCONV_REG_UNREG("Unicode", "UTF-16" , NS_UNICODETOUTF16_CID)
|
||||
NS_UCONV_REG_UNREG("Unicode", "UTF-32BE" , NS_UNICODETOUTF32BE_CID)
|
||||
NS_UCONV_REG_UNREG("Unicode", "UTF-32LE" , NS_UNICODETOUTF32LE_CID)
|
||||
NS_UCONV_REG_UNREG("Unicode", "T.61-8bit" , NS_UNICODETOT61_CID)
|
||||
NS_UCONV_REG_UNREG("Unicode", "x-user-defined" , NS_UNICODETOUSERDEFINED_CID)
|
||||
NS_UCONV_REG_UNREG("Unicode", "Adobe-Symbol-Encoding" , NS_UNICODETOSYMBOL_CID)
|
||||
NS_UCONV_REG_UNREG("Unicode", "x-zapf-dingbats" , NS_UNICODETOZAPFDINGBATS_CID)
|
||||
NS_UCONV_REG_UNREG( "x-mac-arabic" , "Unicode" , NS_MACARABICTOUNICODE_CID)
|
||||
NS_UCONV_REG_UNREG( "x-mac-devanagari" , "Unicode" , NS_MACDEVANAGARITOUNICODE_CID)
|
||||
NS_UCONV_REG_UNREG( "x-mac-farsi" , "Unicode" , NS_MACFARSITOUNICODE_CID)
|
||||
NS_UCONV_REG_UNREG( "x-mac-gurmukhi" , "Unicode" , NS_MACGURMUKHITOUNICODE_CID)
|
||||
NS_UCONV_REG_UNREG( "x-mac-gujarati" , "Unicode" , NS_MACGUJARATITOUNICODE_CID)
|
||||
NS_UCONV_REG_UNREG( "x-mac-hebrew" , "Unicode" , NS_MACHEBREWTOUNICODE_CID)
|
||||
NS_UCONV_REG_UNREG( "Unicode" , "x-mac-arabic" , NS_UNICODETOMACARABIC_CID)
|
||||
NS_UCONV_REG_UNREG( "Unicode" , "x-mac-devanagari" , NS_UNICODETOMACDEVANAGARI_CID)
|
||||
NS_UCONV_REG_UNREG( "Unicode" , "x-mac-farsi" , NS_UNICODETOMACFARSI_CID)
|
||||
NS_UCONV_REG_UNREG( "Unicode" , "x-mac-gurmukhi" , NS_UNICODETOMACGURMUKHI_CID)
|
||||
NS_UCONV_REG_UNREG( "Unicode" , "x-mac-gujarati" , NS_UNICODETOMACGUJARATI_CID)
|
||||
NS_UCONV_REG_UNREG( "Unicode" , "x-mac-hebrew" , NS_UNICODETOMACHEBREW_CID)
|
||||
NS_UCONV_REG_UNREG("us-ascii", NS_ASCIITOUNICODE_CID, NS_UNICODETOASCII_CID)
|
||||
NS_UCONV_REG_UNREG("x-u-escaped", NS_UESCAPETOUNICODE_CID, NS_UNICODETOUESCAPE_CID)
|
||||
NS_UCONV_REG_UNREG("ISO-8859-2", NS_ISO88592TOUNICODE_CID, NS_UNICODETOISO88592_CID)
|
||||
NS_UCONV_REG_UNREG("ISO-8859-3", NS_ISO88593TOUNICODE_CID, NS_UNICODETOISO88593_CID)
|
||||
NS_UCONV_REG_UNREG("ISO-8859-4", NS_ISO88594TOUNICODE_CID, NS_UNICODETOISO88594_CID)
|
||||
NS_UCONV_REG_UNREG("ISO-8859-5", NS_ISO88595TOUNICODE_CID, NS_UNICODETOISO88595_CID)
|
||||
NS_UCONV_REG_UNREG("ISO-8859-6", NS_ISO88596TOUNICODE_CID, NS_UNICODETOISO88596_CID)
|
||||
NS_UCONV_REG_UNREG("ISO-8859-6-I", NS_ISO88596ITOUNICODE_CID, NS_UNICODETOISO88596I_CID)
|
||||
NS_UCONV_REG_UNREG("ISO-8859-6-E", NS_ISO88596ETOUNICODE_CID, NS_UNICODETOISO88596E_CID)
|
||||
NS_UCONV_REG_UNREG("ISO-8859-7", NS_ISO88597TOUNICODE_CID, NS_UNICODETOISO88597_CID)
|
||||
NS_UCONV_REG_UNREG("ISO-8859-8", NS_ISO88598TOUNICODE_CID, NS_UNICODETOISO88598_CID)
|
||||
NS_UCONV_REG_UNREG("ISO-8859-8-I", NS_ISO88598ITOUNICODE_CID, NS_UNICODETOISO88598I_CID)
|
||||
NS_UCONV_REG_UNREG("ISO-8859-8-E", NS_ISO88598ETOUNICODE_CID, NS_UNICODETOISO88598E_CID)
|
||||
NS_UCONV_REG_UNREG("ISO-8859-9", NS_ISO88599TOUNICODE_CID, NS_UNICODETOISO88599_CID)
|
||||
NS_UCONV_REG_UNREG("ISO-8859-10", NS_ISO885910TOUNICODE_CID, NS_UNICODETOISO885910_CID)
|
||||
NS_UCONV_REG_UNREG("ISO-8859-13", NS_ISO885913TOUNICODE_CID, NS_UNICODETOISO885913_CID)
|
||||
NS_UCONV_REG_UNREG("ISO-8859-14", NS_ISO885914TOUNICODE_CID, NS_UNICODETOISO885914_CID)
|
||||
NS_UCONV_REG_UNREG("ISO-8859-15", NS_ISO885915TOUNICODE_CID, NS_UNICODETOISO885915_CID)
|
||||
NS_UCONV_REG_UNREG("ISO-8859-16", NS_ISO885916TOUNICODE_CID, NS_UNICODETOISO885916_CID)
|
||||
NS_UCONV_REG_UNREG("ISO-IR-111", NS_ISOIR111TOUNICODE_CID, NS_UNICODETOISOIR111_CID)
|
||||
NS_UCONV_REG_UNREG("windows-1250", NS_CP1250TOUNICODE_CID, NS_UNICODETOCP1250_CID)
|
||||
NS_UCONV_REG_UNREG("windows-1251", NS_CP1251TOUNICODE_CID, NS_UNICODETOCP1251_CID)
|
||||
NS_UCONV_REG_UNREG("windows-1253", NS_CP1253TOUNICODE_CID, NS_UNICODETOCP1253_CID)
|
||||
NS_UCONV_REG_UNREG("windows-1254", NS_CP1254TOUNICODE_CID, NS_UNICODETOCP1254_CID)
|
||||
NS_UCONV_REG_UNREG("windows-1255", NS_CP1255TOUNICODE_CID, NS_UNICODETOCP1255_CID)
|
||||
NS_UCONV_REG_UNREG("windows-1256", NS_CP1256TOUNICODE_CID, NS_UNICODETOCP1256_CID)
|
||||
NS_UCONV_REG_UNREG("windows-1257", NS_CP1257TOUNICODE_CID, NS_UNICODETOCP1257_CID)
|
||||
NS_UCONV_REG_UNREG("windows-1258", NS_CP1258TOUNICODE_CID, NS_UNICODETOCP1258_CID)
|
||||
NS_UCONV_REG_UNREG("TIS-620", NS_CP874TOUNICODE_CID, NS_UNICODETOCP874_CID)
|
||||
NS_UCONV_REG_UNREG("IBM866", NS_CP866TOUNICODE_CID, NS_UNICODETOCP866_CID)
|
||||
NS_UCONV_REG_UNREG("KOI8-R", NS_KOI8RTOUNICODE_CID, NS_UNICODETOKOI8R_CID)
|
||||
NS_UCONV_REG_UNREG("KOI8-U", NS_KOI8UTOUNICODE_CID, NS_UNICODETOKOI8U_CID)
|
||||
NS_UCONV_REG_UNREG("x-mac-ce", NS_MACCETOUNICODE_CID, NS_UNICODETOMACCE_CID)
|
||||
NS_UCONV_REG_UNREG("x-mac-greek", NS_MACGREEKTOUNICODE_CID, NS_UNICODETOMACGREEK_CID)
|
||||
NS_UCONV_REG_UNREG("x-mac-turkish", NS_MACTURKISHTOUNICODE_CID, NS_UNICODETOMACTURKISH_CID)
|
||||
NS_UCONV_REG_UNREG("x-mac-croatian", NS_MACCROATIANTOUNICODE_CID, NS_UNICODETOMACCROATIAN_CID)
|
||||
NS_UCONV_REG_UNREG("x-mac-romanian", NS_MACROMANIANTOUNICODE_CID, NS_UNICODETOMACROMANIAN_CID)
|
||||
NS_UCONV_REG_UNREG("x-mac-cyrillic", NS_MACCYRILLICTOUNICODE_CID, NS_UNICODETOMACCYRILLIC_CID)
|
||||
NS_UCONV_REG_UNREG("x-mac-ukrainian", NS_MACUKRAINIANTOUNICODE_CID, NS_UNICODETOMACUKRAINIAN_CID)
|
||||
NS_UCONV_REG_UNREG("x-mac-icelandic", NS_MACICELANDICTOUNICODE_CID, NS_UNICODETOMACICELANDIC_CID)
|
||||
NS_UCONV_REG_UNREG("GEOSTD8", NS_GEOSTD8TOUNICODE_CID, NS_UNICODETOGEOSTD8_CID)
|
||||
NS_UCONV_REG_UNREG("armscii-8", NS_ARMSCII8TOUNICODE_CID, NS_UNICODETOARMSCII8_CID)
|
||||
NS_UCONV_REG_UNREG("x-viet-tcvn5712", NS_TCVN5712TOUNICODE_CID, NS_UNICODETOTCVN5712_CID)
|
||||
NS_UCONV_REG_UNREG("VISCII", NS_VISCIITOUNICODE_CID, NS_UNICODETOVISCII_CID)
|
||||
NS_UCONV_REG_UNREG("x-viet-vps", NS_VPSTOUNICODE_CID, NS_UNICODETOVPS_CID)
|
||||
NS_UCONV_REG_UNREG("UTF-7", NS_UTF7TOUNICODE_CID, NS_UNICODETOUTF7_CID)
|
||||
NS_UCONV_REG_UNREG("x-imap4-modified-utf7", NS_MUTF7TOUNICODE_CID, NS_UNICODETOMUTF7_CID)
|
||||
NS_UCONV_REG_UNREG("UTF-16BE", NS_UTF16BETOUNICODE_CID, NS_UNICODETOUTF16BE_CID)
|
||||
NS_UCONV_REG_UNREG("UTF-16LE", NS_UTF16LETOUNICODE_CID, NS_UNICODETOUTF16LE_CID)
|
||||
NS_UCONV_REG_UNREG("UTF-32BE", NS_UTF32BETOUNICODE_CID, NS_UNICODETOUTF32BE_CID)
|
||||
NS_UCONV_REG_UNREG("UTF-32LE", NS_UTF32LETOUNICODE_CID, NS_UNICODETOUTF32LE_CID)
|
||||
NS_UCONV_REG_UNREG("T.61-8bit", NS_T61TOUNICODE_CID, NS_UNICODETOT61_CID)
|
||||
NS_UCONV_REG_UNREG("x-user-defined", NS_USERDEFINEDTOUNICODE_CID, NS_UNICODETOUSERDEFINED_CID)
|
||||
NS_UCONV_REG_UNREG("x-mac-arabic" , NS_MACARABICTOUNICODE_CID, NS_UNICODETOMACARABIC_CID)
|
||||
NS_UCONV_REG_UNREG("x-mac-devanagari" , NS_MACDEVANAGARITOUNICODE_CID, NS_UNICODETOMACDEVANAGARI_CID)
|
||||
NS_UCONV_REG_UNREG("x-mac-farsi" , NS_MACFARSITOUNICODE_CID, NS_UNICODETOMACFARSI_CID)
|
||||
NS_UCONV_REG_UNREG("x-mac-gurmukhi" , NS_MACGURMUKHITOUNICODE_CID, NS_UNICODETOMACGURMUKHI_CID)
|
||||
NS_UCONV_REG_UNREG("x-mac-gujarati" , NS_MACGUJARATITOUNICODE_CID, NS_UNICODETOMACGUJARATI_CID)
|
||||
NS_UCONV_REG_UNREG("x-mac-hebrew" , NS_MACHEBREWTOUNICODE_CID, NS_UNICODETOMACHEBREW_CID)
|
||||
|
||||
NS_UCONV_REG_UNREG_ENCODER("UTF-16" , NS_UNICODETOUTF16_CID)
|
||||
NS_UCONV_REG_UNREG_ENCODER("Adobe-Symbol-Encoding" , NS_UNICODETOSYMBOL_CID)
|
||||
NS_UCONV_REG_UNREG_ENCODER("x-zapf-dingbats" , NS_UNICODETOZAPFDINGBATS_CID)
|
||||
NS_CONVERTER_REGISTRY_END
|
||||
|
||||
NS_IMPL_NSUCONVERTERREGSELF
|
||||
|
@ -78,22 +78,22 @@ static NS_DEFINE_CID(kComponentManagerCID, NS_COMPONENTMANAGER_CID);
|
||||
|
||||
NS_CONVERTER_REGISTRY_START
|
||||
|
||||
NS_UCONV_REG_UNREG("Unicode", "x-ttf-cmr", NS_UNICODETOTEXCMRTTF_CID)
|
||||
NS_UCONV_REG_UNREG("Unicode", "x-ttf-cmmi", NS_UNICODETOTEXCMMITTF_CID)
|
||||
NS_UCONV_REG_UNREG("Unicode", "x-ttf-cmsy", NS_UNICODETOTEXCMSYTTF_CID)
|
||||
NS_UCONV_REG_UNREG("Unicode", "x-ttf-cmex", NS_UNICODETOTEXCMEXTTF_CID)
|
||||
NS_UCONV_REG_UNREG_ENCODER("x-ttf-cmr", NS_UNICODETOTEXCMRTTF_CID)
|
||||
NS_UCONV_REG_UNREG_ENCODER("x-ttf-cmmi", NS_UNICODETOTEXCMMITTF_CID)
|
||||
NS_UCONV_REG_UNREG_ENCODER("x-ttf-cmsy", NS_UNICODETOTEXCMSYTTF_CID)
|
||||
NS_UCONV_REG_UNREG_ENCODER("x-ttf-cmex", NS_UNICODETOTEXCMEXTTF_CID)
|
||||
#if !defined(XP_WIN) && !defined(XP_OS2) && !defined(XP_MAC)
|
||||
NS_UCONV_REG_UNREG("Unicode", "x-t1-cmr", NS_UNICODETOTEXCMRT1_CID)
|
||||
NS_UCONV_REG_UNREG("Unicode", "x-t1-cmmi", NS_UNICODETOTEXCMMIT1_CID)
|
||||
NS_UCONV_REG_UNREG("Unicode", "x-t1-cmsy", NS_UNICODETOTEXCMSYT1_CID)
|
||||
NS_UCONV_REG_UNREG("Unicode", "x-t1-cmex", NS_UNICODETOTEXCMEXT1_CID)
|
||||
NS_UCONV_REG_UNREG_ENCODER("x-t1-cmr", NS_UNICODETOTEXCMRT1_CID)
|
||||
NS_UCONV_REG_UNREG_ENCODER("x-t1-cmmi", NS_UNICODETOTEXCMMIT1_CID)
|
||||
NS_UCONV_REG_UNREG_ENCODER("x-t1-cmsy", NS_UNICODETOTEXCMSYT1_CID)
|
||||
NS_UCONV_REG_UNREG_ENCODER("x-t1-cmex", NS_UNICODETOTEXCMEXT1_CID)
|
||||
#endif
|
||||
NS_UCONV_REG_UNREG("Unicode", "x-mathematica1", NS_UNICODETOMATHEMATICA1_CID)
|
||||
NS_UCONV_REG_UNREG("Unicode", "x-mathematica2", NS_UNICODETOMATHEMATICA2_CID)
|
||||
NS_UCONV_REG_UNREG("Unicode", "x-mathematica3", NS_UNICODETOMATHEMATICA3_CID)
|
||||
NS_UCONV_REG_UNREG("Unicode", "x-mathematica4", NS_UNICODETOMATHEMATICA4_CID)
|
||||
NS_UCONV_REG_UNREG("Unicode", "x-mathematica5", NS_UNICODETOMATHEMATICA5_CID)
|
||||
NS_UCONV_REG_UNREG("Unicode", "x-mtextra", NS_UNICODETOMTEXTRA_CID)
|
||||
NS_UCONV_REG_UNREG_ENCODER("x-mathematica1", NS_UNICODETOMATHEMATICA1_CID)
|
||||
NS_UCONV_REG_UNREG_ENCODER("x-mathematica2", NS_UNICODETOMATHEMATICA2_CID)
|
||||
NS_UCONV_REG_UNREG_ENCODER("x-mathematica3", NS_UNICODETOMATHEMATICA3_CID)
|
||||
NS_UCONV_REG_UNREG_ENCODER("x-mathematica4", NS_UNICODETOMATHEMATICA4_CID)
|
||||
NS_UCONV_REG_UNREG_ENCODER("x-mathematica5", NS_UNICODETOMATHEMATICA5_CID)
|
||||
NS_UCONV_REG_UNREG_ENCODER("x-mtextra", NS_UNICODETOMTEXTRA_CID)
|
||||
|
||||
NS_CONVERTER_REGISTRY_END
|
||||
|
||||
|
@ -86,12 +86,11 @@ PRUint16 g_utBig5HKSCSMapping[] = {
|
||||
};
|
||||
|
||||
NS_CONVERTER_REGISTRY_START
|
||||
NS_UCONV_REG_UNREG("Big5", "Unicode" , NS_BIG5TOUNICODE_CID)
|
||||
NS_UCONV_REG_UNREG("Unicode", "x-x-big5", NS_UNICODETOBIG5NOASCII_CID)
|
||||
NS_UCONV_REG_UNREG("Unicode", "Big5" , NS_UNICODETOBIG5_CID)
|
||||
NS_UCONV_REG_UNREG("Big5-HKSCS", "Unicode" , NS_BIG5HKSCSTOUNICODE_CID)
|
||||
NS_UCONV_REG_UNREG("Unicode", "Big5-HKSCS" , NS_UNICODETOBIG5HKSCS_CID)
|
||||
NS_UCONV_REG_UNREG("Unicode", "hkscs-1" , NS_UNICODETOHKSCS_CID)
|
||||
NS_UCONV_REG_UNREG("Big5", NS_BIG5TOUNICODE_CID, NS_UNICODETOBIG5_CID)
|
||||
NS_UCONV_REG_UNREG("Big5-HKSCS", NS_BIG5HKSCSTOUNICODE_CID, NS_UNICODETOBIG5HKSCS_CID)
|
||||
|
||||
NS_UCONV_REG_UNREG_ENCODER("hkscs-1" , NS_UNICODETOHKSCS_CID)
|
||||
NS_UCONV_REG_UNREG_ENCODER("x-x-big5", NS_UNICODETOBIG5NOASCII_CID)
|
||||
NS_CONVERTER_REGISTRY_END
|
||||
|
||||
NS_IMPL_NSUCONVERTERREGSELF
|
||||
|
@ -131,15 +131,14 @@ PRUint16 g_ASCIIMappingTable[] = {
|
||||
};
|
||||
|
||||
NS_CONVERTER_REGISTRY_START
|
||||
NS_UCONV_REG_UNREG("x-euc-tw", "Unicode" , NS_EUCTWTOUNICODE_CID)
|
||||
NS_UCONV_REG_UNREG("Unicode", "x-euc-tw" , NS_UNICODETOEUCTW_CID)
|
||||
NS_UCONV_REG_UNREG("Unicode", "x-cns-11643-1" , NS_UNICODETOCNS11643P1_CID)
|
||||
NS_UCONV_REG_UNREG("Unicode", "x-cns-11643-2" , NS_UNICODETOCNS11643P2_CID)
|
||||
NS_UCONV_REG_UNREG("Unicode", "x-cns-11643-3" , NS_UNICODETOCNS11643P3_CID)
|
||||
NS_UCONV_REG_UNREG("Unicode", "x-cns-11643-4" , NS_UNICODETOCNS11643P4_CID)
|
||||
NS_UCONV_REG_UNREG("Unicode", "x-cns-11643-5" , NS_UNICODETOCNS11643P5_CID)
|
||||
NS_UCONV_REG_UNREG("Unicode", "x-cns-11643-6" , NS_UNICODETOCNS11643P6_CID)
|
||||
NS_UCONV_REG_UNREG("Unicode", "x-cns-11643-7" , NS_UNICODETOCNS11643P7_CID)
|
||||
NS_UCONV_REG_UNREG("x-euc-tw", NS_EUCTWTOUNICODE_CID, NS_UNICODETOEUCTW_CID)
|
||||
NS_UCONV_REG_UNREG_ENCODER("x-cns-11643-1" , NS_UNICODETOCNS11643P1_CID)
|
||||
NS_UCONV_REG_UNREG_ENCODER("x-cns-11643-2" , NS_UNICODETOCNS11643P2_CID)
|
||||
NS_UCONV_REG_UNREG_ENCODER("x-cns-11643-3" , NS_UNICODETOCNS11643P3_CID)
|
||||
NS_UCONV_REG_UNREG_ENCODER("x-cns-11643-4" , NS_UNICODETOCNS11643P4_CID)
|
||||
NS_UCONV_REG_UNREG_ENCODER("x-cns-11643-5" , NS_UNICODETOCNS11643P5_CID)
|
||||
NS_UCONV_REG_UNREG_ENCODER("x-cns-11643-6" , NS_UNICODETOCNS11643P6_CID)
|
||||
NS_UCONV_REG_UNREG_ENCODER("x-cns-11643-7" , NS_UNICODETOCNS11643P7_CID)
|
||||
NS_CONVERTER_REGISTRY_END
|
||||
|
||||
NS_IMPL_NSUCONVERTERREGSELF
|
||||
|
Loading…
Reference in New Issue
Block a user