Bug 937056 - Remove UTF-7 code from mozilla-central. r=emk.
authorHenri Sivonen <hsivonen@hsivonen.fi>
Tue, 15 Apr 2014 15:58:01 +0300
changeset 180273 a8ba6d771ae750f1179dc130e7b08bdbc83ab906
parent 180272 a922f75bfb1831a1e8bb0f39e667a0e2223a109c
child 180274 134e5c24733ba947a8d82f784095db0d4035c2d4
push id272
push userpvanderbeken@mozilla.com
push dateMon, 05 May 2014 16:31:18 +0000
reviewersemk
bugs937056
milestone31.0a1
Bug 937056 - Remove UTF-7 code from mozilla-central. r=emk.
intl/uconv/public/moz.build
intl/uconv/public/nsUCSupport.h
intl/uconv/src/moz.build
intl/uconv/src/nsUConvModule.cpp
intl/uconv/tests/nsTestUConv.cpp
intl/uconv/tests/unit/test_bug718500.js
intl/uconv/tests/unit/test_decode_utf-7.js
intl/uconv/tests/unit/test_decode_utf-7_internal.js
intl/uconv/tests/unit/test_encode_utf-7.js
intl/uconv/tests/unit/test_encode_utf-7_internal.js
intl/uconv/tests/unit/xpcshell.ini
intl/uconv/ucvlatin/nsMUTF7ToUnicode.cpp
intl/uconv/ucvlatin/nsMUTF7ToUnicode.h
intl/uconv/ucvlatin/nsUCvLatinCID.h
intl/uconv/ucvlatin/nsUTF7ToUnicode.cpp
intl/uconv/ucvlatin/nsUTF7ToUnicode.h
intl/uconv/ucvlatin/nsUnicodeToMUTF7.cpp
intl/uconv/ucvlatin/nsUnicodeToMUTF7.h
intl/uconv/ucvlatin/nsUnicodeToUTF7.cpp
intl/uconv/ucvlatin/nsUnicodeToUTF7.h
intl/uconv/util/nsUCSupport.h
--- a/intl/uconv/public/moz.build
+++ b/intl/uconv/public/moz.build
@@ -4,11 +4,12 @@
 # License, v. 2.0. If a copy of the MPL was not distributed with this
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
 EXPORTS += [
     'nsEncoderDecoderUtils.h',
     'nsIUnicodeDecoder.h',
     'nsIUnicodeEncoder.h',
     'nsUConvCID.h',
+    'nsUCSupport.h',
     'uconvutil.h',
 ]
 
