Bug 637599 - Move nsIPlatformCharset from intl/uconv to intl/locale. r=smontagu
authorMakoto Kato <m_kato@ga2.so-net.ne.jp>
Mon, 04 Apr 2011 16:05:07 -0700
changeset 64668 b6af6b28b7294e1be7855f004b62467857662209
parent 64667 c47b3a690698354fd558e5c3a75dd4e2df1fc1bf
child 64669 5e74b6d598e762b661bbb1cb5841f590cdbea098
push id1
push userroot
push dateMon, 20 Oct 2014 17:29:22 +0000
reviewerssmontagu
bugs637599
milestone2.2a1pre
Bug 637599 - Move nsIPlatformCharset from intl/uconv to intl/locale. r=smontagu
intl/build/nsI18nModule.cpp
intl/locale/public/Makefile.in
intl/locale/public/nsICharsetAlias.h
intl/locale/public/nsIPlatformCharset.h
intl/locale/src/Makefile.in
intl/locale/src/charsetalias.properties
intl/locale/src/mac/Makefile.in
intl/locale/src/mac/maccharset.properties
intl/locale/src/mac/nsMacCharset.cpp
intl/locale/src/nsCharsetAlias.h
intl/locale/src/nsCharsetAliasImp.cpp
intl/locale/src/nsLocaleConstructors.h
intl/locale/src/nsPlatformCharset.h
intl/locale/src/nsUConvPropertySearch.cpp
intl/locale/src/nsUConvPropertySearch.h
intl/locale/src/os2/Makefile.in
intl/locale/src/os2/nsOS2Charset.cpp
intl/locale/src/os2/os2charset.properties
intl/locale/src/props2arrays.py
intl/locale/src/unix/Makefile.in
intl/locale/src/unix/nsUNIXCharset.cpp
intl/locale/src/unix/unixcharset.properties
intl/locale/src/windows/Makefile.in
intl/locale/src/windows/nsWinCharset.cpp
intl/locale/src/windows/wincharset.properties
intl/uconv/public/Makefile.in
intl/uconv/public/nsICharsetAlias.h
intl/uconv/public/nsIPlatformCharset.h
intl/uconv/src/Makefile.in
intl/uconv/src/charsetalias.properties
intl/uconv/src/maccharset.properties
intl/uconv/src/nsCharsetAlias.h
intl/uconv/src/nsCharsetAliasImp.cpp
intl/uconv/src/nsMacCharset.cpp
intl/uconv/src/nsOS2Charset.cpp
intl/uconv/src/nsPlatformCharset.h
intl/uconv/src/nsScriptableUConv.cpp
intl/uconv/src/nsUConvModule.cpp
intl/uconv/src/nsUConvPropertySearch.cpp
intl/uconv/src/nsUConvPropertySearch.h
intl/uconv/src/nsUNIXCharset.cpp
intl/uconv/src/nsWinCharset.cpp
intl/uconv/src/os2charset.properties
intl/uconv/src/props2arrays.py
intl/uconv/src/unixcharset.properties
intl/uconv/src/wincharset.properties
--- a/intl/build/nsI18nModule.cpp
+++ b/intl/build/nsI18nModule.cpp
@@ -84,16 +84,18 @@ NS_DEFINE_NAMED_CID(NS_ENTITYCONVERTER_C
 NS_DEFINE_NAMED_CID(NS_SAVEASCHARSET_CID);
 NS_DEFINE_NAMED_CID(NS_UNICODE_NORMALIZER_CID);
 NS_DEFINE_NAMED_CID(NS_STRINGBUNDLESERVICE_CID);
 NS_DEFINE_NAMED_CID(NS_STRINGBUNDLETEXTOVERRIDE_CID);
 NS_DEFINE_NAMED_CID(NS_LOCALESERVICE_CID);
 NS_DEFINE_NAMED_CID(NS_COLLATIONFACTORY_CID);
 NS_DEFINE_NAMED_CID(NS_SCRIPTABLEDATEFORMAT_CID);
 NS_DEFINE_NAMED_CID(NS_LANGUAGEATOMSERVICE_CID);
+NS_DEFINE_NAMED_CID(NS_CHARSETALIAS_CID);
+NS_DEFINE_NAMED_CID(NS_PLATFORMCHARSET_CID);
 #ifdef XP_WIN
 NS_DEFINE_NAMED_CID(NS_WIN32LOCALE_CID);
 NS_DEFINE_NAMED_CID(NS_COLLATION_CID);
 NS_DEFINE_NAMED_CID(NS_DATETIMEFORMAT_CID);
 #endif
 #ifdef USE_UNIX_LOCALE
 NS_DEFINE_NAMED_CID(NS_POSIXLOCALE_CID);
 NS_DEFINE_NAMED_CID(NS_COLLATION_CID);
@@ -120,16 +122,18 @@ static const mozilla::Module::CIDEntry k
     { &kNS_SAVEASCHARSET_CID, false, NULL, nsSaveAsCharsetConstructor },
     { &kNS_UNICODE_NORMALIZER_CID, false, NULL, nsUnicodeNormalizerConstructor },
     { &kNS_STRINGBUNDLESERVICE_CID, false, NULL, nsStringBundleServiceConstructor },
     { &kNS_STRINGBUNDLETEXTOVERRIDE_CID, false, NULL, nsStringBundleTextOverrideConstructor },
     { &kNS_LOCALESERVICE_CID, false, NULL, CreateLocaleService },
     { &kNS_COLLATIONFACTORY_CID, false, NULL, nsCollationFactoryConstructor },
     { &kNS_SCRIPTABLEDATEFORMAT_CID, false, NULL, NS_NewScriptableDateFormat },
     { &kNS_LANGUAGEATOMSERVICE_CID, false, NULL, nsLanguageAtomServiceConstructor },
+    { &kNS_CHARSETALIAS_CID, false, NULL, nsCharsetAlias2Constructor },
+    { &kNS_PLATFORMCHARSET_CID, false, NULL, nsPlatformCharsetConstructor },
 #ifdef XP_WIN
     { &kNS_WIN32LOCALE_CID, false, NULL, nsIWin32LocaleImplConstructor },
     { &kNS_COLLATION_CID, false, NULL, nsCollationWinConstructor },
     { &kNS_DATETIMEFORMAT_CID, false, NULL, nsDateTimeFormatWinConstructor },
 #endif
 #ifdef USE_UNIX_LOCALE
     { &kNS_POSIXLOCALE_CID, false, NULL, nsPosixLocaleConstructor },
     { &kNS_COLLATION_CID, false, NULL, nsCollationUnixConstructor },
@@ -158,16 +162,18 @@ static const mozilla::Module::ContractID
     { NS_SAVEASCHARSET_CONTRACTID, &kNS_SAVEASCHARSET_CID },
     { NS_UNICODE_NORMALIZER_CONTRACTID, &kNS_UNICODE_NORMALIZER_CID },
     { NS_STRINGBUNDLE_CONTRACTID, &kNS_STRINGBUNDLESERVICE_CID },
     { NS_STRINGBUNDLETEXTOVERRIDE_CONTRACTID, &kNS_STRINGBUNDLETEXTOVERRIDE_CID },
     { NS_LOCALESERVICE_CONTRACTID, &kNS_LOCALESERVICE_CID },
     { NS_COLLATIONFACTORY_CONTRACTID, &kNS_COLLATIONFACTORY_CID },
     { NS_SCRIPTABLEDATEFORMAT_CONTRACTID, &kNS_SCRIPTABLEDATEFORMAT_CID },
     { NS_LANGUAGEATOMSERVICE_CONTRACTID, &kNS_LANGUAGEATOMSERVICE_CID },
+    { NS_CHARSETALIAS_CONTRACTID, &kNS_CHARSETALIAS_CID },
+    { NS_PLATFORMCHARSET_CONTRACTID, &kNS_PLATFORMCHARSET_CID },
 #ifdef XP_WIN
     { NS_WIN32LOCALE_CONTRACTID, &kNS_WIN32LOCALE_CID },
     { NS_COLLATION_CONTRACTID, &kNS_COLLATION_CID },
     { NS_DATETIMEFORMAT_CONTRACTID, &kNS_DATETIMEFORMAT_CID },
 #endif
 #ifdef USE_UNIX_LOCALE
     { NS_POSIXLOCALE_CONTRACTID, &kNS_POSIXLOCALE_CID },
     { NS_COLLATION_CONTRACTID, &kNS_COLLATION_CID },
--- a/intl/locale/public/Makefile.in
+++ b/intl/locale/public/Makefile.in
@@ -48,13 +48,15 @@ EXPORTS		= \
 		nsCollationCID.h \
 		nsDateTimeFormatCID.h \
 		nsIDateTimeFormat.h \
 		nsILanguageAtomService.h \
 		nsIMacLocale.h \
 		nsIPosixLocale.h \
 		nsIOS2Locale.h \
 		nsIWin32Locale.h \
+		nsICharsetAlias.h \
+		nsIPlatformCharset.h \
 		nsLocaleCID.h \
 		$(NULL)
 
 include $(topsrcdir)/config/rules.mk
 
rename from intl/uconv/public/nsICharsetAlias.h
rename to intl/locale/public/nsICharsetAlias.h
rename from intl/uconv/public/nsIPlatformCharset.h
rename to intl/locale/public/nsIPlatformCharset.h
--- a/intl/locale/src/Makefile.in
+++ b/intl/locale/src/Makefile.in
@@ -62,16 +62,18 @@ OS_INCLUDES	+= $(MOZ_QT_CFLAGS)
 endif
 
 CPPSRCS		= \
 		nsCollation.cpp \
 		nsScriptableDateFormat.cpp \
 		nsLanguageAtomService.cpp \
 		nsLocale.cpp \
 		nsLocaleService.cpp \
+		nsCharsetAliasImp.cpp \
+		nsUConvPropertySearch.cpp \
 		$(NULL)
 
 EXPORTS		= \
 		nsCollation.h \
 		$(NULL)
 
 EXPORT_RESOURCE = \
 		$(srcdir)/langGroups.properties \
@@ -82,13 +84,22 @@ EXTRA_JS_MODULES = \
   PluralForm.jsm \
   $(NULL)
 
 # we don't want the shared lib, but we want to force the creation of a static lib.
 FORCE_STATIC_LIB = 1
 
 include $(topsrcdir)/config/rules.mk
 
+nsCharsetAliasImp.$(OBJ_SUFFIX): charsetalias.properties.h
+
+charsetalias.properties.h: props2arrays.py charsetalias.properties
+	$(PYTHON) $^ $@
+
+GARBAGE += \
+	charsetalias.properties.h \
+	$(NULL)
+
 libs::
 	$(INSTALL) $(EXPORT_RESOURCE) $(DIST)/bin/res
 
 install::
 	$(SYSINSTALL) $(IFLAGS1) $(EXPORT_RESOURCE) $(DESTDIR)$(mozappdir)/res
rename from intl/uconv/src/charsetalias.properties
rename to intl/locale/src/charsetalias.properties
--- a/intl/locale/src/mac/Makefile.in
+++ b/intl/locale/src/mac/Makefile.in
@@ -47,13 +47,23 @@ LIBRARY_NAME	= platlocale_s
 FORCE_STATIC_LIB	= 1
 LIBXUL_LIBRARY  = 1
 
 
 CPPSRCS		= \
 		nsCollationMacUC.cpp \
 		nsDateTimeFormatMac.cpp \
 		nsMacLocale.cpp \
+		nsMacCharset.cpp \
 		$(NULL)
 
 include $(topsrcdir)/config/rules.mk
 
 INCLUDES	+= -I$(srcdir)/..
+
+nsMacCharset.$(OBJ_SUFFIX): maccharset.properties.h
+
+maccharset.properties.h: $(srcdir)/../props2arrays.py maccharset.properties
+	$(PYTHON) $^ $@
+
+GARBAGE += \
+	maccharset.properties.h \
+	$(NULL)
rename from intl/uconv/src/maccharset.properties
rename to intl/locale/src/mac/maccharset.properties
rename from intl/uconv/src/nsMacCharset.cpp
rename to intl/locale/src/mac/nsMacCharset.cpp
--- a/intl/uconv/src/nsMacCharset.cpp
+++ b/intl/locale/src/mac/nsMacCharset.cpp
@@ -34,17 +34,16 @@
  * the terms of any one of the MPL, the GPL or the LGPL.
  *
  * ***** END LICENSE BLOCK ***** */
 
 #include <Carbon/Carbon.h>
 #include "nsIPlatformCharset.h"
 #include "pratom.h"
 #include "nsUConvPropertySearch.h"
-#include "nsUConvDll.h"
 #include "nsCOMPtr.h"
 #include "nsIServiceManager.h"
 #include "nsIMacLocale.h"
 #include "nsLocaleCID.h"
 #include "nsReadableUtils.h"
 #include "nsPlatformCharset.h"
 #include "nsEncoderDecoderUtils.h"
 
rename from intl/uconv/src/nsCharsetAlias.h
rename to intl/locale/src/nsCharsetAlias.h
rename from intl/uconv/src/nsCharsetAliasImp.cpp
rename to intl/locale/src/nsCharsetAliasImp.cpp
--- a/intl/uconv/src/nsCharsetAliasImp.cpp
+++ b/intl/locale/src/nsCharsetAliasImp.cpp
@@ -37,17 +37,16 @@
 
 
 #include "nsICharsetAlias.h"
 #include "pratom.h"
 
 // for NS_IMPL_IDS only
 #include "nsIPlatformCharset.h"
 
-#include "nsUConvDll.h"
 #include "nsReadableUtils.h"
 #include "nsUnicharUtils.h"
 #include "nsUConvPropertySearch.h"
 #include "nsITimelineService.h"
 #include "nsCharsetAlias.h"
 
 //--------------------------------------------------------------
 NS_IMPL_THREADSAFE_ISUPPORTS1(nsCharsetAlias2, nsICharsetAlias)
--- a/intl/locale/src/nsLocaleConstructors.h
+++ b/intl/locale/src/nsLocaleConstructors.h
@@ -41,16 +41,18 @@
 
 #include "nsCollationCID.h"
 #include "nsDateTimeFormatCID.h"
 #include "mozilla/ModuleUtils.h"
 #include "nsILocaleService.h"
 #include "nsIScriptableDateFormat.h"
 #include "nsIServiceManager.h"
 #include "nsLanguageAtomService.h"
+#include "nsCharsetAlias.h"
+#include "nsPlatformCharset.h"
 #include "nsLocaleCID.h"
 
 #if defined(XP_MACOSX)
 #define USE_MAC_LOCALE
 #endif
 
 #if defined(XP_UNIX) && !defined(XP_MACOSX)
 #define USE_UNIX_LOCALE
@@ -96,17 +98,18 @@ ctor_(nsISupports* aOuter, REFNSIID aIID
   return rv;                                              \
 }
 
 
 NSLOCALE_MAKE_CTOR(CreateLocaleService, nsILocaleService, NS_NewLocaleService)
 NS_GENERIC_FACTORY_CONSTRUCTOR(nsCollationFactory)
 //NS_GENERIC_FACTORY_CONSTRUCTOR(nsScriptableDateTimeFormat)
 NS_GENERIC_FACTORY_CONSTRUCTOR(nsLanguageAtomService)
-
+NS_GENERIC_FACTORY_CONSTRUCTOR(nsCharsetAlias2)
+NS_GENERIC_FACTORY_CONSTRUCTOR_INIT(nsPlatformCharset, Init)
 
 #ifdef XP_WIN
 NS_GENERIC_FACTORY_CONSTRUCTOR(nsIWin32LocaleImpl)
 NS_GENERIC_FACTORY_CONSTRUCTOR(nsCollationWin)
 NS_GENERIC_FACTORY_CONSTRUCTOR(nsDateTimeFormatWin)
 #endif
 
 #ifdef USE_UNIX_LOCALE
rename from intl/uconv/src/nsPlatformCharset.h
rename to intl/locale/src/nsPlatformCharset.h
rename from intl/uconv/src/nsUConvPropertySearch.cpp
rename to intl/locale/src/nsUConvPropertySearch.cpp
rename from intl/uconv/src/nsUConvPropertySearch.h
rename to intl/locale/src/nsUConvPropertySearch.h
--- a/intl/locale/src/os2/Makefile.in
+++ b/intl/locale/src/os2/Makefile.in
@@ -48,15 +48,24 @@ EXPORT_LIBRARY = 1
 FORCE_STATIC_LIB	= 1
 LIBXUL_LIBRARY  = 1
 
 
 CPPSRCS		= \
 		nsOS2Locale.cpp \
 		nsCollationOS2.cpp \
 		nsDateTimeFormatOS2.cpp \
+		nsOS2Charset.cpp \
 		$(NULL)
 
 
 include $(topsrcdir)/config/rules.mk
 
 INCLUDES	+= -I$(srcdir)/..
 
+nsOS2Charset.$(OBJ_SUFFIX): os2charset.properties.h
+
+os2charset.properties.h: $(srcdir)/../props2arrays.py os2charset.properties
+	$(PYTHON) $^ $@
+
+GARBAGE += \
+	os2charset.properties.h \
+	$(NULL)
rename from intl/uconv/src/nsOS2Charset.cpp
rename to intl/locale/src/os2/nsOS2Charset.cpp
--- a/intl/uconv/src/nsOS2Charset.cpp
+++ b/intl/locale/src/os2/nsOS2Charset.cpp
@@ -38,17 +38,16 @@
  * the terms of any one of the MPL, the GPL or the LGPL.
  *
  * ***** END LICENSE BLOCK ***** */
 #include "nsIPlatformCharset.h"
 #include "nsUConvPropertySearch.h"
 #include "pratom.h"
 #define INCL_WIN
 #include <os2.h>
-#include "nsUConvDll.h"
 #include "nsIOS2Locale.h"
 #include "nsCOMPtr.h"
 #include "nsReadableUtils.h"
 #include "nsLocaleCID.h"
 #include "nsIServiceManager.h"
 #include "nsITimelineService.h"
 #include "nsPlatformCharset.h"
 
rename from intl/uconv/src/os2charset.properties
rename to intl/locale/src/os2/os2charset.properties
rename from intl/uconv/src/props2arrays.py
rename to intl/locale/src/props2arrays.py
--- a/intl/locale/src/unix/Makefile.in
+++ b/intl/locale/src/unix/Makefile.in
@@ -49,16 +49,33 @@ LIBXUL_LIBRARY  = 1
 
 
 CPPSRCS		= \
 		nsCollationUnix.cpp \
 		nsDateTimeFormatUnix.cpp \
 		nsPosixLocale.cpp \
 		$(NULL)
 
+CPPSRCS		+= nsUNIXCharset.cpp
+
 ifdef ENABLE_TESTS
 DIRS		+= tests
 endif
 
 include $(topsrcdir)/config/rules.mk
 
 INCLUDES	+= -I$(srcdir)/..
 
+# 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
+
+nsUNIXCharset.$(OBJ_SUFFIX): unixcharset.properties.h
+
+unixcharset.properties.h: $(srcdir)/../props2arrays.py unixcharset.properties
+	$(PYTHON) $^ $@
+
+GARBAGE += \
+	unixcharset.properties.h \
+	$(NULL)
rename from intl/uconv/src/nsUNIXCharset.cpp
rename to intl/locale/src/unix/nsUNIXCharset.cpp
--- a/intl/uconv/src/nsUNIXCharset.cpp
+++ b/intl/locale/src/unix/nsUNIXCharset.cpp
@@ -37,17 +37,16 @@
 
 #include <locale.h>
 #include "nsIPlatformCharset.h"
 #include "pratom.h"
 #include "nsUConvPropertySearch.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 "nsEncoderDecoderUtils.h"
 #if HAVE_GNU_LIBC_VERSION_H
 #include <gnu/libc-version.h>
rename from intl/uconv/src/unixcharset.properties
rename to intl/locale/src/unix/unixcharset.properties
--- a/intl/locale/src/windows/Makefile.in
+++ b/intl/locale/src/windows/Makefile.in
@@ -47,13 +47,23 @@ LIBRARY_NAME	= platlocale_s
 FORCE_STATIC_LIB	= 1
 LIBXUL_LIBRARY  = 1
 
 
 CPPSRCS		= \
 		nsCollationWin.cpp \
 		nsDateTimeFormatWin.cpp \
 		nsIWin32LocaleImpl.cpp \
+		nsWinCharset.cpp \
 		$(NULL)
 
 include $(topsrcdir)/config/rules.mk
 
 INCLUDES	+= -I$(srcdir)/..
+
+nsWinCharset.$(OBJ_SUFFIX): wincharset.properties.h
+
+wincharset.properties.h: $(srcdir)/../props2arrays.py wincharset.properties
+	$(PYTHON) $^ $@
+
+GARBAGE += \
+	wincharset.properties.h \
+	$(NULL)
rename from intl/uconv/src/nsWinCharset.cpp
rename to intl/locale/src/windows/nsWinCharset.cpp
--- a/intl/uconv/src/nsWinCharset.cpp
+++ b/intl/locale/src/windows/nsWinCharset.cpp
@@ -34,17 +34,16 @@
  * the terms of any one of the MPL, the GPL or the LGPL.
  *
  * ***** END LICENSE BLOCK ***** */
 
 #include "nsIPlatformCharset.h"
 #include "nsUConvPropertySearch.h"
 #include "pratom.h"
 #include <windows.h>
-#include "nsUConvDll.h"
 #include "nsIWin32Locale.h"
 #include "nsCOMPtr.h"
 #include "nsReadableUtils.h"
 #include "nsLocaleCID.h"
 #include "nsServiceManagerUtils.h"
 #include "nsITimelineService.h"
 #include "nsPlatformCharset.h"
 
rename from intl/uconv/src/wincharset.properties
rename to intl/locale/src/windows/wincharset.properties
--- a/intl/uconv/public/Makefile.in
+++ b/intl/uconv/public/Makefile.in
@@ -40,18 +40,16 @@ topsrcdir	= @top_srcdir@
 srcdir		= @srcdir@
 VPATH		= @srcdir@
 
 include $(DEPTH)/config/autoconf.mk
 
 MODULE		= uconv
 
 EXPORTS		= \
-		nsICharsetAlias.h \
-		nsIPlatformCharset.h \
 		nsIUnicodeDecoder.h \
 		nsIUnicodeEncoder.h \
 		uconvutil.h \
 		nsEncoderDecoderUtils.h \
 		nsUConvCID.h \
 		$(NULL)
 
 include $(topsrcdir)/config/rules.mk
--- a/intl/uconv/src/Makefile.in
+++ b/intl/uconv/src/Makefile.in
@@ -49,26 +49,24 @@ IS_COMPONENT	= 1
 MODULE_NAME	= nsUConvModule
 GRE_MODULE	= 1
 LIBXUL_LIBRARY = 1
 # To avoid conflict with OS/2 system uconv.dll
 SHORT_LIBNAME  = mozuconv
 
 CPPSRCS		= \
 		nsUConvModule.cpp \
-		nsCharsetAliasImp.cpp \
 		nsConverterInputStream.cpp \
 		nsConverterOutputStream.cpp \
 		nsTextToSubURI.cpp \
 		nsCharsetConverterManager.cpp \
 		nsUTF8ConverterService.cpp \
 		nsUTF8ToUnicode.cpp \
 		nsUnicodeToUTF8.cpp \
 		nsScriptableUConv.cpp \
-		nsUConvPropertySearch.cpp \
 		$(NULL)
 
 ifndef MOZ_USE_NATIVE_UCONV
 CPPSRCS         += \
 		nsISO88591ToUnicode.cpp \
 		nsCP1252ToUnicode.cpp \
 		nsMacRomanToUnicode.cpp \
 		nsUnicodeToISO88591.cpp \
@@ -88,30 +86,16 @@ ifdef GNU_CC
 nsUTF8ToUnicodeSSE2.$(OBJ_SUFFIX): CXXFLAGS+=-msse2
 endif
 
 ifdef SOLARIS_SUNPRO_CXX
 nsUTF8ToUnicodeSSE2.$(OBJ_SUFFIX): OS_CXXFLAGS += -xarch=sse2 -xO4
 endif
 endif
 
-ifeq ($(MOZ_WIDGET_TOOLKIT),os2)
-CPPSRCS			+= nsOS2Charset.cpp
-else
-ifeq ($(MOZ_WIDGET_TOOLKIT),windows)
-CPPSRCS			+= nsWinCharset.cpp
-else
-ifeq (cocoa,$(MOZ_WIDGET_TOOLKIT))
-CPPSRCS			+= nsMacCharset.cpp
-else
-CPPSRCS			+= nsUNIXCharset.cpp
-endif
-endif
-endif
-
 EXTRA_DSO_LDOPTS = \
 		../util/$(LIB_PREFIX)ucvutil_s.$(LIB_SUFFIX) \
 		$(MOZ_UNICHARUTIL_LIBS) \
 		$(MOZ_NECKO_UTIL_LIBS) \
 		$(MOZ_COMPONENT_LIBS) \
 		$(NULL)
 
 LOCAL_INCLUDES	= -I$(srcdir)/../util
@@ -143,48 +127,8 @@ SHARED_LIBRARY_LIBS += \
 	$(NULL)
 else
 SHARED_LIBRARY_LIBS += \
 	../native/$(LIB_PREFIX)ucnative_s.$(LIB_SUFFIX) \
 	$(NULL)
 endif
 
 include $(topsrcdir)/config/rules.mk
-
-# 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
-
-nsCharsetAliasImp.$(OBJ_SUFFIX): charsetalias.properties.h
-
-nsMacCharset.$(OBJ_SUFFIX): maccharset.properties.h
-
-nsOS2Charset.$(OBJ_SUFFIX): os2charset.properties.h
-
-nsWinCharset.$(OBJ_SUFFIX): wincharset.properties.h
-
-nsUNIXCharset.$(OBJ_SUFFIX): unixcharset.properties.h
-
-charsetalias.properties.h: props2arrays.py charsetalias.properties
-	$(PYTHON) $^ $@
-
-maccharset.properties.h: props2arrays.py maccharset.properties
-	$(PYTHON) $^ $@
-
-os2charset.properties.h: props2arrays.py os2charset.properties
-	$(PYTHON) $^ $@
-
-wincharset.properties.h: props2arrays.py wincharset.properties
-	$(PYTHON) $^ $@
-
-unixcharset.properties.h: props2arrays.py unixcharset.properties
-	$(PYTHON) $^ $@
-
-GARBAGE += \
-	charsetalias.properties.h \
-	maccharset.properties.h \
-	os2charset.properties.h \
-	unixcharset.properties.h \
-	wincharset.properties.h \
-	$(NULL)
--- a/intl/uconv/src/nsScriptableUConv.cpp
+++ b/intl/uconv/src/nsScriptableUConv.cpp
@@ -43,18 +43,16 @@
 #include "nsIServiceManager.h"
 #include "nsICharsetConverterManager.h"
 #include "nsIScriptableUConv.h"
 #include "nsScriptableUConv.h"
 #include "nsIStringStream.h"
 #include "nsCRT.h"
 #include "nsComponentManagerUtils.h"
 
-#include "nsIPlatformCharset.h"
-
 static PRInt32          gInstanceCount = 0;
 
 /* Implementation file */
 NS_IMPL_ISUPPORTS1(nsScriptableUnicodeConverter, nsIScriptableUnicodeConverter)
 
 nsScriptableUnicodeConverter::nsScriptableUnicodeConverter()
 : mIsInternal(PR_FALSE)
 {
--- a/intl/uconv/src/nsUConvModule.cpp
+++ b/intl/uconv/src/nsUConvModule.cpp
@@ -40,32 +40,28 @@
 #include "nsCRT.h"
 #include "mozilla/ModuleUtils.h"
 #include "nsIComponentManager.h"
 #include "nsICategoryManager.h"
 #include "nsICharsetConverterManager.h"
 #include "nsEncoderDecoderUtils.h"
 #include "nsIUnicodeDecoder.h"
 #include "nsIUnicodeEncoder.h"
-#include "nsICharsetAlias.h"
 #include "nsIServiceManager.h"
 
 
 #include "nsUConvCID.h"
 #include "nsCharsetConverterManager.h"
-#include "nsCharsetAlias.h"
 #include "nsTextToSubURI.h"
 #include "nsUTF8ConverterService.h"
 #include "nsConverterInputStream.h"
 #include "nsConverterOutputStream.h"
-#include "nsPlatformCharset.h"
 #include "nsScriptableUConv.h"
 
 #ifndef MOZ_USE_NATIVE_UCONV
-#include "nsIPlatformCharset.h"
 #include "nsITextToSubURI.h"
 
 #include "nsUConvDll.h"
 #include "nsIFile.h"
 
 #include "nsCRT.h"
 
 #include "nsUCSupport.h"
@@ -573,26 +569,22 @@ const PRUint16 g_ufJohabJamoMapping[] ={
 
 NS_GENERIC_FACTORY_CONSTRUCTOR(NativeUConvService)
 
 #endif // #ifndef MOZ_USE_NATIVE_UCONV
 
 NS_GENERIC_FACTORY_CONSTRUCTOR(nsCharsetConverterManager)
 NS_GENERIC_FACTORY_CONSTRUCTOR(nsTextToSubURI)
 NS_GENERIC_FACTORY_CONSTRUCTOR(nsUTF8ConverterService)
-NS_GENERIC_FACTORY_CONSTRUCTOR(nsCharsetAlias2)
 NS_GENERIC_FACTORY_CONSTRUCTOR(nsConverterInputStream)
 NS_GENERIC_FACTORY_CONSTRUCTOR(nsConverterOutputStream)
-NS_GENERIC_FACTORY_CONSTRUCTOR_INIT(nsPlatformCharset, Init)
 NS_GENERIC_FACTORY_CONSTRUCTOR(nsScriptableUnicodeConverter)
 
 NS_DEFINE_NAMED_CID(NS_ICHARSETCONVERTERMANAGER_CID);
-NS_DEFINE_NAMED_CID(NS_CHARSETALIAS_CID);
 NS_DEFINE_NAMED_CID(NS_TEXTTOSUBURI_CID);
-NS_DEFINE_NAMED_CID(NS_PLATFORMCHARSET_CID);
 NS_DEFINE_NAMED_CID(NS_CONVERTERINPUTSTREAM_CID);
 NS_DEFINE_NAMED_CID(NS_CONVERTEROUTPUTSTREAM_CID);
 NS_DEFINE_NAMED_CID(NS_ISCRIPTABLEUNICODECONVERTER_CID);
 #ifdef MOZ_USE_NATIVE_UCONV
 NS_DEFINE_NAMED_CID(NS_NATIVE_UCONV_SERVICE_CID);
 #else
 NS_DEFINE_NAMED_CID(NS_UTF8CONVERTERSERVICE_CID);
 NS_DEFINE_NAMED_CID(NS_ISO88591TOUNICODE_CID);
@@ -779,19 +771,17 @@ NS_DEFINE_NAMED_CID(NS_HZTOUNICODE_CID);
 NS_DEFINE_NAMED_CID(NS_UNICODETOHZ_CID);
 NS_DEFINE_NAMED_CID(NS_GB18030TOUNICODE_CID);
 NS_DEFINE_NAMED_CID(NS_UNICODETOGB18030_CID);
 NS_DEFINE_NAMED_CID(NS_ISO2022CNTOUNICODE_CID);
 #endif
 
 static const mozilla::Module::CIDEntry kUConvCIDs[] = {
   { &kNS_ICHARSETCONVERTERMANAGER_CID, false, NULL, nsCharsetConverterManagerConstructor },
-  { &kNS_CHARSETALIAS_CID, false, NULL, nsCharsetAlias2Constructor },
   { &kNS_TEXTTOSUBURI_CID, false, NULL, nsTextToSubURIConstructor },
-  { &kNS_PLATFORMCHARSET_CID, false, NULL, nsPlatformCharsetConstructor },
   { &kNS_CONVERTERINPUTSTREAM_CID, false, NULL, nsConverterInputStreamConstructor },
   { &kNS_CONVERTEROUTPUTSTREAM_CID, false, NULL, nsConverterOutputStreamConstructor },
   { &kNS_ISCRIPTABLEUNICODECONVERTER_CID, false, NULL, nsScriptableUnicodeConverterConstructor },
 #ifdef MOZ_USE_NATIVE_ICONV
   { &kNS_NATIVE_UCONV_SERVICE_CID, false, NULL, NativeUConvServiceConstructor },
 #else
   { &kNS_UTF8CONVERTERSERVICE_CID, false, NULL, nsUTF8ConverterServiceConstructor },
   { &kNS_ISO88591TOUNICODE_CID, false, NULL, nsISO88591ToUnicodeConstructor },
@@ -980,19 +970,17 @@ static const mozilla::Module::CIDEntry k
   { &kNS_UNICODETOGB18030_CID, false, NULL, nsUnicodeToGB18030Constructor },
   { &kNS_ISO2022CNTOUNICODE_CID, false, NULL, nsISO2022CNToUnicodeConstructor },
 #endif
   { NULL },
 };
 
 static const mozilla::Module::ContractIDEntry kUConvContracts[] = {
   { NS_CHARSETCONVERTERMANAGER_CONTRACTID, &kNS_ICHARSETCONVERTERMANAGER_CID },
-  { NS_CHARSETALIAS_CONTRACTID, &kNS_CHARSETALIAS_CID },
   { NS_ITEXTTOSUBURI_CONTRACTID, &kNS_TEXTTOSUBURI_CID },
-  { NS_PLATFORMCHARSET_CONTRACTID, &kNS_PLATFORMCHARSET_CID },
   { NS_CONVERTERINPUTSTREAM_CONTRACTID, &kNS_CONVERTERINPUTSTREAM_CID },
   { "@mozilla.org/intl/converter-output-stream;1", &kNS_CONVERTEROUTPUTSTREAM_CID },
   { NS_ISCRIPTABLEUNICODECONVERTER_CONTRACTID, &kNS_ISCRIPTABLEUNICODECONVERTER_CID },
 #ifdef MOZ_USE_NATIVE_ICONV
   { NS_NATIVE_UCONV_SERVICE_CONTRACT_ID, &kNS_NATIVE_UCONV_SERVICE_CID },
 #else
   { NS_UTF8CONVERTERSERVICE_CONTRACTID, &kNS_UTF8CONVERTERSERVICE_CID },
   { NS_ISO88591TOUNICODE_CONTRACTID, &kNS_ISO88591TOUNICODE_CID },