Drop UTF-32 support
Blink does not need it any more. Drop UTF-32 converters and aliases.
Save 320 bytes in ICU data. icuuc.so will be slightly smaller, too.
BUG=chromium:417850
TEST=None
Change-Id: Ib4fecc3fcc905c974e68a652e7f4722bfd271129
Reviewed-on: https://chromium-review.googlesource.com/576872
Reviewed-by: Joshua Bell <jsbell@chromium.org>
diff --git a/README.chromium b/README.chromium
index a28d008..71399a6 100644
--- a/README.chromium
+++ b/README.chromium
@@ -264,29 +264,21 @@
Put ICU_DATA_ENTRY_POINT(icudtXX_dat) in common when we use
the icu data file or icudt.dll
-5. Add back UTF-32 converters temporarily even when
- UCONFIG_ONLY_HTML_CONVERSION is defined until UTF-32 is
- removed from Blink. See
- http://www.icu-project.org/trac/ticket/11296 and
- http://crbug.com/417850
-
- - patches/utf32.patch
-
-6. Don't use '__cdecl' for function arguments (as opposed to functions)
+5. Don't use '__cdecl' for function arguments (as opposed to functions)
in uclean.h to make MSVC happy (C4229 warning).
http://www.icu-project.org/trac/ticket/13030
- patches/msvc4229.patch
-7. C++ 11 does not allow a string literal to be assigned to a variable
+6. C++ 11 does not allow a string literal to be assigned to a variable
of char*.
http://www.icu-project.org/trac/ticket/13192
- patches/string_literal_charptr.patch
-8. Apply post-59 upstream fixes
+7. Apply post-59 upstream fixes
http://www.icu-project.org/trac/ticket/12333
http://www.icu-project.org/trac/ticket/13189
diff --git a/android/icudtl.dat b/android/icudtl.dat
index d6a54ac..b1ca831 100644
--- a/android/icudtl.dat
+++ b/android/icudtl.dat
Binary files differ
diff --git a/common/icudtb.dat b/common/icudtb.dat
index ec2611a..4ce1940 100644
--- a/common/icudtb.dat
+++ b/common/icudtb.dat
Binary files differ
diff --git a/common/icudtl.dat b/common/icudtl.dat
index 6f0816f..017d669 100644
--- a/common/icudtl.dat
+++ b/common/icudtl.dat
Binary files differ
diff --git a/ios/icudtl.dat b/ios/icudtl.dat
index eade0be..9f77c63 100644
--- a/ios/icudtl.dat
+++ b/ios/icudtl.dat
Binary files differ
diff --git a/patches/utf32.patch b/patches/utf32.patch
deleted file mode 100644
index b3ef1d3..0000000
--- a/patches/utf32.patch
+++ /dev/null
@@ -1,54 +0,0 @@
-diff --git a/source/common/ucnv_bld.cpp b/source/common/ucnv_bld.cpp
-index 078f293..a8c41cc 100644
---- a/source/common/ucnv_bld.cpp
-+++ b/source/common/ucnv_bld.cpp
-@@ -67,11 +67,7 @@ converterData[UCNV_NUMBER_OF_SUPPORTED_CONVERTER_TYPES]={
-
- &_Latin1Data,
- &_UTF8Data, &_UTF16BEData, &_UTF16LEData,
--#if UCONFIG_ONLY_HTML_CONVERSION
-- NULL, NULL,
--#else
- &_UTF32BEData, &_UTF32LEData,
--#endif
- NULL,
-
- #if UCONFIG_NO_LEGACY_CONVERSION
-@@ -105,7 +101,7 @@ converterData[UCNV_NUMBER_OF_SUPPORTED_CONVERTER_TYPES]={
-
- &_ASCIIData,
- #if UCONFIG_ONLY_HTML_CONVERSION
-- NULL, NULL, &_UTF16Data, NULL, NULL, NULL,
-+ NULL, NULL, &_UTF16Data, &_UTF32Data, NULL, NULL,
- #else
- &_UTF7Data, &_Bocu1Data, &_UTF16Data, &_UTF32Data, &_CESU8Data, &_IMAPData,
- #endif
-@@ -170,7 +166,6 @@ static struct {
- { "utf16oppositeendian", UCNV_UTF16_BigEndian},
- { "utf16platformendian", UCNV_UTF16_LittleEndian },
- #endif
--#if !UCONFIG_ONLY_HTML_CONVERSION
- { "utf32", UCNV_UTF32 },
- { "utf32be", UCNV_UTF32_BigEndian },
- { "utf32le", UCNV_UTF32_LittleEndian },
-@@ -181,7 +176,6 @@ static struct {
- { "utf32oppositeendian", UCNV_UTF32_BigEndian },
- { "utf32platformendian", UCNV_UTF32_LittleEndian },
- #endif
--#endif
- #if !UCONFIG_ONLY_HTML_CONVERSION
- { "utf7", UCNV_UTF7 },
- #endif
-diff --git a/source/common/ucnv_u32.cpp b/source/common/ucnv_u32.cpp
-index b0a0fe2..5a4d6fc 100644
---- a/source/common/ucnv_u32.cpp
-+++ b/source/common/ucnv_u32.cpp
-@@ -18,7 +18,7 @@
-
- #include "unicode/utypes.h"
-
--#if !UCONFIG_NO_CONVERSION && !UCONFIG_ONLY_HTML_CONVERSION
-+#if !UCONFIG_NO_CONVERSION
-
- #include "unicode/ucnv.h"
- #include "unicode/utf.h"
diff --git a/source/common/ucnv_bld.cpp b/source/common/ucnv_bld.cpp
index a0d0442..14de21b 100644
--- a/source/common/ucnv_bld.cpp
+++ b/source/common/ucnv_bld.cpp
@@ -67,7 +67,11 @@
&_Latin1Data,
&_UTF8Data, &_UTF16BEData, &_UTF16LEData,
+#if UCONFIG_ONLY_HTML_CONVERSION
+ NULL, NULL,
+#else
&_UTF32BEData, &_UTF32LEData,
+#endif
NULL,
#if UCONFIG_NO_LEGACY_CONVERSION
@@ -101,7 +105,7 @@
&_ASCIIData,
#if UCONFIG_ONLY_HTML_CONVERSION
- NULL, NULL, &_UTF16Data, &_UTF32Data, NULL, NULL,
+ NULL, NULL, &_UTF16Data, NULL, NULL, NULL,
#else
&_UTF7Data, &_Bocu1Data, &_UTF16Data, &_UTF32Data, &_CESU8Data, &_IMAPData,
#endif
@@ -166,6 +170,7 @@
{ "utf16oppositeendian", UCNV_UTF16_BigEndian},
{ "utf16platformendian", UCNV_UTF16_LittleEndian },
#endif
+#if !UCONFIG_ONLY_HTML_CONVERSION
{ "utf32", UCNV_UTF32 },
{ "utf32be", UCNV_UTF32_BigEndian },
{ "utf32le", UCNV_UTF32_LittleEndian },
@@ -176,6 +181,7 @@
{ "utf32oppositeendian", UCNV_UTF32_BigEndian },
{ "utf32platformendian", UCNV_UTF32_LittleEndian },
#endif
+#endif
#if !UCONFIG_ONLY_HTML_CONVERSION
{ "utf7", UCNV_UTF7 },
#endif
diff --git a/source/common/ucnv_u32.cpp b/source/common/ucnv_u32.cpp
index 780e9d4..e1b755a 100644
--- a/source/common/ucnv_u32.cpp
+++ b/source/common/ucnv_u32.cpp
@@ -18,7 +18,7 @@
#include "unicode/utypes.h"
-#if !UCONFIG_NO_CONVERSION
+#if !UCONFIG_NO_CONVERSION && !UCONFIG_ONLY_HTML_CONVERSION
#include "unicode/ucnv.h"
#include "unicode/utf.h"
diff --git a/source/data/mappings/convrtrs.txt b/source/data/mappings/convrtrs.txt
index 1a10f36..454ebfc 100644
--- a/source/data/mappings/convrtrs.txt
+++ b/source/data/mappings/convrtrs.txt
@@ -132,15 +132,6 @@
utf-16le { MIME* HTML* }
utf-16
-# Keep UTF-32 entries for now until we sort out Blink's behavior when
-# UTF-32 is dropped.
-UTF-32 { IANA* MIME* } ISO-10646-UCS-4 { IANA }
- csUCS4
- ucs-4
-# Until we kill UTF-32 in Blink, add MIME tag here.
-UTF-32BE { MIME* IANA* } UTF32_BigEndian
-UTF-32LE { MIME* IANA* } UTF32_LittleEndian
-
ibm866-html
IBM866 { MIME* HTML* }
866