rename from intl/uconv/util/nsUCSupport.h
rename to intl/uconv/public/nsUCSupport.h
--- a/intl/uconv/src/moz.build
+++ b/intl/uconv/src/moz.build
@@ -106,17 +106,16 @@ UNIFIED_SOURCES += [
     '../ucvlatin/nsMacFarsiToUnicode.cpp',
     '../ucvlatin/nsMacGreekToUnicode.cpp',
     '../ucvlatin/nsMacGujaratiToUnicode.cpp',
     '../ucvlatin/nsMacGurmukhiToUnicode.cpp',
     '../ucvlatin/nsMacHebrewToUnicode.cpp',
     '../ucvlatin/nsMacIcelandicToUnicode.cpp',
     '../ucvlatin/nsMacRomanianToUnicode.cpp',
     '../ucvlatin/nsMacTurkishToUnicode.cpp',
-    '../ucvlatin/nsMUTF7ToUnicode.cpp',
     '../ucvlatin/nsT61ToUnicode.cpp',
     '../ucvlatin/nsTCVN5712ToUnicode.cpp',
     '../ucvlatin/nsTIS620ToUnicode.cpp',
     '../ucvlatin/nsUnicodeToARMSCII8.cpp',
     '../ucvlatin/nsUnicodeToAscii.cpp',
     '../ucvlatin/nsUnicodeToCP1250.cpp',
     '../ucvlatin/nsUnicodeToCP1251.cpp',
     '../ucvlatin/nsUnicodeToCP1253.cpp',
@@ -156,28 +155,25 @@ UNIFIED_SOURCES += [
     '../ucvlatin/nsUnicodeToMacFarsi.cpp',
     '../ucvlatin/nsUnicodeToMacGreek.cpp',
     '../ucvlatin/nsUnicodeToMacGujarati.cpp',
     '../ucvlatin/nsUnicodeToMacGurmukhi.cpp',
     '../ucvlatin/nsUnicodeToMacHebrew.cpp',
     '../ucvlatin/nsUnicodeToMacIcelandic.cpp',
     '../ucvlatin/nsUnicodeToMacRomanian.cpp',
     '../ucvlatin/nsUnicodeToMacTurkish.cpp',
-    '../ucvlatin/nsUnicodeToMUTF7.cpp',
     '../ucvlatin/nsUnicodeToT61.cpp',
     '../ucvlatin/nsUnicodeToTCVN5712.cpp',
     '../ucvlatin/nsUnicodeToTIS620.cpp',
     '../ucvlatin/nsUnicodeToUserDefined.cpp',
     '../ucvlatin/nsUnicodeToUTF16.cpp',
-    '../ucvlatin/nsUnicodeToUTF7.cpp',
     '../ucvlatin/nsUnicodeToVISCII.cpp',
     '../ucvlatin/nsUnicodeToVPS.cpp',
     '../ucvlatin/nsUserDefinedToUnicode.cpp',
     '../ucvlatin/nsUTF16ToUnicode.cpp',
-    '../ucvlatin/nsUTF7ToUnicode.cpp',
     '../ucvlatin/nsVISCIIToUnicode.cpp',
     '../ucvlatin/nsVPSToUnicode.cpp',
 ]
 
 UNIFIED_SOURCES += [
     '../ucvtw/nsBIG5HKSCSToUnicode.cpp',
     '../ucvtw/nsBIG5ToUnicode.cpp',
     '../ucvtw/nsUnicodeToBIG5.cpp',
--- a/intl/uconv/src/nsUConvModule.cpp
+++ b/intl/uconv/src/nsUConvModule.cpp
@@ -69,18 +69,16 @@
 #include "nsMacCroatianToUnicode.h"
 #include "nsMacRomanianToUnicode.h"
 #include "nsMacCyrillicToUnicode.h"
 #include "nsMacIcelandicToUnicode.h"
 #include "nsARMSCII8ToUnicode.h"
 #include "nsTCVN5712ToUnicode.h"
 #include "nsVISCIIToUnicode.h"
 #include "nsVPSToUnicode.h"
-#include "nsUTF7ToUnicode.h"
-#include "nsMUTF7ToUnicode.h"
 #include "nsUTF16ToUnicode.h"
 #include "nsT61ToUnicode.h"
 #include "nsUserDefinedToUnicode.h"
 #include "nsUnicodeToAscii.h"
 #include "nsUnicodeToISO88592.h"
 #include "nsUnicodeToISO88593.h"
 #include "nsUnicodeToISO88594.h"
 #include "nsUnicodeToISO88595.h"
@@ -118,18 +116,16 @@
 #include "nsUnicodeToMacCroatian.h"
 #include "nsUnicodeToMacRomanian.h"
 #include "nsUnicodeToMacCyrillic.h"
 #include "nsUnicodeToMacIcelandic.h"
 #include "nsUnicodeToARMSCII8.h"
 #include "nsUnicodeToTCVN5712.h"
 #include "nsUnicodeToVISCII.h"
 #include "nsUnicodeToVPS.h"
-#include "nsUnicodeToUTF7.h"
-#include "nsUnicodeToMUTF7.h"
 #include "nsUnicodeToUTF16.h"
 #include "nsUnicodeToT61.h"
 #include "nsUnicodeToUserDefined.h"
 #include "nsMacArabicToUnicode.h"
 #include "nsMacDevanagariToUnicode.h"
 #include "nsMacFarsiToUnicode.h"
 #include "nsMacGujaratiToUnicode.h"
 #include "nsMacGurmukhiToUnicode.h"
@@ -248,18 +244,16 @@ NS_UCONV_REG_UNREG("x-mac-turkish", NS_M
 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-icelandic", NS_MACICELANDICTOUNICODE_CID, NS_UNICODETOMACICELANDIC_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-16", NS_UTF16TOUNICODE_CID, NS_UNICODETOUTF16_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("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)
@@ -308,23 +302,19 @@ NS_UCONV_REG_UNREG_DECODER("ISO-2022-CN"
   
 NS_CONVERTER_REGISTRY_END
 
 NS_GENERIC_FACTORY_CONSTRUCTOR(nsUnicodeToUTF8)
 NS_GENERIC_FACTORY_CONSTRUCTOR(nsUTF8ToUnicode)
 NS_GENERIC_FACTORY_CONSTRUCTOR(nsReplacementToUnicode)
 
 // ucvlatin
-NS_GENERIC_FACTORY_CONSTRUCTOR(nsUTF7ToUnicode)
-NS_GENERIC_FACTORY_CONSTRUCTOR(nsMUTF7ToUnicode)
 NS_GENERIC_FACTORY_CONSTRUCTOR(nsUTF16ToUnicode)
 NS_GENERIC_FACTORY_CONSTRUCTOR(nsUTF16BEToUnicode)
 NS_GENERIC_FACTORY_CONSTRUCTOR(nsUTF16LEToUnicode)
-NS_GENERIC_FACTORY_CONSTRUCTOR(nsUnicodeToUTF7)
-NS_GENERIC_FACTORY_CONSTRUCTOR(nsUnicodeToMUTF7)
 NS_GENERIC_FACTORY_CONSTRUCTOR(nsUnicodeToUTF16BE)
 NS_GENERIC_FACTORY_CONSTRUCTOR(nsUnicodeToUTF16LE)
 NS_GENERIC_FACTORY_CONSTRUCTOR(nsUnicodeToUTF16)
 
 // ucvibm
 
 // ucvja
 NS_GENERIC_FACTORY_CONSTRUCTOR(nsShiftJISToUnicode)
@@ -525,18 +515,16 @@ NS_DEFINE_NAMED_CID(NS_MACTURKISHTOUNICO
 NS_DEFINE_NAMED_CID(NS_MACCROATIANTOUNICODE_CID);
 NS_DEFINE_NAMED_CID(NS_MACROMANIANTOUNICODE_CID);
 NS_DEFINE_NAMED_CID(NS_MACCYRILLICTOUNICODE_CID);
 NS_DEFINE_NAMED_CID(NS_MACICELANDICTOUNICODE_CID);
 NS_DEFINE_NAMED_CID(NS_ARMSCII8TOUNICODE_CID);
 NS_DEFINE_NAMED_CID(NS_TCVN5712TOUNICODE_CID);
 NS_DEFINE_NAMED_CID(NS_VISCIITOUNICODE_CID);
 NS_DEFINE_NAMED_CID(NS_VPSTOUNICODE_CID);
-NS_DEFINE_NAMED_CID(NS_UTF7TOUNICODE_CID);
-NS_DEFINE_NAMED_CID(NS_MUTF7TOUNICODE_CID);
 NS_DEFINE_NAMED_CID(NS_UTF16TOUNICODE_CID);
 NS_DEFINE_NAMED_CID(NS_UTF16BETOUNICODE_CID);
 NS_DEFINE_NAMED_CID(NS_UTF16LETOUNICODE_CID);
 NS_DEFINE_NAMED_CID(NS_T61TOUNICODE_CID);
 NS_DEFINE_NAMED_CID(NS_USERDEFINEDTOUNICODE_CID);
 NS_DEFINE_NAMED_CID(NS_MACARABICTOUNICODE_CID);
 NS_DEFINE_NAMED_CID(NS_MACDEVANAGARITOUNICODE_CID);
 NS_DEFINE_NAMED_CID(NS_MACFARSITOUNICODE_CID);
@@ -582,18 +570,16 @@ NS_DEFINE_NAMED_CID(NS_UNICODETOMACTURKI
 NS_DEFINE_NAMED_CID(NS_UNICODETOMACCROATIAN_CID);
 NS_DEFINE_NAMED_CID(NS_UNICODETOMACROMANIAN_CID);
 NS_DEFINE_NAMED_CID(NS_UNICODETOMACCYRILLIC_CID);
 NS_DEFINE_NAMED_CID(NS_UNICODETOMACICELANDIC_CID);
 NS_DEFINE_NAMED_CID(NS_UNICODETOARMSCII8_CID);
 NS_DEFINE_NAMED_CID(NS_UNICODETOTCVN5712_CID);
 NS_DEFINE_NAMED_CID(NS_UNICODETOVISCII_CID);
 NS_DEFINE_NAMED_CID(NS_UNICODETOVPS_CID);
-NS_DEFINE_NAMED_CID(NS_UNICODETOUTF7_CID);
-NS_DEFINE_NAMED_CID(NS_UNICODETOMUTF7_CID);
 NS_DEFINE_NAMED_CID(NS_UNICODETOUTF16BE_CID);
 NS_DEFINE_NAMED_CID(NS_UNICODETOUTF16LE_CID);
 NS_DEFINE_NAMED_CID(NS_UNICODETOUTF16_CID);
 NS_DEFINE_NAMED_CID(NS_UNICODETOT61_CID);
 NS_DEFINE_NAMED_CID(NS_UNICODETOUSERDEFINED_CID);
 NS_DEFINE_NAMED_CID(NS_UNICODETOMACARABIC_CID);
 NS_DEFINE_NAMED_CID(NS_UNICODETOMACDEVANAGARI_CID);
 NS_DEFINE_NAMED_CID(NS_UNICODETOMACFARSI_CID);
@@ -696,18 +682,16 @@ static const mozilla::Module::CIDEntry k
   { &kNS_MACCROATIANTOUNICODE_CID, false, nullptr, nsMacCroatianToUnicodeConstructor },
   { &kNS_MACROMANIANTOUNICODE_CID, false, nullptr, nsMacRomanianToUnicodeConstructor },
   { &kNS_MACCYRILLICTOUNICODE_CID, false, nullptr, nsMacCyrillicToUnicodeConstructor },
   { &kNS_MACICELANDICTOUNICODE_CID, false, nullptr, nsMacIcelandicToUnicodeConstructor },
   { &kNS_ARMSCII8TOUNICODE_CID, false, nullptr, nsARMSCII8ToUnicodeConstructor },
   { &kNS_TCVN5712TOUNICODE_CID, false, nullptr, nsTCVN5712ToUnicodeConstructor },
   { &kNS_VISCIITOUNICODE_CID, false, nullptr, nsVISCIIToUnicodeConstructor },
   { &kNS_VPSTOUNICODE_CID, false, nullptr, nsVPSToUnicodeConstructor },
-  { &kNS_UTF7TOUNICODE_CID, false, nullptr, nsUTF7ToUnicodeConstructor },
-  { &kNS_MUTF7TOUNICODE_CID, false, nullptr, nsMUTF7ToUnicodeConstructor },
   { &kNS_UTF16TOUNICODE_CID, false, nullptr, nsUTF16ToUnicodeConstructor },
   { &kNS_UTF16BETOUNICODE_CID, false, nullptr, nsUTF16BEToUnicodeConstructor },
   { &kNS_UTF16LETOUNICODE_CID, false, nullptr, nsUTF16LEToUnicodeConstructor },
   { &kNS_T61TOUNICODE_CID, false, nullptr, nsT61ToUnicodeConstructor },
   { &kNS_USERDEFINEDTOUNICODE_CID, false, nullptr, nsUserDefinedToUnicodeConstructor },
   { &kNS_MACARABICTOUNICODE_CID, false, nullptr, nsMacArabicToUnicodeConstructor },
   { &kNS_MACDEVANAGARITOUNICODE_CID, false, nullptr, nsMacDevanagariToUnicodeConstructor },
   { &kNS_MACFARSITOUNICODE_CID, false, nullptr, nsMacFarsiToUnicodeConstructor },
@@ -753,18 +737,16 @@ static const mozilla::Module::CIDEntry k
   { &kNS_UNICODETOMACCROATIAN_CID, false, nullptr, nsUnicodeToMacCroatianConstructor },
   { &kNS_UNICODETOMACROMANIAN_CID, false, nullptr, nsUnicodeToMacRomanianConstructor },
   { &kNS_UNICODETOMACCYRILLIC_CID, false, nullptr, nsUnicodeToMacCyrillicConstructor },
   { &kNS_UNICODETOMACICELANDIC_CID, false, nullptr, nsUnicodeToMacIcelandicConstructor },
   { &kNS_UNICODETOARMSCII8_CID, false, nullptr, nsUnicodeToARMSCII8Constructor },
   { &kNS_UNICODETOTCVN5712_CID, false, nullptr, nsUnicodeToTCVN5712Constructor },
   { &kNS_UNICODETOVISCII_CID, false, nullptr, nsUnicodeToVISCIIConstructor },
   { &kNS_UNICODETOVPS_CID, false, nullptr, nsUnicodeToVPSConstructor },
-  { &kNS_UNICODETOUTF7_CID, false, nullptr, nsUnicodeToUTF7Constructor },
-  { &kNS_UNICODETOMUTF7_CID, false, nullptr, nsUnicodeToMUTF7Constructor },
   { &kNS_UNICODETOUTF16BE_CID, false, nullptr, nsUnicodeToUTF16BEConstructor },
   { &kNS_UNICODETOUTF16LE_CID, false, nullptr, nsUnicodeToUTF16LEConstructor },
   { &kNS_UNICODETOUTF16_CID, false, nullptr, nsUnicodeToUTF16Constructor },
   { &kNS_UNICODETOT61_CID, false, nullptr, nsUnicodeToT61Constructor },
   { &kNS_UNICODETOUSERDEFINED_CID, false, nullptr, nsUnicodeToUserDefinedConstructor },
   { &kNS_UNICODETOMACARABIC_CID, false, nullptr, nsUnicodeToMacArabicConstructor },
   { &kNS_UNICODETOMACDEVANAGARI_CID, false, nullptr, nsUnicodeToMacDevanagariConstructor },
   { &kNS_UNICODETOMACFARSI_CID, false, nullptr, nsUnicodeToMacFarsiConstructor },
@@ -869,18 +851,16 @@ static const mozilla::Module::ContractID
   { NS_UNICODEDECODER_CONTRACTID_BASE "x-mac-croatian", &kNS_MACCROATIANTOUNICODE_CID },
   { NS_UNICODEDECODER_CONTRACTID_BASE "x-mac-romanian", &kNS_MACROMANIANTOUNICODE_CID },
   { NS_UNICODEDECODER_CONTRACTID_BASE "x-mac-cyrillic", &kNS_MACCYRILLICTOUNICODE_CID },
   { NS_UNICODEDECODER_CONTRACTID_BASE "x-mac-icelandic", &kNS_MACICELANDICTOUNICODE_CID },
   { NS_UNICODEDECODER_CONTRACTID_BASE "armscii-8", &kNS_ARMSCII8TOUNICODE_CID },
   { NS_UNICODEDECODER_CONTRACTID_BASE "x-viet-tcvn5712", &kNS_TCVN5712TOUNICODE_CID },
   { NS_UNICODEDECODER_CONTRACTID_BASE "VISCII", &kNS_VISCIITOUNICODE_CID },
   { NS_UNICODEDECODER_CONTRACTID_BASE "x-viet-vps", &kNS_VPSTOUNICODE_CID },
-  { NS_UNICODEDECODER_CONTRACTID_BASE "UTF-7", &kNS_UTF7TOUNICODE_CID },
-  { NS_UNICODEDECODER_CONTRACTID_BASE "x-imap4-modified-utf7", &kNS_MUTF7TOUNICODE_CID },
   { NS_UNICODEDECODER_CONTRACTID_BASE "UTF-16", &kNS_UTF16TOUNICODE_CID },
   { NS_UNICODEDECODER_CONTRACTID_BASE "UTF-16BE", &kNS_UTF16BETOUNICODE_CID },
   { NS_UNICODEDECODER_CONTRACTID_BASE "UTF-16LE", &kNS_UTF16LETOUNICODE_CID },
   { NS_UNICODEDECODER_CONTRACTID_BASE "T.61-8bit", &kNS_T61TOUNICODE_CID },
   { NS_UNICODEDECODER_CONTRACTID_BASE "x-user-defined", &kNS_USERDEFINEDTOUNICODE_CID },
   { NS_UNICODEDECODER_CONTRACTID_BASE "x-mac-arabic", &kNS_MACARABICTOUNICODE_CID },
   { NS_UNICODEDECODER_CONTRACTID_BASE "x-mac-devanagari", &kNS_MACDEVANAGARITOUNICODE_CID },
   { NS_UNICODEDECODER_CONTRACTID_BASE "x-mac-farsi", &kNS_MACFARSITOUNICODE_CID },
@@ -926,18 +906,16 @@ static const mozilla::Module::ContractID
   { NS_UNICODEENCODER_CONTRACTID_BASE "x-mac-croatian", &kNS_UNICODETOMACCROATIAN_CID },
   { NS_UNICODEENCODER_CONTRACTID_BASE "x-mac-romanian", &kNS_UNICODETOMACROMANIAN_CID },
   { NS_UNICODEENCODER_CONTRACTID_BASE "x-mac-cyrillic", &kNS_UNICODETOMACCYRILLIC_CID },
   { NS_UNICODEENCODER_CONTRACTID_BASE "x-mac-icelandic", &kNS_UNICODETOMACICELANDIC_CID },
   { NS_UNICODEENCODER_CONTRACTID_BASE "armscii-8", &kNS_UNICODETOARMSCII8_CID },
   { NS_UNICODEENCODER_CONTRACTID_BASE "x-viet-tcvn5712", &kNS_UNICODETOTCVN5712_CID },
   { NS_UNICODEENCODER_CONTRACTID_BASE "VISCII", &kNS_UNICODETOVISCII_CID },
   { NS_UNICODEENCODER_CONTRACTID_BASE "x-viet-vps", &kNS_UNICODETOVPS_CID },
-  { NS_UNICODEENCODER_CONTRACTID_BASE "UTF-7", &kNS_UNICODETOUTF7_CID },
-  { NS_UNICODEENCODER_CONTRACTID_BASE "x-imap4-modified-utf7", &kNS_UNICODETOMUTF7_CID },
   { NS_UNICODEENCODER_CONTRACTID_BASE "UTF-16BE", &kNS_UNICODETOUTF16BE_CID },
   { NS_UNICODEENCODER_CONTRACTID_BASE "UTF-16LE", &kNS_UNICODETOUTF16LE_CID },
   { NS_UNICODEENCODER_CONTRACTID_BASE "UTF-16", &kNS_UNICODETOUTF16_CID },
   { NS_UNICODEENCODER_CONTRACTID_BASE "T.61-8bit", &kNS_UNICODETOT61_CID },
   { NS_UNICODEENCODER_CONTRACTID_BASE "x-user-defined", &kNS_UNICODETOUSERDEFINED_CID },
   { NS_UNICODEENCODER_CONTRACTID_BASE "x-mac-arabic", &kNS_UNICODETOMACARABIC_CID },
   { NS_UNICODEENCODER_CONTRACTID_BASE "x-mac-devanagari", &kNS_UNICODETOMACDEVANAGARI_CID },
   { NS_UNICODEENCODER_CONTRACTID_BASE "x-mac-farsi", &kNS_UNICODETOMACFARSI_CID },
--- a/intl/uconv/tests/nsTestUConv.cpp
+++ b/intl/uconv/tests/nsTestUConv.cpp
@@ -702,88 +702,16 @@ nsresult testUTF8Decoder()
   if (NS_FAILED(res)) {
     return res;
   } else {
     printf("Test Passed.\n");
     return NS_OK;
   }
 }
 
-/**
- * Test the M-UTF-7 decoder.
- */
-nsresult testMUTF7Decoder()
-{
-  char * testName = "T107";
-  printf("\n[%s] Unicode <- MUTF7\n", testName);
-
-  // create converter
-  CREATE_DECODER("x-imap4-modified-utf7");
-
-  // test data
-  char src[] = {"\x50\x51\x52\x53&AAAAAAAA-&-&AAA-"};
-  char16_t exp[] = {0x0050,0x0051,0x0052,0x0053,0x0000,0x0000,0x0000,'&',0x0000};
-
-  // test converter - normal operation
-  res = testDecoder(dec, src, ARRAY_SIZE(src)-1, exp, ARRAY_SIZE(exp), testName);
-
-  // reset converter
-  if (NS_SUCCEEDED(res)) res = resetDecoder(dec, testName);
-
-  // test converter - stress test
-  if (NS_SUCCEEDED(res)) 
-    res = testStressDecoder(dec, src, ARRAY_SIZE(src)-1, exp, ARRAY_SIZE(exp), testName);
-
-  // release converter
-  NS_RELEASE(dec);
-
-  if (NS_FAILED(res)) {
-    return res;
-  } else {
-    printf("Test Passed.\n");
-    return NS_OK;
-  }
-}
-
-/**
- * Test the UTF-7 decoder.
- */
-nsresult testUTF7Decoder()
-{
-  char * testName = "T108";
-  printf("\n[%s] Unicode <- UTF7\n", testName);
-
-  // create converter
-  CREATE_DECODER("utf-7");
-
-  // test data
-  char src[] = {"+ADwAIQ-DOC"};
-  char16_t exp[] = {'<','!','D','O','C'};
-
-  // test converter - normal operation
-  res = testDecoder(dec, src, ARRAY_SIZE(src)-1, exp, ARRAY_SIZE(exp), testName);
-
-  // reset converter
-  if (NS_SUCCEEDED(res)) res = resetDecoder(dec, testName);
-
-  // test converter - stress test
-  if (NS_SUCCEEDED(res)) 
-    res = testStressDecoder(dec, src, ARRAY_SIZE(src)-1, exp, ARRAY_SIZE(exp), testName);
-
-  // release converter
-  NS_RELEASE(dec);
-
-  if (NS_FAILED(res)) {
-    return res;
-  } else {
-    printf("Test Passed.\n");
-    return NS_OK;
-  }
-}
-
 //----------------------------------------------------------------------
 // Encoders testing functions
 
 /**
  * Test the Latin1 encoder.
  */
 nsresult testLatin1Encoder()
 {
@@ -937,90 +865,16 @@ nsresult testISO2022JPEncoder()
   if (NS_FAILED(res)) {
     return res;
   } else {
     printf("Test Passed.\n");
     return NS_OK;
   }
 }
 
-/**
- * Test the M-UTF-7 encoder.
- */
-nsresult testMUTF7Encoder()
-{
-  char * testName = "T205";
-  printf("\n[%s] Unicode -> MUTF-7\n", testName);
-
-  // create converter
-  CREATE_ENCODER("x-imap4-modified-utf7");
-  enc->SetOutputErrorBehavior(enc->kOnError_Replace, nullptr, 0x00cc);
-
-  // test data
-  char16_t src[] = {0x0050,0x0051,0x0052,0x0053,0x0000,0x0000,0x0000,'&',0x0000};
-  char exp[] = {"\x50\x51\x52\x53&AAAAAAAA-&-&AAA-"};
-
-  // test converter - easy test
-  res = testEncoder(enc, src, ARRAY_SIZE(src), exp, ARRAY_SIZE(exp)-1, testName);
-
-  // reset converter
-  if (NS_SUCCEEDED(res)) res = resetEncoder(enc, testName);
-
-  // test converter - stress test
-  if (NS_SUCCEEDED(res)) 
-    res = testStressEncoder(enc, src, ARRAY_SIZE(src), exp, ARRAY_SIZE(exp)-1, testName);
-
-  // release converter
-  NS_RELEASE(enc);
-
-  if (NS_FAILED(res)) {
-    return res;
-  } else {
-    printf("Test Passed.\n");
-    return NS_OK;
-  }
-}
-
-/**
- * Test the UTF-7 encoder.
- */
-nsresult testUTF7Encoder()
-{
-  char * testName = "T206";
-  printf("\n[%s] Unicode -> UTF-7\n", testName);
-
-  // create converter
-  CREATE_ENCODER("utf-7");
-  enc->SetOutputErrorBehavior(enc->kOnError_Replace, nullptr, 0x00cc);
-
-  // test data
-  char16_t src[] = {'e','t','i','r','a',0x0a};
-  char exp[] = {"etira\x0a"};
-
-  // test converter - easy test
-  res = testEncoder(enc, src, ARRAY_SIZE(src), exp, ARRAY_SIZE(exp)-1, testName);
-
-  // reset converter
-  if (NS_SUCCEEDED(res)) res = resetEncoder(enc, testName);
-
-  // test converter - stress test
-  if (NS_SUCCEEDED(res)) 
-    res = testStressEncoder(enc, src, ARRAY_SIZE(src), exp, ARRAY_SIZE(exp)-1, testName);
-
-  // release converter
-  NS_RELEASE(enc);
-
-  if (NS_FAILED(res)) {
-    return res;
-  } else {
-    printf("Test Passed.\n");
-    return NS_OK;
-  }
-}
-
 nsresult  testPlatformCharset()
 {
   nsIPlatformCharset *cinfo;
   nsresult res = CallGetService(kPlatformCharsetCID, &cinfo);
   if (NS_FAILED(res)) {
     printf("ERROR at GetService() code=0x%x.\n",res);
     return res;
   }
--- a/intl/uconv/tests/unit/test_bug718500.js
+++ b/intl/uconv/tests/unit/test_bug718500.js
@@ -54,18 +54,16 @@ var encoderList = [
   "x-mac-croatian",
   "x-mac-romanian",
   "x-mac-cyrillic",
   "x-mac-icelandic",
   "armscii-8",
   "x-viet-tcvn5712",
   "VISCII",
   "x-viet-vps",
-  "UTF-7",
-  "x-imap4-modified-utf7",
   "UTF-16",
   "UTF-16BE",
   "UTF-16LE",
   "T.61-8bit",
   "x-user-defined",
   "x-mac-arabic",
   "x-mac-devanagari",
   "x-mac-farsi",
@@ -140,18 +138,16 @@ var decoderList = [
   "x-mac-croatian",
   "x-mac-romanian",
   "x-mac-cyrillic",
   "x-mac-icelandic",
   "armscii-8",
   "x-viet-tcvn5712",
   "VISCII",
   "x-viet-vps",
-  "UTF-7",
-  "x-imap4-modified-utf7",
   "UTF-16",
   "UTF-16BE",
   "UTF-16LE",
   "T.61-8bit",
   "x-user-defined",
   "x-mac-arabic",
   "x-mac-devanagari",
   "x-mac-farsi",
deleted file mode 100644
--- a/intl/uconv/tests/unit/test_decode_utf-7.js
+++ /dev/null
@@ -1,14 +0,0 @@
-// Tests conversion from UTF-7 to Unicode. The conversion should fail!
-
-load('CharsetConversionTests.js');
-	
-const inString = "+LGI--+ITIipSIp- +AocCeQ-oddns +Ad0CjQ- s+ATECZQKH- p+AlAB3QJ5- u+AlACVA- no+Ao4- +Al8-I";
-    
-const expectedString = "+LGI--+ITIipSIp- +AocCeQ-oddns +Ad0CjQ- s+ATECZQKH- p+AlAB3QJ5- u+AlACVA- no+Ao4- +Al8-I";
-
-const aliases = [ "UTF-7", "utf-7", "x-unicode-2-0-utf-7", "unicode-2-0-utf-7",
-		  "unicode-1-1-utf-7", "csunicode11utf7" ];
-
-function run_test() {
-  testDecodeAliases();
-}
deleted file mode 100644
--- a/intl/uconv/tests/unit/test_decode_utf-7_internal.js
+++ /dev/null
@@ -1,14 +0,0 @@
-// Tests conversion from UTF-7 to Unicode.
-
-load('CharsetConversionTests.js');
-	
-const inString = "+LGI--+ITIipSIp- +AocCeQ-oddns +Ad0CjQ- s+ATECZQKH- p+AlAB3QJ5- u+AlACVA- no+Ao4- +Al8-I";
-    
-const expectedString = "\u2C62-\u2132\u22A5\u2229 \u0287\u0279oddns \u01DD\u028D s\u0131\u0265\u0287 p\u0250\u01DD\u0279 u\u0250\u0254 no\u028E \u025FI";
-
-const aliases = [ "UTF-7", "utf-7", "x-unicode-2-0-utf-7", "unicode-2-0-utf-7",
-		  "unicode-1-1-utf-7", "csunicode11utf7" ];
-
-function run_test() {
-  testDecodeAliasesInternal();
-}
deleted file mode 100644
--- a/intl/uconv/tests/unit/test_encode_utf-7.js
+++ /dev/null
@@ -1,14 +0,0 @@
-// Tests conversion from Unicode to UTF-7. The conversion should fail!
-
-load('CharsetConversionTests.js');
-	
-const inString = "\u2C62-\u2132\u22A5\u2229 \u0287\u0279oddns \u01DD\u028D s\u0131\u0265\u0287 p\u0250\u01DD\u0279 u\u0250\u0254 no\u028E \u025FI";
-    
-const expectedString = "?-??? ??oddns ?? s??? p??? u?? no? ?I";
-
-const aliases = [ "UTF-7", "utf-7", "x-unicode-2-0-utf-7", "unicode-2-0-utf-7",
-		  "unicode-1-1-utf-7", "csunicode11utf7" ];
-
-function run_test() {
-  testEncodeAliases();
-}
deleted file mode 100644
--- a/intl/uconv/tests/unit/test_encode_utf-7_internal.js
+++ /dev/null
@@ -1,14 +0,0 @@
-// Tests conversion from Unicode to UTF-7.
-
-load('CharsetConversionTests.js');
-	
-const inString = "\u2C62-\u2132\u22A5\u2229 \u0287\u0279oddns \u01DD\u028D s\u0131\u0265\u0287 p\u0250\u01DD\u0279 u\u0250\u0254 no\u028E \u025FI";
-    
-const expectedString = "+LGI--+ITIipSIp- +AocCeQ-oddns +Ad0CjQ- s+ATECZQKH- p+AlAB3QJ5- u+AlACVA- no+Ao4- +Al8-I";
-
-const aliases = [ "UTF-7", "utf-7", "x-unicode-2-0-utf-7", "unicode-2-0-utf-7",
-		  "unicode-1-1-utf-7", "csunicode11utf7" ];
-
-function run_test() {
-  testEncodeAliasesInternal();
-}
--- a/intl/uconv/tests/unit/xpcshell.ini
+++ b/intl/uconv/tests/unit/xpcshell.ini
@@ -71,18 +71,16 @@ support-files =
 [test_decode_CP862.js]
 [test_decode_CP864.js]
 [test_decode_CP874.js]
 [test_decode_EUCKR_Hangul.js]
 [test_decode_armscii.js]
 [test_decode_gb18030.js]
 [test_decode_gbk.js]
 [test_decode_tcvn5712.js]
-[test_decode_utf-7_internal.js]
-[test_decode_utf-7.js]
 [test_decode_viscii.js]
 [test_decode_vps.js]
 [test_decode_x_mac_arabic.js]
 [test_decode_x_mac_arabic_internal.js]
 [test_decode_x_mac_ce.js]
 [test_decode_x_mac_croatian.js]
 [test_decode_x_mac_cyrillic.js]
 [test_decode_x_mac_devanagari.js]
@@ -126,18 +124,16 @@ support-files =
 [test_encode_CP855.js]
 [test_encode_CP857.js]
 [test_encode_CP862.js]
 [test_encode_CP864.js]
 [test_encode_CP874.js]
 [test_encode_armscii.js]
 [test_encode_gbk.js]
 [test_encode_tcvn5712.js]
-[test_encode_utf-7_internal.js]
-[test_encode_utf-7.js]
 [test_encode_viscii.js]
 [test_encode_vps.js]
 [test_encode_x_mac_arabic.js]
 [test_encode_x_mac_arabic_internal.js]
 [test_encode_x_mac_ce.js]
 [test_encode_x_mac_croatian.js]
 [test_encode_x_mac_cyrillic.js]
 [test_encode_x_mac_devanagari.js]
deleted file mode 100644
--- a/intl/uconv/ucvlatin/nsMUTF7ToUnicode.cpp
+++ /dev/null
@@ -1,14 +0,0 @@
-/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-#include "nsMUTF7ToUnicode.h"
-
-//----------------------------------------------------------------------
-// Class nsMUTF7ToUnicode [implementation]
-
-nsMUTF7ToUnicode::nsMUTF7ToUnicode() 
-: nsBasicUTF7Decoder(',', '&')
-{
-}
deleted file mode 100644
--- a/intl/uconv/ucvlatin/nsMUTF7ToUnicode.h
+++ /dev/null
@@ -1,31 +0,0 @@
-/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-#ifndef nsMUTF7ToUnicode_h___
-#define nsMUTF7ToUnicode_h___
-
-#include "nsUTF7ToUnicode.h"
-
-//----------------------------------------------------------------------
-// Class nsMUTF7ToUnicode [declaration]
-
-/**
- * A character set converter from Modified UTF7 to Unicode.
- *
- * @created         18/May/1999
- * @author  Catalin Rotaru [CATA]
- */
-class nsMUTF7ToUnicode : public nsBasicUTF7Decoder 
-{
-public:
-
-  /**
-   * Class constructor.
-   */
-  nsMUTF7ToUnicode();
-
-};
-
-#endif /* nsMUTF7ToUnicode_h___ */
--- a/intl/uconv/ucvlatin/nsUCvLatinCID.h
+++ b/intl/uconv/ucvlatin/nsUCvLatinCID.h
@@ -184,26 +184,16 @@
 #define NS_VISCIITOUNICODE_CID \
   { 0x6394eeae, 0xfc3d, 0x11d2, {0xb3, 0xb8, 0x0, 0x80, 0x5f, 0x8a, 0x66, 0x70}}
 
 // Class ID for our VPSToUnicode charset converter
 // {6394EEB0-FC3D-11d2-B3B8-00805F8A6670}
 #define NS_VPSTOUNICODE_CID \
   { 0x6394eeb0, 0xfc3d, 0x11d2, {0xb3, 0xb8, 0x0, 0x80, 0x5f, 0x8a, 0x66, 0x70}}
 
-// Class ID for our UTF7ToUnicode charset converter
-// {77CFAAF1-1CF4-11d3-8AAF-00600811A836}
-#define NS_UTF7TOUNICODE_CID \
-  { 0x77cfaaf1, 0x1cf4, 0x11d3, {0x8a, 0xaf, 0x0, 0x60, 0x8, 0x11, 0xa8, 0x36}}
-
-// Class ID for our MUTF7ToUnicode charset converter
-// {B57F97C1-0D70-11d3-8AAE-00600811A836}
-#define NS_MUTF7TOUNICODE_CID \
-  { 0xb57f97c1, 0xd70, 0x11d3, {0x8a, 0xae, 0x0, 0x60, 0x8, 0x11, 0xa8, 0x36}}
-
 // Class ID for our UnicodeToISO88592 charset converter
 // {7B8556A6-EC79-11d2-8AAC-00600811A836}
 #define NS_UNICODETOISO88592_CID \
   { 0x7b8556a6, 0xec79, 0x11d2, {0x8a, 0xac, 0x0, 0x60, 0x8, 0x11, 0xa8, 0x36}}
 
 // Class ID for our UnicodeToISO88593 charset converter
 // {660D8CA5-F763-11d2-8AAD-00600811A836}
 #define NS_UNICODETOISO88593_CID \
@@ -375,26 +365,16 @@
 #define NS_UNICODETOVISCII_CID \
   { 0x6394eebf, 0xfc3d, 0x11d2, {0xb3, 0xb8, 0x0, 0x80, 0x5f, 0x8a, 0x66, 0x70}}
 
 // Class ID for our UnicodeToVPS charset converter
 // {6394EEC0-FC3D-11d2-B3B8-00805F8A6670}
 #define NS_UNICODETOVPS_CID \
   { 0x6394eec0, 0xfc3d, 0x11d2, {0xb3, 0xb8, 0x0, 0x80, 0x5f, 0x8a, 0x66, 0x70}}
 
-// Class ID for our UnicodeToUTF7 charset converter
-// {77CFAAF2-1CF4-11d3-8AAF-00600811A836}
-#define NS_UNICODETOUTF7_CID \
-  { 0x77cfaaf2, 0x1cf4, 0x11d3, {0x8a, 0xaf, 0x0, 0x60, 0x8, 0x11, 0xa8, 0x36}}
-
-// Class ID for our UnicodeToMUTF7 charset converter
-// {B57F97C2-0D70-11d3-8AAE-00600811A836}
-#define NS_UNICODETOMUTF7_CID \
-  { 0xb57f97c2, 0xd70, 0x11d3, {0x8a, 0xae, 0x0, 0x60, 0x8, 0x11, 0xa8, 0x36}}
-
 // Class ID for our CP1255ToUnicode charset converter
 // {BA6151A1-1DFA-11d3-B3BF-00805F8A6670}
 #define NS_CP1255TOUNICODE_CID \
   { 0xba6151a1, 0x1dfa, 0x11d3, {0xb3, 0xbf, 0x0, 0x80, 0x5f, 0x8a, 0x66, 0x70}}
 
 // Class ID for our CP1256ToUnicode charset converter
 // {BA6151A2-1DFA-11d3-B3BF-00805F8A6670}
 #define NS_CP1256TOUNICODE_CID \
deleted file mode 100644
--- a/intl/uconv/ucvlatin/nsUTF7ToUnicode.cpp
+++ /dev/null
@@ -1,228 +0,0 @@
-/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-#include "nsUTF7ToUnicode.h"
-
-#define ENC_DIRECT      0
-#define ENC_BASE64      1
-
-//----------------------------------------------------------------------
-// Class nsBasicUTF7Decoder [implementation]
-
-nsBasicUTF7Decoder::nsBasicUTF7Decoder(char aLastChar, char aEscChar) 
-: nsBufferDecoderSupport(1)
-{
-  mLastChar = aLastChar;
-  mEscChar = aEscChar;
-  Reset();
-}
-
-nsresult nsBasicUTF7Decoder::DecodeDirect(
-                             const char * aSrc, 
-                             int32_t * aSrcLength, 
-                             char16_t * aDest, 
-                             int32_t * aDestLength)
-{
-  const char * srcEnd = aSrc + *aSrcLength;
-  const char * src = aSrc;
-  char16_t * destEnd = aDest + *aDestLength;
-  char16_t * dest = aDest;
-  nsresult res = NS_OK;
-  char ch;
-
-  while (src < srcEnd) {
-    ch = *src;
-
-    // stop when we meet other chars or end of direct encoded seq.
-    // if (!(DirectEncodable(ch)) || (ch == mEscChar)) {
-    // but we are decoding; so we should be lax; pass everything until escchar
-    if (ch == mEscChar) {
-      res = NS_ERROR_UDEC_ILLEGALINPUT;
-      break;
-    }
-
-    if (dest >= destEnd) {
-      res = NS_OK_UDEC_MOREOUTPUT;
-      break;
-    } else {
-      *dest++ = ch;
-      src++;
-    }
-  }
-
-  *aSrcLength = src - aSrc;
-  *aDestLength = dest - aDest;
-  return res;
-}
-
-nsresult nsBasicUTF7Decoder::DecodeBase64(
-                             const char * aSrc, 
-                             int32_t * aSrcLength, 
-                             char16_t * aDest, 
-                             int32_t * aDestLength)
-{
-  const char * srcEnd = aSrc + *aSrcLength;
-  const char * src = aSrc;
-  char16_t * destEnd = aDest + *aDestLength;
-  char16_t * dest = aDest;
-  nsresult res = NS_OK;
-  char ch;
-  uint32_t value;
-
-  while (src < srcEnd) {
-    ch = *src;
-
-    // stop when we meet other chars or end of direct encoded seq.
-    value = CharToValue(ch);
-    if (value > 0xff) {
-      res = NS_ERROR_UDEC_ILLEGALINPUT;
-      break;
-    }
-
-    switch (mEncStep) {
-      case 0:
-        mEncBits = value << 10;
-        break;
-      case 1:
-        mEncBits += value << 4;
-        break;
-      case 2:
-        if (dest >= destEnd) {
-          res = NS_OK_UDEC_MOREOUTPUT;
-          break;
-        }
-        mEncBits += value >> 2;
-        *(dest++) = (char16_t) mEncBits;
-        mEncBits = (value & 0x03) << 14;
-        break;
-      case 3:
-        mEncBits += value << 8;
-        break;
-      case 4:
-        mEncBits += value << 2;
-        break;
-      case 5:
-        if (dest >= destEnd) {
-          res = NS_OK_UDEC_MOREOUTPUT;
-          break;
-        }
-        mEncBits += value >> 4;
-        *(dest++) = (char16_t) mEncBits;
-        mEncBits = (value & 0x0f) << 12;
-        break;
-      case 6:
-        mEncBits += value << 6;
-        break;
-      case 7:
-        if (dest >= destEnd) {
-          res = NS_OK_UDEC_MOREOUTPUT;
-          break;
-        }
-        mEncBits += value;
-        *(dest++) = (char16_t) mEncBits;
-        mEncBits = 0;
-        break;
-    }
-
-    if (res != NS_OK) break;
-
-    src++;
-    (++mEncStep)%=8;
-  }
-
-  *aSrcLength = src - aSrc;
-  *aDestLength = dest - aDest;
-  return res;
-}
-
-uint32_t nsBasicUTF7Decoder::CharToValue(char aChar) {
-  if ((aChar>='A')&&(aChar<='Z'))
-    return (uint8_t)(aChar-'A');
-  else if ((aChar>='a')&&(aChar<='z'))
-    return (uint8_t)(26+aChar-'a');
-  else if ((aChar>='0')&&(aChar<='9'))
-    return (uint8_t)(26+26+aChar-'0');
-  else if (aChar=='+')
-    return (uint8_t)(26+26+10);
-  else if (aChar==mLastChar)
-    return (uint8_t)(26+26+10+1);
-  else
-    return 0xffff;
-}
-
-//----------------------------------------------------------------------
-// Subclassing of nsBufferDecoderSupport class [implementation]
-
-NS_IMETHODIMP nsBasicUTF7Decoder::ConvertNoBuff(const char * aSrc, 
-                                                int32_t * aSrcLength, 
-                                                char16_t * aDest, 
-                                                int32_t * aDestLength)
-{
-  const char * srcEnd = aSrc + *aSrcLength;
-  const char * src = aSrc;
-  char16_t * destEnd = aDest + *aDestLength;
-  char16_t * dest = aDest;
-  int32_t bcr,bcw;
-  nsresult res = NS_OK;
-
-  while (src < srcEnd) {
-
-    // fist, attept to decode in the current mode
-    bcr = srcEnd - src;
-    bcw = destEnd - dest;
-    if (mEncoding == ENC_DIRECT) 
-      res = DecodeDirect(src, &bcr, dest, &bcw);
-    else if ((mFreshBase64) && (*src == '-')) {
-      *dest = mEscChar;
-      bcr = 0;
-      bcw = 1;
-      res = NS_ERROR_UDEC_ILLEGALINPUT;
-    } else {
-      mFreshBase64 = false;
-      res = DecodeBase64(src, &bcr, dest, &bcw);
-    }
-    src += bcr;
-    dest += bcw;
-
-    // if an illegal char was encountered, test if it is an escape seq.
-    if (res == NS_ERROR_UDEC_ILLEGALINPUT) {
-      if (mEncoding == ENC_DIRECT) {
-        if (*src == mEscChar) {
-          mEncoding = ENC_BASE64;
-          mFreshBase64 = true;
-          mEncBits = 0;
-          mEncStep = 0;
-          src++;
-          res = NS_OK;
-        } else break;
-      } else {
-        mEncoding = ENC_DIRECT;
-        res = NS_OK;
-        // absorbe end of escape sequence
-        if (*src == '-') src++;
-      }
-    } else if (res != NS_OK) break;
-  }
-
-  *aSrcLength = src - aSrc;
-  *aDestLength = dest - aDest;
-  return res;
-}
-
-NS_IMETHODIMP nsBasicUTF7Decoder::Reset()
-{
-  mEncoding = ENC_DIRECT;
-  mEncBits = 0;
-  mEncStep = 0;
-  return nsBufferDecoderSupport::Reset();
-}
-
-//----------------------------------------------------------------------
-// Class nsUTF7ToUnicode [implementation]
-
-nsUTF7ToUnicode::nsUTF7ToUnicode() 
-: nsBasicUTF7Decoder('/', '+')
-{
-}
deleted file mode 100644
--- a/intl/uconv/ucvlatin/nsUTF7ToUnicode.h
+++ /dev/null
@@ -1,72 +0,0 @@
-/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-#ifndef nsUTF7ToUnicode_h___
-#define nsUTF7ToUnicode_h___
-
-#include "nsUCSupport.h"
-
-//----------------------------------------------------------------------
-// Class nsBasicUTF7Decoder [declaration]
-
-/**
- * Basic class for a character set converter from UTF-7 to Unicode.
- *
- * @created         03/Jun/1999
- * @author  Catalin Rotaru [CATA]
- */
-class nsBasicUTF7Decoder : public nsBufferDecoderSupport
-{
-public:
-
-  /**
-   * Class constructor.
-   */
-  nsBasicUTF7Decoder(char aLastChar, char aEscChar);
-
-protected:
-
-  int32_t                   mEncoding;      // current encoding
-  uint32_t                  mEncBits;
-  int32_t                   mEncStep;
-  char                      mLastChar;
-  char                      mEscChar;
-  bool                      mFreshBase64;
-
-  nsresult DecodeDirect(const char * aSrc, int32_t * aSrcLength, 
-      char16_t * aDest, int32_t * aDestLength);
-  nsresult DecodeBase64(const char * aSrc, int32_t * aSrcLength, 
-      char16_t * aDest, int32_t * aDestLength);
-  uint32_t CharToValue(char aChar);
-
-  //--------------------------------------------------------------------
-  // Subclassing of nsBufferDecoderSupport class [declaration]
-
-  NS_IMETHOD ConvertNoBuff(const char * aSrc, int32_t * aSrcLength, 
-      char16_t * aDest, int32_t * aDestLength);
-  NS_IMETHOD Reset();
-};
-
-//----------------------------------------------------------------------
-// Class nsUTF7ToUnicode [declaration]
-
-/**
- * A character set converter from Modified UTF7 to Unicode.
- *
- * @created         18/May/1999
- * @author  Catalin Rotaru [CATA]
- */
-class nsUTF7ToUnicode : public nsBasicUTF7Decoder 
-{
-public:
-
-  /**
-   * Class constructor.
-   */
-  nsUTF7ToUnicode();
-
-};
-
-#endif /* nsUTF7ToUnicode_h___ */
deleted file mode 100644
--- a/intl/uconv/ucvlatin/nsUnicodeToMUTF7.cpp
+++ /dev/null
@@ -1,14 +0,0 @@
-/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-#include "nsUnicodeToMUTF7.h"
-
-//----------------------------------------------------------------------
-// Class nsUnicodeToMUTF7 [implementation]
-
-nsUnicodeToMUTF7::nsUnicodeToMUTF7() 
-: nsBasicUTF7Encoder(',', '&')
-{
-}
deleted file mode 100644
--- a/intl/uconv/ucvlatin/nsUnicodeToMUTF7.h
+++ /dev/null
@@ -1,31 +0,0 @@
-/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-#ifndef nsUnicodeToMUTF7_h___
-#define nsUnicodeToMUTF7_h___
-
-#include "nsUnicodeToUTF7.h"
-
-//----------------------------------------------------------------------
-// Class nsUnicodeToMUTF7 [declaration]
-
-/**
- * A character set converter from Unicode to Modified UTF-7.
- *
- * @created         18/May/1999
- * @author  Catalin Rotaru [CATA]
- */
-class nsUnicodeToMUTF7 : public nsBasicUTF7Encoder
-{
-public:
-
-  /**
-   * Class constructor.
-   */
-  nsUnicodeToMUTF7();
-
-};
-
-#endif /* nsUnicodeToMUTF7_h___ */
deleted file mode 100644
--- a/intl/uconv/ucvlatin/nsUnicodeToUTF7.cpp
+++ /dev/null
@@ -1,298 +0,0 @@
-/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-#include "nsUnicodeToUTF7.h"
-#include <string.h>
-
-//----------------------------------------------------------------------
-// Global functions and data [declaration]
-
-#define ENC_DIRECT      0
-#define ENC_BASE64      1
-
-//----------------------------------------------------------------------
-// Class nsBasicUTF7Encoder [implementation]
-
-nsBasicUTF7Encoder::nsBasicUTF7Encoder(char aLastChar, char aEscChar) 
-: nsEncoderSupport(5)
-{
-  mLastChar = aLastChar;
-  mEscChar = aEscChar;
-  Reset();
-}
-
-nsresult nsBasicUTF7Encoder::ShiftEncoding(int32_t aEncoding,
-                                          char * aDest, 
-                                          int32_t * aDestLength)
-{
-  if (aEncoding == mEncoding) {
-    *aDestLength = 0;
-    return NS_OK;
-  } 
-
-  nsresult res = NS_OK;
-  char * dest = aDest;
-  char * destEnd = aDest + *aDestLength;
-
-  if (mEncStep != 0) {
-    if (dest >= destEnd) return NS_OK_UENC_MOREOUTPUT;
-    *(dest++)=ValueToChar(mEncBits);
-    mEncStep = 0;
-    mEncBits = 0;
-  }
-
-  if (dest >= destEnd) {
-    res = NS_OK_UENC_MOREOUTPUT;
-  } else {
-    switch (aEncoding) {
-      case 0:
-        *(dest++) = '-';
-        mEncStep = 0;
-        mEncBits = 0;
-        break;
-      case 1:
-        *(dest++) = mEscChar;
-        break;
-    }
-    mEncoding = aEncoding;
-  }
-
-  *aDestLength  = dest - aDest;
-  return res;
-}
-
-nsresult nsBasicUTF7Encoder::EncodeDirect(
-                            const char16_t * aSrc, 
-                            int32_t * aSrcLength, 
-                            char * aDest, 
-                            int32_t * aDestLength)
-{
-  nsresult res = NS_OK;
-  const char16_t * src = aSrc;
-  const char16_t * srcEnd = aSrc + *aSrcLength;
-  char * dest = aDest;
-  char * destEnd = aDest + *aDestLength;
-  char16_t ch;
-
-  while (src < srcEnd) {
-    ch = *src;
-
-    // stop when we reach Unicode chars
-    if (!DirectEncodable(ch)) break;
-
-    if (ch == mEscChar) {
-      // special case for the escape char
-      if (destEnd - dest < 1) {
-        res = NS_OK_UENC_MOREOUTPUT;
-        break;
-      } else {
-        *dest++ = (char)ch;
-        *dest++ = (char)'-';
-        src++;
-      }
-    } else {
-      //classic direct encoding
-      if (dest >= destEnd) {
-        res = NS_OK_UENC_MOREOUTPUT;
-        break;
-      } else {
-        *dest++ = (char)ch;
-        src++;
-      }
-    }
-  }
-
-  *aSrcLength = src - aSrc;
-  *aDestLength  = dest - aDest;
-  return res;
-}
-
-nsresult nsBasicUTF7Encoder::EncodeBase64(
-                             const char16_t * aSrc, 
-                             int32_t * aSrcLength, 
-                             char * aDest, 
-                             int32_t * aDestLength)
-{
-  nsresult res = NS_OK;
-  const char16_t * src = aSrc;
-  const char16_t * srcEnd = aSrc + *aSrcLength;
-  char * dest = aDest;
-  char * destEnd = aDest + *aDestLength;
-  char16_t ch;
-  uint32_t value;
-
-  while (src < srcEnd) {
-    ch = *src;
-
-    // stop when we reach printable US-ASCII chars
-    if (DirectEncodable(ch)) break;
-
-    switch (mEncStep) {
-      case 0:
-        if (destEnd - dest < 2) {
-          res = NS_OK_UENC_MOREOUTPUT;
-          break;
-        }
-        value=ch>>10;
-        *(dest++)=ValueToChar(value);
-        value=(ch>>4)&0x3f;
-        *(dest++)=ValueToChar(value);
-        mEncBits=(ch&0x0f)<<2;
-        break;
-      case 1:
-        if (destEnd - dest < 3) {
-          res = NS_OK_UENC_MOREOUTPUT;
-          break;
-        }
-        value=mEncBits+(ch>>14);
-        *(dest++)=ValueToChar(value);
-        value=(ch>>8)&0x3f;
-        *(dest++)=ValueToChar(value);
-        value=(ch>>2)&0x3f;
-        *(dest++)=ValueToChar(value);
-        mEncBits=(ch&0x03)<<4;
-        break;
-      case 2:
-        if (destEnd - dest < 3) {
-          res = NS_OK_UENC_MOREOUTPUT;
-          break;
-        }
-        value=mEncBits+(ch>>12);
-        *(dest++)=ValueToChar(value);
-        value=(ch>>6)&0x3f;
-        *(dest++)=ValueToChar(value);
-        value=ch&0x3f;
-        *(dest++)=ValueToChar(value);
-        mEncBits=0;
-        break;
-    }
-
-    if (res != NS_OK) break;
-
-    src++;
-    (++mEncStep)%=3;
-  }
-
-  *aSrcLength = src - aSrc;
-  *aDestLength  = dest - aDest;
-  return res;
-}
-
-char nsBasicUTF7Encoder::ValueToChar(uint32_t aValue) { 
-  if (aValue < 26) 
-    return (char)('A'+aValue);
-  else if (aValue < 26 + 26) 
-    return (char)('a' + aValue - 26);
-  else if (aValue < 26 + 26 + 10)
-    return (char)('0' + aValue - 26 - 26);
-  else if (aValue == 26 + 26 + 10)
-    return '+';
-  else if (aValue == 26 + 26 + 10 + 1)
-    return mLastChar;
-  else
-    return -1;
-}
-
-bool nsBasicUTF7Encoder::DirectEncodable(char16_t aChar) {
-  // spec says: printable US-ASCII chars
-  if ((aChar >= 0x20) && (aChar <= 0x7e)) return true;
-  else return false;
-}
-
-//----------------------------------------------------------------------
-// Subclassing of nsEncoderSupport class [implementation]
-
-NS_IMETHODIMP nsBasicUTF7Encoder::ConvertNoBuffNoErr(
-                                  const char16_t * aSrc, 
-                                  int32_t * aSrcLength, 
-                                  char * aDest, 
-                                  int32_t * aDestLength)
-{
-  nsresult res = NS_OK;
-  const char16_t * src = aSrc;
-  const char16_t * srcEnd = aSrc + *aSrcLength;
-  char * dest = aDest;
-  char * destEnd = aDest + *aDestLength;
-  int32_t bcr,bcw;
-  char16_t ch;
-  int32_t enc;
-
-  while (src < srcEnd) {
-    // find the encoding for the next char
-    ch = *src;
-    if (DirectEncodable(ch)) 
-      enc = ENC_DIRECT;
-    else
-      enc = ENC_BASE64;
-
-    // if necessary, shift into the required encoding
-    bcw = destEnd - dest;
-    res = ShiftEncoding(enc, dest, &bcw);
-    dest += bcw;
-    if (res != NS_OK) break;
-
-    // now encode (as much as you can)
-    bcr = srcEnd - src;
-    bcw = destEnd - dest;
-    if (enc == ENC_DIRECT) 
-      res = EncodeDirect(src, &bcr, dest, &bcw);
-    else 
-      res = EncodeBase64(src, &bcr, dest, &bcw);
-    src += bcr;
-    dest += bcw;
-
-    if (res != NS_OK) break;
-  }
-
-  *aSrcLength = src - aSrc;
-  *aDestLength  = dest - aDest;
-  return res;
-}
-
-NS_IMETHODIMP nsBasicUTF7Encoder::FinishNoBuff(char * aDest, 
-                                               int32_t * aDestLength)
-{
-  return ShiftEncoding(ENC_DIRECT, aDest, aDestLength);
-}
-
-NS_IMETHODIMP nsBasicUTF7Encoder::Reset()
-{
-  mEncoding = ENC_DIRECT;
-  mEncBits = 0;
-  mEncStep = 0;
-  return nsEncoderSupport::Reset();
-}
-
-//----------------------------------------------------------------------
-// Class nsUnicodeToUTF7 [implementation]
-
-nsUnicodeToUTF7::nsUnicodeToUTF7() 
-: nsBasicUTF7Encoder('/', '+')
-{
-}
-
-
-bool nsUnicodeToUTF7::DirectEncodable(char16_t aChar) {
-  if ((aChar >= 'A') && (aChar <= 'Z')) return true;
-  else if ((aChar >= 'a') && (aChar <= 'z')) return true;
-  else if ((aChar >= '0') && (aChar <= '9')) return true;
-  else if ((aChar >= 39) && (aChar <= 41)) return true;
-  else if ((aChar >= 44) && (aChar <= 47)) return true;
-  else if (aChar == 58) return true;
-  else if (aChar == 63) return true;
-  else if (aChar == ' ') return true;
-  else if (aChar == 9) return true;
-  else if (aChar == 13) return true;
-  else if (aChar == 10) return true;
-  else if (aChar == 60) return true;  // '<'
-  else if (aChar == 33) return true;  // '!'
-  else if (aChar == 34) return true;  // '"'
-  else if (aChar == 62) return true;  // '>'
-  else if (aChar == 61) return true;  // '='
-  else if (aChar == 59) return true;  // ';'
-  else if (aChar == 91) return true;  // '['
-  else if (aChar == 93) return true;  // ']'
-  else return false;
-}
deleted file mode 100644
--- a/intl/uconv/ucvlatin/nsUnicodeToUTF7.h
+++ /dev/null
@@ -1,78 +0,0 @@
-/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-#ifndef nsUnicodeToUTF7_h___
-#define nsUnicodeToUTF7_h___
-
-#include "nsUCSupport.h"
-
-//----------------------------------------------------------------------
-// Class nsBasicUTF7Encoder [declaration]
-
-/**
- * Basic class for a character set converter from Unicode to UTF-7.
- *
- * @created         03/Jun/1999
- * @author  Catalin Rotaru [CATA]
- */
-class nsBasicUTF7Encoder : public nsEncoderSupport
-{
-public:
-
-  /**
-   * Class constructor.
-   */
-  nsBasicUTF7Encoder(char aLastChar, char aEscChar);
-
-protected:
-
-  int32_t                   mEncoding;      // current encoding
-  uint32_t                  mEncBits;
-  int32_t                   mEncStep;
-  char                      mLastChar;
-  char                      mEscChar;
-
-  nsresult ShiftEncoding(int32_t aEncoding, char * aDest, 
-      int32_t * aDestLength);
-  nsresult EncodeDirect(const char16_t * aSrc, int32_t * aSrcLength, 
-      char * aDest, int32_t * aDestLength);
-  nsresult EncodeBase64(const char16_t * aSrc, int32_t * aSrcLength, 
-      char * aDest, int32_t * aDestLength);
-  char ValueToChar(uint32_t aValue);
-  virtual bool DirectEncodable(char16_t aChar);
-
-  //--------------------------------------------------------------------
-  // Subclassing of nsEncoderSupport class [declaration]
-
-  NS_IMETHOD ConvertNoBuffNoErr(const char16_t * aSrc, int32_t * aSrcLength, 
-      char * aDest, int32_t * aDestLength);
-  NS_IMETHOD FinishNoBuff(char * aDest, int32_t * aDestLength);
-  NS_IMETHOD Reset();
-};
-
-//----------------------------------------------------------------------
-// Class nsUnicodeToUTF7 [declaration]
-
-/**
- * A character set converter from Unicode to UTF-7.
- *
- * @created         03/Jun/1999
- * @author  Catalin Rotaru [CATA]
- */
-class nsUnicodeToUTF7 : public nsBasicUTF7Encoder
-{
-public:
-
-  /**
-   * Class constructor.
-   */
-  nsUnicodeToUTF7();
-
-protected:
-
-  virtual bool DirectEncodable(char16_t aChar);
-};
-
-#endif /* nsUnicodeToUTF7_h___ */