diff options
author | Tor Lillqvist <tml@collabora.com> | 2014-04-24 18:26:59 +0300 |
---|---|---|
committer | Tor Lillqvist <tml@collabora.com> | 2014-04-24 19:44:10 +0300 |
commit | 25d88d2b8eebb4782a016e03aa8562ad9fa15b7b (patch) | |
tree | 30b5cafa05573f31b9d044e314c170610310667d /sal | |
parent | 95711f5b9e7b6a982d1762d37d5a38e0f40b86f9 (diff) |
More hacking on --with-locales
Propagate the restriction of locales into <config_locales.h>. Note that in the
normal case, with no locale restrictions, all the WITH_LOCALE_xx macros are
zero anyway, but WITH_LOCALE_ALL is one.
Restrict which character encodings are handled in
sal/textencsal/textenc/tables.cxx based on the WITH_LOCALE_ macros. (Don't
simply always do it for iOS.)
Massage the affected unit tests to not crash when only partial character
encoding information is present.
Change-Id: Ie2c882c262ebd0d2b37dde66b8fe3c3e2570da14
Diffstat (limited to 'sal')
-rw-r--r-- | sal/Module_sal.mk | 2 | ||||
-rw-r--r-- | sal/qa/rtl/textenc/rtl_tencinfo.cxx | 246 | ||||
-rw-r--r-- | sal/qa/rtl/textenc/rtl_textcvt.cxx | 71 | ||||
-rw-r--r-- | sal/qa/rtl/uri/rtl_testuri.cxx | 8 | ||||
-rw-r--r-- | sal/textenc/tables.cxx | 67 |
5 files changed, 269 insertions, 125 deletions
diff --git a/sal/Module_sal.mk b/sal/Module_sal.mk index 922bf5b75141..ef5d58f91eeb 100644 --- a/sal/Module_sal.mk +++ b/sal/Module_sal.mk @@ -54,8 +54,8 @@ $(eval $(call gb_Module_add_check_targets,sal,\ CppunitTest_sal_rtl_oustringbuffer \ CppunitTest_sal_rtl_oustring \ CppunitTest_sal_rtl_textenc \ - CppunitTest_sal_rtl_strings \ CppunitTest_sal_rtl_uri \ + CppunitTest_sal_rtl_strings \ CppunitTest_sal_rtl_uuid \ CppunitTest_sal_tcwf \ CppunitTest_sal_types \ diff --git a/sal/qa/rtl/textenc/rtl_tencinfo.cxx b/sal/qa/rtl/textenc/rtl_tencinfo.cxx index 45ce5912f125..85be1fdf5928 100644 --- a/sal/qa/rtl/textenc/rtl_tencinfo.cxx +++ b/sal/qa/rtl/textenc/rtl_tencinfo.cxx @@ -17,6 +17,8 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ +#include <config_locales.h> + #include <string.h> #include <osl/thread.h> @@ -242,22 +244,6 @@ namespace { check( RTL_TEXTENCODING_APPLE_UKRAINIAN, RTL_TEXTENCODING_ISO_8859_5 ); } - void MimeCharsetFromTextEncoding_APPLE_CHINSIMP() - { - check( RTL_TEXTENCODING_APPLE_CHINSIMP, RTL_TEXTENCODING_GB_2312 ); - } - void MimeCharsetFromTextEncoding_APPLE_CHINTRAD() - { - check( RTL_TEXTENCODING_APPLE_CHINTRAD, RTL_TEXTENCODING_BIG5 ); - } - void MimeCharsetFromTextEncoding_APPLE_JAPANESE() - { - check( RTL_TEXTENCODING_APPLE_JAPANESE, RTL_TEXTENCODING_SHIFT_JIS ); - } - void MimeCharsetFromTextEncoding_APPLE_KOREAN() - { - check( RTL_TEXTENCODING_APPLE_KOREAN, RTL_TEXTENCODING_EUC_KR ); - } void MimeCharsetFromTextEncoding_MS_932() { check( RTL_TEXTENCODING_MS_932, RTL_TEXTENCODING_SHIFT_JIS ); @@ -274,65 +260,72 @@ namespace { check( RTL_TEXTENCODING_MS_950, RTL_TEXTENCODING_BIG5 ); } - void MimeCharsetFromTextEncoding_SHIFT_JIS() + void MimeCharsetFromTextEncoding_KOI8_R() { - check( RTL_TEXTENCODING_SHIFT_JIS, RTL_TEXTENCODING_SHIFT_JIS ); + check( RTL_TEXTENCODING_KOI8_R, RTL_TEXTENCODING_KOI8_R ); } - void MimeCharsetFromTextEncoding_GB_2312() + void MimeCharsetFromTextEncoding_UTF7() { - check( RTL_TEXTENCODING_GB_2312, RTL_TEXTENCODING_GB_2312 ); + check( RTL_TEXTENCODING_UTF7, RTL_TEXTENCODING_UTF7 ); } - void MimeCharsetFromTextEncoding_GBT_12345() + void MimeCharsetFromTextEncoding_UTF8() { - check( RTL_TEXTENCODING_GBT_12345, RTL_TEXTENCODING_GBT_12345 ); + check( RTL_TEXTENCODING_UTF8, RTL_TEXTENCODING_UTF8 ); } - void MimeCharsetFromTextEncoding_GBK() + void MimeCharsetFromTextEncoding_ISO_8859_10() { - check( RTL_TEXTENCODING_GBK, RTL_TEXTENCODING_GBK ); + check( RTL_TEXTENCODING_ISO_8859_10, RTL_TEXTENCODING_ISO_8859_10 ); } - void MimeCharsetFromTextEncoding_BIG5() + void MimeCharsetFromTextEncoding_ISO_8859_13() { - check( RTL_TEXTENCODING_BIG5, RTL_TEXTENCODING_BIG5 ); + check( RTL_TEXTENCODING_ISO_8859_13, RTL_TEXTENCODING_ISO_8859_13 ); } - void MimeCharsetFromTextEncoding_EUC_JP() + void MimeCharsetFromTextEncoding_MS_1361() { - check( RTL_TEXTENCODING_EUC_JP, RTL_TEXTENCODING_EUC_JP ); + check( RTL_TEXTENCODING_MS_1361, RTL_TEXTENCODING_EUC_KR ); } - void MimeCharsetFromTextEncoding_EUC_CN() + void MimeCharsetFromTextEncoding_TIS_620() { - check( RTL_TEXTENCODING_EUC_CN, RTL_TEXTENCODING_GB_2312 ); + check( RTL_TEXTENCODING_TIS_620, RTL_TEXTENCODING_TIS_620 ); } - void MimeCharsetFromTextEncoding_EUC_TW() + void MimeCharsetFromTextEncoding_KOI8_U() { - check( RTL_TEXTENCODING_EUC_TW, RTL_TEXTENCODING_BIG5 ); + check( RTL_TEXTENCODING_KOI8_U, RTL_TEXTENCODING_KOI8_U ); } - void MimeCharsetFromTextEncoding_ISO_2022_JP() +#if WITH_LOCALE_ALL || WITH_LOCALE_ja + void MimeCharsetFromTextEncoding_APPLE_JAPANESE() { - check( RTL_TEXTENCODING_ISO_2022_JP, RTL_TEXTENCODING_ISO_2022_JP ); + check( RTL_TEXTENCODING_APPLE_JAPANESE, RTL_TEXTENCODING_SHIFT_JIS ); } - void MimeCharsetFromTextEncoding_ISO_2022_CN() + void MimeCharsetFromTextEncoding_SHIFT_JIS() { - check( RTL_TEXTENCODING_ISO_2022_CN, RTL_TEXTENCODING_ISO_2022_CN ); + check( RTL_TEXTENCODING_SHIFT_JIS, RTL_TEXTENCODING_SHIFT_JIS ); } - void MimeCharsetFromTextEncoding_KOI8_R() + void MimeCharsetFromTextEncoding_EUC_JP() { - check( RTL_TEXTENCODING_KOI8_R, RTL_TEXTENCODING_KOI8_R ); + check( RTL_TEXTENCODING_EUC_JP, RTL_TEXTENCODING_EUC_JP ); } - void MimeCharsetFromTextEncoding_UTF7() + void MimeCharsetFromTextEncoding_ISO_2022_JP() { - check( RTL_TEXTENCODING_UTF7, RTL_TEXTENCODING_UTF7 ); + check( RTL_TEXTENCODING_ISO_2022_JP, RTL_TEXTENCODING_ISO_2022_JP ); } - void MimeCharsetFromTextEncoding_UTF8() + void MimeCharsetFromTextEncoding_JIS_X_0201() { - check( RTL_TEXTENCODING_UTF8, RTL_TEXTENCODING_UTF8 ); + check( RTL_TEXTENCODING_JIS_X_0201, RTL_TEXTENCODING_EUC_JP ); } - void MimeCharsetFromTextEncoding_ISO_8859_10() + void MimeCharsetFromTextEncoding_JIS_X_0208() { - check( RTL_TEXTENCODING_ISO_8859_10, RTL_TEXTENCODING_ISO_8859_10 ); + check( RTL_TEXTENCODING_JIS_X_0208, RTL_TEXTENCODING_EUC_JP ); } - void MimeCharsetFromTextEncoding_ISO_8859_13() + void MimeCharsetFromTextEncoding_JIS_X_0212() { - check( RTL_TEXTENCODING_ISO_8859_13, RTL_TEXTENCODING_ISO_8859_13 ); + check( RTL_TEXTENCODING_JIS_X_0212, RTL_TEXTENCODING_EUC_JP ); + } +#endif +#if WITH_LOCALE_ALL || WITH_LOCALE_ko + void MimeCharsetFromTextEncoding_APPLE_KOREAN() + { + check( RTL_TEXTENCODING_APPLE_KOREAN, RTL_TEXTENCODING_EUC_KR ); } void MimeCharsetFromTextEncoding_EUC_KR() { @@ -342,43 +335,59 @@ namespace { check( RTL_TEXTENCODING_ISO_2022_KR, RTL_TEXTENCODING_ISO_2022_KR ); } - void MimeCharsetFromTextEncoding_JIS_X_0201() +#endif +#if WITH_LOCALE_ALL || WITH_LOCALE_zh + void MimeCharsetFromTextEncoding_APPLE_CHINSIMP() { - check( RTL_TEXTENCODING_JIS_X_0201, RTL_TEXTENCODING_EUC_JP ); + check( RTL_TEXTENCODING_APPLE_CHINSIMP, RTL_TEXTENCODING_GB_2312 ); } - void MimeCharsetFromTextEncoding_JIS_X_0208() + void MimeCharsetFromTextEncoding_APPLE_CHINTRAD() { - check( RTL_TEXTENCODING_JIS_X_0208, RTL_TEXTENCODING_EUC_JP ); + check( RTL_TEXTENCODING_APPLE_CHINTRAD, RTL_TEXTENCODING_BIG5 ); } - void MimeCharsetFromTextEncoding_JIS_X_0212() + void MimeCharsetFromTextEncoding_GB_2312() { - check( RTL_TEXTENCODING_JIS_X_0212, RTL_TEXTENCODING_EUC_JP ); + check( RTL_TEXTENCODING_GB_2312, RTL_TEXTENCODING_GB_2312 ); } - void MimeCharsetFromTextEncoding_MS_1361() + void MimeCharsetFromTextEncoding_GBT_12345() { - check( RTL_TEXTENCODING_MS_1361, RTL_TEXTENCODING_EUC_KR ); + check( RTL_TEXTENCODING_GBT_12345, RTL_TEXTENCODING_GBT_12345 ); } - void MimeCharsetFromTextEncoding_GB_18030() + void MimeCharsetFromTextEncoding_GBK() { - check( RTL_TEXTENCODING_GB_18030, RTL_TEXTENCODING_GB_18030 ); + check( RTL_TEXTENCODING_GBK, RTL_TEXTENCODING_GBK ); } - void MimeCharsetFromTextEncoding_BIG5_HKSCS() + void MimeCharsetFromTextEncoding_BIG5() { - check( RTL_TEXTENCODING_BIG5_HKSCS, RTL_TEXTENCODING_BIG5_HKSCS ); + check( RTL_TEXTENCODING_BIG5, RTL_TEXTENCODING_BIG5 ); } - void MimeCharsetFromTextEncoding_TIS_620() + void MimeCharsetFromTextEncoding_EUC_CN() { - check( RTL_TEXTENCODING_TIS_620, RTL_TEXTENCODING_TIS_620 ); + check( RTL_TEXTENCODING_EUC_CN, RTL_TEXTENCODING_GB_2312 ); } - void MimeCharsetFromTextEncoding_KOI8_U() + void MimeCharsetFromTextEncoding_EUC_TW() { - check( RTL_TEXTENCODING_KOI8_U, RTL_TEXTENCODING_KOI8_U ); + check( RTL_TEXTENCODING_EUC_TW, RTL_TEXTENCODING_BIG5 ); } + void MimeCharsetFromTextEncoding_ISO_2022_CN() + { + check( RTL_TEXTENCODING_ISO_2022_CN, RTL_TEXTENCODING_ISO_2022_CN ); + } + void MimeCharsetFromTextEncoding_GB_18030() + { + check( RTL_TEXTENCODING_GB_18030, RTL_TEXTENCODING_GB_18030 ); + } + void MimeCharsetFromTextEncoding_BIG5_HKSCS() + { + check( RTL_TEXTENCODING_BIG5_HKSCS, RTL_TEXTENCODING_BIG5_HKSCS ); + } +#endif +#if WITH_LOCALE_ALL || WITH_LOCALE_FOR_SCRIPT_Deva void MimeCharsetFromTextEncoding_ISCII_DEVANAGARI() { check( RTL_TEXTENCODING_ISCII_DEVANAGARI, RTL_TEXTENCODING_ISCII_DEVANAGARI ); } - +#endif CPPUNIT_TEST_SUITE( testBestMime ); CPPUNIT_TEST( MimeCharsetFromTextEncoding_MS_1252 ); @@ -428,41 +437,48 @@ namespace CPPUNIT_TEST( MimeCharsetFromTextEncoding_APPLE_ROMANIAN ); CPPUNIT_TEST( MimeCharsetFromTextEncoding_APPLE_TURKISH ); CPPUNIT_TEST( MimeCharsetFromTextEncoding_APPLE_UKRAINIAN ); - CPPUNIT_TEST( MimeCharsetFromTextEncoding_APPLE_CHINSIMP ); - CPPUNIT_TEST( MimeCharsetFromTextEncoding_APPLE_CHINTRAD ); - CPPUNIT_TEST( MimeCharsetFromTextEncoding_APPLE_JAPANESE ); - CPPUNIT_TEST( MimeCharsetFromTextEncoding_APPLE_KOREAN ); CPPUNIT_TEST( MimeCharsetFromTextEncoding_MS_932 ); CPPUNIT_TEST( MimeCharsetFromTextEncoding_MS_936 ); CPPUNIT_TEST( MimeCharsetFromTextEncoding_MS_949 ); CPPUNIT_TEST( MimeCharsetFromTextEncoding_MS_950 ); - CPPUNIT_TEST( MimeCharsetFromTextEncoding_SHIFT_JIS ); - CPPUNIT_TEST( MimeCharsetFromTextEncoding_GB_2312 ); - CPPUNIT_TEST( MimeCharsetFromTextEncoding_GBT_12345 ); - CPPUNIT_TEST( MimeCharsetFromTextEncoding_GBK ); - CPPUNIT_TEST( MimeCharsetFromTextEncoding_BIG5 ); - CPPUNIT_TEST( MimeCharsetFromTextEncoding_EUC_JP ); - CPPUNIT_TEST( MimeCharsetFromTextEncoding_EUC_CN ); - CPPUNIT_TEST( MimeCharsetFromTextEncoding_EUC_TW ); - CPPUNIT_TEST( MimeCharsetFromTextEncoding_ISO_2022_JP ); - CPPUNIT_TEST( MimeCharsetFromTextEncoding_ISO_2022_CN ); CPPUNIT_TEST( MimeCharsetFromTextEncoding_KOI8_R ); CPPUNIT_TEST( MimeCharsetFromTextEncoding_UTF7 ); CPPUNIT_TEST( MimeCharsetFromTextEncoding_UTF8 ); CPPUNIT_TEST( MimeCharsetFromTextEncoding_ISO_8859_10 ); CPPUNIT_TEST( MimeCharsetFromTextEncoding_ISO_8859_13 ); - CPPUNIT_TEST( MimeCharsetFromTextEncoding_EUC_KR ); - CPPUNIT_TEST( MimeCharsetFromTextEncoding_ISO_2022_KR ); + CPPUNIT_TEST( MimeCharsetFromTextEncoding_MS_1361 ); + CPPUNIT_TEST( MimeCharsetFromTextEncoding_TIS_620 ); + CPPUNIT_TEST( MimeCharsetFromTextEncoding_KOI8_U ); +#if WITH_LOCALE_ALL || WITH_LOCALE_ja + CPPUNIT_TEST( MimeCharsetFromTextEncoding_APPLE_JAPANESE ); + CPPUNIT_TEST( MimeCharsetFromTextEncoding_SHIFT_JIS ); + CPPUNIT_TEST( MimeCharsetFromTextEncoding_EUC_JP ); + CPPUNIT_TEST( MimeCharsetFromTextEncoding_ISO_2022_JP ); CPPUNIT_TEST( MimeCharsetFromTextEncoding_JIS_X_0201 ); CPPUNIT_TEST( MimeCharsetFromTextEncoding_JIS_X_0208 ); CPPUNIT_TEST( MimeCharsetFromTextEncoding_JIS_X_0212 ); - CPPUNIT_TEST( MimeCharsetFromTextEncoding_MS_1361 ); +#endif +#if WITH_LOCALE_ALL || WITH_LOCALE_ko + CPPUNIT_TEST( MimeCharsetFromTextEncoding_APPLE_KOREAN ); + CPPUNIT_TEST( MimeCharsetFromTextEncoding_EUC_KR ); + CPPUNIT_TEST( MimeCharsetFromTextEncoding_ISO_2022_KR ); +#endif +#if WITH_LOCALE_ALL || WITH_LOCALE_zh + CPPUNIT_TEST( MimeCharsetFromTextEncoding_APPLE_CHINSIMP ); + CPPUNIT_TEST( MimeCharsetFromTextEncoding_APPLE_CHINTRAD ); + CPPUNIT_TEST( MimeCharsetFromTextEncoding_GB_2312 ); + CPPUNIT_TEST( MimeCharsetFromTextEncoding_GBT_12345 ); + CPPUNIT_TEST( MimeCharsetFromTextEncoding_GBK ); + CPPUNIT_TEST( MimeCharsetFromTextEncoding_BIG5 ); + CPPUNIT_TEST( MimeCharsetFromTextEncoding_EUC_CN ); + CPPUNIT_TEST( MimeCharsetFromTextEncoding_EUC_TW ); + CPPUNIT_TEST( MimeCharsetFromTextEncoding_ISO_2022_CN ); CPPUNIT_TEST( MimeCharsetFromTextEncoding_GB_18030 ); CPPUNIT_TEST( MimeCharsetFromTextEncoding_BIG5_HKSCS ); - CPPUNIT_TEST( MimeCharsetFromTextEncoding_TIS_620 ); - CPPUNIT_TEST( MimeCharsetFromTextEncoding_KOI8_U ); +#endif +#if WITH_LOCALE_ALL || WITH_LOCALE_FOR_SCRIPT_Deva CPPUNIT_TEST( MimeCharsetFromTextEncoding_ISCII_DEVANAGARI ); - +#endif CPPUNIT_TEST_SUITE_END( ); }; @@ -714,7 +730,7 @@ namespace { check( RTL_TEXTENCODING_APPLE_UKRAINIAN, RTL_TEXTENCODING_ISO_8859_5 ); } - +#if WITH_LOCALE_ALL || WITH_LOCALE_zh void UnixCharsetFromTextEncoding_APPLE_CHINSIMP() { check( RTL_TEXTENCODING_APPLE_CHINSIMP, RTL_TEXTENCODING_DONTKNOW ); @@ -724,17 +740,19 @@ namespace { check( RTL_TEXTENCODING_APPLE_CHINTRAD, RTL_TEXTENCODING_DONTKNOW ); } - +#endif +#if WITH_LOCALE_ALL || WITH_LOCALE_ja void UnixCharsetFromTextEncoding_APPLE_JAPANESE() { check( RTL_TEXTENCODING_APPLE_JAPANESE, RTL_TEXTENCODING_DONTKNOW ); } - +#endif +#if WITH_LOCALE_ALL || WITH_LOCALE_ko void UnixCharsetFromTextEncoding_APPLE_KOREAN() { check( RTL_TEXTENCODING_APPLE_KOREAN, RTL_TEXTENCODING_DONTKNOW ); } - +#endif void UnixCharsetFromTextEncoding_MS_932() { check( RTL_TEXTENCODING_MS_932, RTL_TEXTENCODING_DONTKNOW ); @@ -754,12 +772,13 @@ namespace { check( RTL_TEXTENCODING_MS_950, RTL_TEXTENCODING_DONTKNOW ); } - +#if WITH_LOCALE_ALL || WITH_LOCALE_ja void UnixCharsetFromTextEncoding_SHIFT_JIS() { check( RTL_TEXTENCODING_SHIFT_JIS, RTL_TEXTENCODING_DONTKNOW ); } - +#endif +#if WITH_LOCALE_ALL || WITH_LOCALE_zh void UnixCharsetFromTextEncoding_GB_2312() { check( RTL_TEXTENCODING_GB_2312, RTL_TEXTENCODING_DONTKNOW ); @@ -779,12 +798,14 @@ namespace { check( RTL_TEXTENCODING_BIG5, RTL_TEXTENCODING_DONTKNOW ); } - +#endif +#if WITH_LOCALE_ALL || WITH_LOCALE_ja void UnixCharsetFromTextEncoding_EUC_JP() { check( RTL_TEXTENCODING_EUC_JP, RTL_TEXTENCODING_DONTKNOW ); } - +#endif +#if WITH_LOCALE_ALL || WITH_LOCALE_zh void UnixCharsetFromTextEncoding_EUC_CN() { check( RTL_TEXTENCODING_EUC_CN, RTL_TEXTENCODING_DONTKNOW ); @@ -794,17 +815,19 @@ namespace { check( RTL_TEXTENCODING_EUC_TW, RTL_TEXTENCODING_DONTKNOW ); } - +#endif +#if WITH_LOCALE_ALL || WITH_LOCALE_ja void UnixCharsetFromTextEncoding_ISO_2022_JP() { check( RTL_TEXTENCODING_ISO_2022_JP, RTL_TEXTENCODING_DONTKNOW ); } - +#endif +#if WITH_LOCALE_ALL || WITH_LOCALE_zh void UnixCharsetFromTextEncoding_ISO_2022_CN() { check( RTL_TEXTENCODING_ISO_2022_CN, RTL_TEXTENCODING_DONTKNOW ); } - +#endif void UnixCharsetFromTextEncoding_KOI8_R() { check( RTL_TEXTENCODING_KOI8_R, RTL_TEXTENCODING_KOI8_R ); @@ -829,7 +852,7 @@ namespace { check( RTL_TEXTENCODING_ISO_8859_13, RTL_TEXTENCODING_ISO_8859_13 ); } - +#if WITH_LOCALE_ALL || WITH_LOCALE_ko void UnixCharsetFromTextEncoding_EUC_KR() { check( RTL_TEXTENCODING_EUC_KR, RTL_TEXTENCODING_DONTKNOW ); @@ -839,7 +862,8 @@ namespace { check( RTL_TEXTENCODING_ISO_2022_KR, RTL_TEXTENCODING_DONTKNOW ); } - +#endif +#if WITH_LOCALE_ALL || WITH_LOCALE_ja void UnixCharsetFromTextEncoding_JIS_X_0201() { check( RTL_TEXTENCODING_JIS_X_0201, RTL_TEXTENCODING_DONTKNOW ); @@ -854,12 +878,12 @@ namespace { check( RTL_TEXTENCODING_JIS_X_0212, RTL_TEXTENCODING_DONTKNOW ); } - +#endif void UnixCharsetFromTextEncoding_MS_1361() { check( RTL_TEXTENCODING_MS_1361, RTL_TEXTENCODING_DONTKNOW ); } - +#if WITH_LOCALE_ALL || WITH_LOCALE_zh void UnixCharsetFromTextEncoding_GB_18030() { check( RTL_TEXTENCODING_GB_18030, RTL_TEXTENCODING_GBK ); @@ -869,7 +893,7 @@ namespace { check( RTL_TEXTENCODING_BIG5_HKSCS, RTL_TEXTENCODING_DONTKNOW ); } - +#endif void UnixCharsetFromTextEncoding_TIS_620() { check( RTL_TEXTENCODING_TIS_620, RTL_TEXTENCODING_ISO_8859_1 ); @@ -929,37 +953,61 @@ namespace CPPUNIT_TEST( UnixCharsetFromTextEncoding_APPLE_ROMANIAN ); CPPUNIT_TEST( UnixCharsetFromTextEncoding_APPLE_TURKISH ); CPPUNIT_TEST( UnixCharsetFromTextEncoding_APPLE_UKRAINIAN ); +#if WITH_LOCALE_ALL || WITH_LOCALE_zh CPPUNIT_TEST( UnixCharsetFromTextEncoding_APPLE_CHINSIMP ); CPPUNIT_TEST( UnixCharsetFromTextEncoding_APPLE_CHINTRAD ); +#endif +#if WITH_LOCALE_ALL || WITH_LOCALE_ja CPPUNIT_TEST( UnixCharsetFromTextEncoding_APPLE_JAPANESE ); +#endif +#if WITH_LOCALE_ALL || WITH_LOCALE_ko CPPUNIT_TEST( UnixCharsetFromTextEncoding_APPLE_KOREAN ); +#endif CPPUNIT_TEST( UnixCharsetFromTextEncoding_MS_932 ); CPPUNIT_TEST( UnixCharsetFromTextEncoding_MS_936 ); CPPUNIT_TEST( UnixCharsetFromTextEncoding_MS_949 ); CPPUNIT_TEST( UnixCharsetFromTextEncoding_MS_950 ); +#if WITH_LOCALE_ALL || WITH_LOCALE_ja CPPUNIT_TEST( UnixCharsetFromTextEncoding_SHIFT_JIS ); +#endif +#if WITH_LOCALE_ALL || WITH_LOCALE_zh CPPUNIT_TEST( UnixCharsetFromTextEncoding_GB_2312 ); CPPUNIT_TEST( UnixCharsetFromTextEncoding_GBT_12345 ); CPPUNIT_TEST( UnixCharsetFromTextEncoding_GBK ); CPPUNIT_TEST( UnixCharsetFromTextEncoding_BIG5 ); +#endif +#if WITH_LOCALE_ALL || WITH_LOCALE_ja CPPUNIT_TEST( UnixCharsetFromTextEncoding_EUC_JP ); +#endif +#if WITH_LOCALE_ALL || WITH_LOCALE_zh CPPUNIT_TEST( UnixCharsetFromTextEncoding_EUC_CN ); CPPUNIT_TEST( UnixCharsetFromTextEncoding_EUC_TW ); +#endif +#if WITH_LOCALE_ALL || WITH_LOCALE_ja CPPUNIT_TEST( UnixCharsetFromTextEncoding_ISO_2022_JP ); +#endif +#if WITH_LOCALE_ALL || WITH_LOCALE_zh CPPUNIT_TEST( UnixCharsetFromTextEncoding_ISO_2022_CN ); +#endif CPPUNIT_TEST( UnixCharsetFromTextEncoding_KOI8_R ); CPPUNIT_TEST( UnixCharsetFromTextEncoding_UTF7 ); CPPUNIT_TEST( UnixCharsetFromTextEncoding_UTF8 ); CPPUNIT_TEST( UnixCharsetFromTextEncoding_ISO_8859_10 ); CPPUNIT_TEST( UnixCharsetFromTextEncoding_ISO_8859_13 ); +#if WITH_LOCALE_ALL || WITH_LOCALE_ko CPPUNIT_TEST( UnixCharsetFromTextEncoding_EUC_KR ); CPPUNIT_TEST( UnixCharsetFromTextEncoding_ISO_2022_KR ); +#endif +#if WITH_LOCALE_ALL || WITH_LOCALE_ja CPPUNIT_TEST( UnixCharsetFromTextEncoding_JIS_X_0201 ); CPPUNIT_TEST( UnixCharsetFromTextEncoding_JIS_X_0208 ); CPPUNIT_TEST( UnixCharsetFromTextEncoding_JIS_X_0212 ); +#endif CPPUNIT_TEST( UnixCharsetFromTextEncoding_MS_1361 ); +#if WITH_LOCALE_ALL || WITH_LOCALE_zh CPPUNIT_TEST( UnixCharsetFromTextEncoding_GB_18030 ); CPPUNIT_TEST( UnixCharsetFromTextEncoding_BIG5_HKSCS ); +#endif CPPUNIT_TEST( UnixCharsetFromTextEncoding_TIS_620 ); CPPUNIT_TEST( UnixCharsetFromTextEncoding_KOI8_U ); diff --git a/sal/qa/rtl/textenc/rtl_textcvt.cxx b/sal/qa/rtl/textenc/rtl_textcvt.cxx index b9e67bc0fd51..2a40d3a2b083 100644 --- a/sal/qa/rtl/textenc/rtl_textcvt.cxx +++ b/sal/qa/rtl/textenc/rtl_textcvt.cxx @@ -17,6 +17,8 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ +#include <config_locales.h> + #include "sal/config.h" #include <cstddef> @@ -1297,6 +1299,7 @@ void Test::testComplex() { true, false, RTL_UNICODETOTEXT_FLAGS_UNDEFINED_ERROR }, +#if WITH_LOCALE_ALL || WITH_LOCALE_zh { RTL_TEXTENCODING_EUC_CN, RTL_CONSTASCII_STRINGPARAM("\x01\"3De$~\xA1\xB9\xF0\xC5"), { 0x0001,0x0022,0x0033,0x0044,0x0065,0x0024,0x007E, @@ -1376,6 +1379,8 @@ void Test::testComplex() { false, false, RTL_UNICODETOTEXT_FLAGS_UNDEFINED_ERROR }, +#endif +#if WITH_LOCALE_ALL || WITH_LOCALE_ja { RTL_TEXTENCODING_ISO_2022_JP, RTL_CONSTASCII_STRINGPARAM("\x01\"3De$\\~"), { 0x0001,0x0022,0x0033,0x0044,0x0065,0x0024,0x005C,0x007E }, @@ -1412,6 +1417,8 @@ void Test::testComplex() { true, false, RTL_UNICODETOTEXT_FLAGS_UNDEFINED_ERROR }, +#endif +#if WITH_LOCALE_ALL || WITH_LOCALE_ko { RTL_TEXTENCODING_ISO_2022_KR, RTL_CONSTASCII_STRINGPARAM("\x1B$)C\x01\"3De$\\~"), { 0x0001,0x0022,0x0033,0x0044,0x0065,0x0024,0x005C,0x007E }, @@ -1431,6 +1438,8 @@ void Test::testComplex() { true, false, RTL_UNICODETOTEXT_FLAGS_UNDEFINED_ERROR }, +#endif +#if WITH_LOCALE_ALL || WITH_LOCALE_zh { RTL_TEXTENCODING_ISO_2022_CN, RTL_CONSTASCII_STRINGPARAM( "\x01\"3De$\\~\x1B$)G\x0E\x45\x70\x1B$*H\x1BN\x22\x22" @@ -1455,6 +1464,7 @@ void Test::testComplex() { true, false, RTL_UNICODETOTEXT_FLAGS_UNDEFINED_ERROR }, +#endif // The following does not work as long as Big5-HKSCS maps to // Unicode PUA instead of Plane 2. Use the next two tests // instead: @@ -1469,6 +1479,7 @@ void Test::testComplex() { // true, // false, // RTL_UNICODETOTEXT_FLAGS_UNDEFINED_ERROR }, +#if WITH_LOCALE_ALL || WITH_LOCALE_zh { RTL_TEXTENCODING_BIG5_HKSCS, RTL_CONSTASCII_STRINGPARAM( "\x01\"3De$~\x88\x56\xF9\xFE\xFA\x5E\xA1\x40\xF9\xD5"), @@ -1588,6 +1599,7 @@ void Test::testComplex() { true, false, RTL_UNICODETOTEXT_FLAGS_UNDEFINED_ERROR }, +#endif { RTL_TEXTENCODING_MS_950, RTL_CONSTASCII_STRINGPARAM( "\xC6\xA1\xC6\xFE\xC7\x40\xC7\x7E\xC7\xA1\xC7\xFE\xC8\x40" @@ -1632,6 +1644,7 @@ void Test::testComplex() { true, false, RTL_UNICODETOTEXT_FLAGS_UNDEFINED_ERROR }, +#if WITH_LOCALE_ALL || WITH_LOCALE_zh { RTL_TEXTENCODING_GB_18030, RTL_CONSTASCII_STRINGPARAM("\x95\x39\xC5\x37"), { 0xD849,0xDD13 }, @@ -1662,6 +1675,7 @@ void Test::testComplex() { true, false, RTL_UNICODETOTEXT_FLAGS_UNDEFINED_ERROR }, +#endif { RTL_TEXTENCODING_MS_936, RTL_CONSTASCII_STRINGPARAM("\xFD\x7C\xC1\xFA\xFD\x9B"), { 0x9F76,0x9F99,0x9FA5 }, @@ -1671,6 +1685,7 @@ void Test::testComplex() { true, false, RTL_UNICODETOTEXT_FLAGS_UNDEFINED_ERROR }, +#if WITH_LOCALE_ALL || WITH_LOCALE_zh { RTL_TEXTENCODING_GBK, RTL_CONSTASCII_STRINGPARAM( "\xFE\x50\xFE\x54\xFE\x55\xFE\x56" @@ -1700,6 +1715,8 @@ void Test::testComplex() { true, false, RTL_UNICODETOTEXT_FLAGS_UNDEFINED_ERROR }, +#endif +#if WITH_LOCALE_ALL || WITH_LOCALE_ja { RTL_TEXTENCODING_EUC_JP, RTL_CONSTASCII_STRINGPARAM("?"), { 0xFF0D }, @@ -1709,7 +1726,7 @@ void Test::testComplex() { true, false, RTL_UNICODETOTEXT_FLAGS_UNDEFINED_QUESTIONMARK }, - +#endif // Test of "JIS X 0208 row 13" (taken from CP932; added to // ISO-2022-JP and EUC-JP; 74 of the 83 characters introduce // mappings to new Unicode characters): @@ -1743,6 +1760,7 @@ void Test::testComplex() { false, false, RTL_UNICODETOTEXT_FLAGS_UNDEFINED_ERROR }, +#if WITH_LOCALE_ALL || WITH_LOCALE_ja { RTL_TEXTENCODING_SHIFT_JIS, RTL_CONSTASCII_STRINGPARAM( "\x87\x40\x87\x41\x87\x42\x87\x43\x87\x44\x87\x45\x87\x46" @@ -1900,7 +1918,7 @@ void Test::testComplex() { true, false, RTL_UNICODETOTEXT_FLAGS_UNDEFINED_ERROR }, - +#endif // Test ISO-8859-x/MS-125x range 0x80--9F: { RTL_TEXTENCODING_ISO_8859_1, @@ -2216,6 +2234,7 @@ void Test::testComplex() { true, false, RTL_UNICODETOTEXT_FLAGS_UNDEFINED_ERROR }, +#if WITH_LOCALE_ALL || WITH_LOCALE_ko { RTL_TEXTENCODING_EUC_KR, RTL_CONSTASCII_STRINGPARAM( "\xB0\xA1\xB0\xA2" "\xB0\xA3" @@ -2260,7 +2279,7 @@ void Test::testComplex() { true, false, RTL_UNICODETOTEXT_FLAGS_UNDEFINED_ERROR }, - +#endif // Test UTF-8: { RTL_TEXTENCODING_UTF8, @@ -2361,8 +2380,8 @@ void Test::testComplex() { true, RTL_UNICODETOTEXT_FLAGS_UNDEFINED_ERROR }, +#if WITH_LOCALE_ALL || WITH_LOCALE_ja // Bug #112949#: - { RTL_TEXTENCODING_SHIFT_JIS, RTL_CONSTASCII_STRINGPARAM("\x81\x63"), { 0x2026 }, @@ -2390,6 +2409,7 @@ void Test::testComplex() { true, false, RTL_UNICODETOTEXT_FLAGS_UNDEFINED_IGNORE }, +#endif { RTL_TEXTENCODING_MS_932, RTL_CONSTASCII_STRINGPARAM("\x81\x63"), { 0x2026 }, @@ -2474,6 +2494,7 @@ void Test::testComplex() { false, RTL_UNICODETOTEXT_FLAGS_UNDEFINED_ERROR }, +#if WITH_LOCALE_ALL || WITH_LOCALE_ja // Bug #i62310#: { RTL_TEXTENCODING_SHIFT_JIS, RTL_CONSTASCII_STRINGPARAM( @@ -2485,7 +2506,7 @@ void Test::testComplex() { true, false, RTL_UNICODETOTEXT_FLAGS_UNDEFINED_ERROR }, - +#endif // Bug #i73103#: { RTL_TEXTENCODING_MS_1258, RTL_CONSTASCII_STRINGPARAM( @@ -2508,6 +2529,7 @@ void Test::testComplex() { true, false, RTL_UNICODETOTEXT_FLAGS_UNDEFINED_ERROR }, +#if WITH_LOCALE_ALL || WITH_LOCALE_FOR_SCRIPT_Deva { RTL_TEXTENCODING_ISCII_DEVANAGARI, RTL_CONSTASCII_STRINGPARAM( "\xD7\xE6\x20\xD4\xCF\xE8\xD6\x20" @@ -2545,6 +2567,7 @@ void Test::testComplex() { true, false, RTL_UNICODETOTEXT_FLAGS_UNDEFINED_ERROR } +#endif }; for (std::size_t i = 0; i < SAL_N_ELEMENTS(data); ++i) { doComplexCharSetTest(data[i]); @@ -2553,7 +2576,9 @@ void Test::testComplex() { void Test::testComplexCut() { static ComplexCharSetTest const data[] - = { { RTL_TEXTENCODING_EUC_JP, + = { +#if WITH_LOCALE_ALL || WITH_LOCALE_ja + { RTL_TEXTENCODING_EUC_JP, RTL_CONSTASCII_STRINGPARAM("\xA1"), { 0 }, 0, @@ -2589,6 +2614,8 @@ void Test::testComplexCut() { false, false, RTL_UNICODETOTEXT_FLAGS_UNDEFINED_ERROR }, +#endif +#if WITH_LOCALE_ALL || WITH_LOCALE_zh { RTL_TEXTENCODING_EUC_CN, RTL_CONSTASCII_STRINGPARAM("\xA1"), { 0 }, @@ -2597,7 +2624,9 @@ void Test::testComplexCut() { true, false, false, - RTL_UNICODETOTEXT_FLAGS_UNDEFINED_ERROR } /* , + RTL_UNICODETOTEXT_FLAGS_UNDEFINED_ERROR }, +#endif +/* , { RTL_TEXTENCODING_EUC_TW, RTL_CONSTASCII_STRINGPARAM("\xA1"), { 0 }, @@ -2884,31 +2913,41 @@ void Test::testInfo() { bool value; }; static Data const data[] = { - { RTL_TEXTENCODING_APPLE_CHINTRAD, RTL_TEXTENCODING_INFO_ASCII, false }, +#if WITH_LOCALE_ALL || WITH_LOCALE_ja { RTL_TEXTENCODING_APPLE_JAPANESE, RTL_TEXTENCODING_INFO_ASCII, false }, + { RTL_TEXTENCODING_EUC_JP, RTL_TEXTENCODING_INFO_ASCII, true }, + { RTL_TEXTENCODING_ISO_2022_JP, RTL_TEXTENCODING_INFO_CONTEXT, true }, + { RTL_TEXTENCODING_ISO_2022_JP, RTL_TEXTENCODING_INFO_ASCII, false }, + { RTL_TEXTENCODING_SHIFT_JIS, RTL_TEXTENCODING_INFO_ASCII, false }, +#endif +#if WITH_LOCALE_ALL || WITH_LOCALE_ko { RTL_TEXTENCODING_APPLE_KOREAN, RTL_TEXTENCODING_INFO_ASCII, false }, + { RTL_TEXTENCODING_EUC_KR, RTL_TEXTENCODING_INFO_ASCII, true }, + { RTL_TEXTENCODING_ISO_2022_KR, RTL_TEXTENCODING_INFO_CONTEXT, true }, + { RTL_TEXTENCODING_ISO_2022_KR, RTL_TEXTENCODING_INFO_ASCII, false }, +#endif +#if WITH_LOCALE_ALL || WITH_LOCALE_zh + { RTL_TEXTENCODING_APPLE_CHINTRAD, RTL_TEXTENCODING_INFO_ASCII, false }, { RTL_TEXTENCODING_BIG5, RTL_TEXTENCODING_INFO_ASCII, false }, { RTL_TEXTENCODING_BIG5_HKSCS, RTL_TEXTENCODING_INFO_ASCII, false }, { RTL_TEXTENCODING_EUC_CN, RTL_TEXTENCODING_INFO_ASCII, true }, - { RTL_TEXTENCODING_EUC_JP, RTL_TEXTENCODING_INFO_ASCII, true }, - { RTL_TEXTENCODING_EUC_KR, RTL_TEXTENCODING_INFO_ASCII, true }, { RTL_TEXTENCODING_EUC_TW, RTL_TEXTENCODING_INFO_ASCII, true }, { RTL_TEXTENCODING_GBK, RTL_TEXTENCODING_INFO_ASCII, false }, { RTL_TEXTENCODING_GB_18030, RTL_TEXTENCODING_INFO_ASCII, false }, { RTL_TEXTENCODING_GB_18030, RTL_TEXTENCODING_INFO_UNICODE, true }, { RTL_TEXTENCODING_ISO_2022_CN, RTL_TEXTENCODING_INFO_CONTEXT, true }, { RTL_TEXTENCODING_ISO_2022_CN, RTL_TEXTENCODING_INFO_ASCII, false }, - { RTL_TEXTENCODING_ISO_2022_JP, RTL_TEXTENCODING_INFO_CONTEXT, true }, - { RTL_TEXTENCODING_ISO_2022_JP, RTL_TEXTENCODING_INFO_ASCII, false }, - { RTL_TEXTENCODING_ISO_2022_KR, RTL_TEXTENCODING_INFO_CONTEXT, true }, - { RTL_TEXTENCODING_ISO_2022_KR, RTL_TEXTENCODING_INFO_ASCII, false }, +#endif +#if WITH_LOCALE_ALL || WITH_LOCALE_FOR_SCRIPT_Deva + { RTL_TEXTENCODING_ISCII_DEVANAGARI, RTL_TEXTENCODING_INFO_ASCII, true }, + { RTL_TEXTENCODING_ISCII_DEVANAGARI, RTL_TEXTENCODING_INFO_MIME, false }, +#endif { RTL_TEXTENCODING_MS_1361, RTL_TEXTENCODING_INFO_ASCII, false }, { RTL_TEXTENCODING_MS_874, RTL_TEXTENCODING_INFO_ASCII, true }, { RTL_TEXTENCODING_MS_932, RTL_TEXTENCODING_INFO_ASCII, false }, { RTL_TEXTENCODING_MS_936, RTL_TEXTENCODING_INFO_ASCII, false }, { RTL_TEXTENCODING_MS_949, RTL_TEXTENCODING_INFO_ASCII, false }, { RTL_TEXTENCODING_MS_950, RTL_TEXTENCODING_INFO_ASCII, false }, - { RTL_TEXTENCODING_SHIFT_JIS, RTL_TEXTENCODING_INFO_ASCII, false }, { RTL_TEXTENCODING_KOI8_R, RTL_TEXTENCODING_INFO_ASCII, true }, { RTL_TEXTENCODING_KOI8_R, RTL_TEXTENCODING_INFO_MIME, true }, { RTL_TEXTENCODING_KOI8_U, RTL_TEXTENCODING_INFO_ASCII, true }, @@ -2917,8 +2956,6 @@ void Test::testInfo() { { RTL_TEXTENCODING_IBM_861, RTL_TEXTENCODING_INFO_MIME, true }, { RTL_TEXTENCODING_IBM_863, RTL_TEXTENCODING_INFO_MIME, true }, { RTL_TEXTENCODING_IBM_865, RTL_TEXTENCODING_INFO_MIME, true }, - { RTL_TEXTENCODING_ISCII_DEVANAGARI, RTL_TEXTENCODING_INFO_ASCII, true }, - { RTL_TEXTENCODING_ISCII_DEVANAGARI, RTL_TEXTENCODING_INFO_MIME, false }, { RTL_TEXTENCODING_ADOBE_STANDARD, RTL_TEXTENCODING_INFO_ASCII, false }, { RTL_TEXTENCODING_ADOBE_STANDARD, RTL_TEXTENCODING_INFO_MIME, true }, { RTL_TEXTENCODING_ADOBE_STANDARD, RTL_TEXTENCODING_INFO_SYMBOL, false }, diff --git a/sal/qa/rtl/uri/rtl_testuri.cxx b/sal/qa/rtl/uri/rtl_testuri.cxx index de239a4acaf4..3769062a1316 100644 --- a/sal/qa/rtl/uri/rtl_testuri.cxx +++ b/sal/qa/rtl/uri/rtl_testuri.cxx @@ -17,6 +17,8 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ +#include <config_locales.h> + #include "rtl/strbuf.hxx" #include "rtl/uri.hxx" #include "rtl/ustrbuf.hxx" @@ -395,6 +397,7 @@ void Test::test_Uri() { aText2, rtl_UriDecodeWithCharset, RTL_TEXTENCODING_ISO_8859_5) == aText1)); } +#if WITH_LOCALE_ALL || WITH_LOCALE_zh { sal_Unicode const aText1U[] = { ' ', '!', 0x028A, 0xD849, 0xDD13, 0 }; aText1 = rtl::OUString(aText1U); @@ -411,7 +414,7 @@ void Test::test_Uri() { aText2, rtl_UriDecodeWithCharset, RTL_TEXTENCODING_GB_18030) == aText1)); } - +#endif // Check strict mode: { @@ -434,6 +437,7 @@ void Test::test_Uri() { aText1, rtl_UriDecodeStrict, RTL_TEXTENCODING_UTF8) == aText2)); } +#if WITH_LOCALE_ALL || WITH_LOCALE_zh { aText1 = rtl::OUString("%81 "); aText2 = rtl::OUString(); @@ -472,7 +476,7 @@ void Test::test_Uri() { aText1, rtl_UriDecodeStrict, RTL_TEXTENCODING_GB_18030) == aText2)); } - +#endif // Check rtl_UriEncodeStrictKeepEscapes mode: { diff --git a/sal/textenc/tables.cxx b/sal/textenc/tables.cxx index 0d5eaf0a75f0..1c8462c53523 100644 --- a/sal/textenc/tables.cxx +++ b/sal/textenc/tables.cxx @@ -17,6 +17,8 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ +#include <config_locales.h> + #include "sal/config.h" #include <cassert> @@ -158,48 +160,101 @@ extern "C" SAL_DLLPUBLIC_EXPORT ImplTextEncodingData const * NULL, /* TODO! APPLE_THAI */ &aImplAPPLETURKISHTextEncodingData, /* APPLE_TURKISH */ &aImplAPPLEUKRAINIANTextEncodingData, /* APPLE_UKRAINIAN */ +#if WITH_LOCALE_ALL || WITH_LOCALE_zh &aImplAPPLECHINSIMPTextEncodingData, /* APPLE_CHINSIMP */ &aImplAPPLECHINTRADTextEncodingData, /* APPLE_CHINTRAD */ +#else + NULL, + NULL, +#endif +#if WITH_LOCALE_ALL || WITH_LOCALE_ja &aImplAPPLEJAPANESETextEncodingData, /* APPLE_JAPANESE */ +#else + NULL, +#endif +#if WITH_LOCALE_ALL || WITH_LOCALE_ko &aImplAPPLEKOREANTextEncodingData, /* APPLE_KOREAN */ +#else + NULL, +#endif &aImplMS932TextEncodingData, /* MS_932 */ &aImplMS936TextEncodingData, /* MS_936 */ &aImplMS949TextEncodingData, /* MS_949 */ &aImplMS950TextEncodingData, /* MS_950 */ +#if WITH_LOCALE_ALL || WITH_LOCALE_ja &aImplSJISTextEncodingData, /* SHIFT_JIS */ +#else + NULL, +#endif +#if WITH_LOCALE_ALL || WITH_LOCALE_zh &aImplGB2312TextEncodingData, /* GB_2312 */ &aImplGBT12345TextEncodingData, /* GBT_12345 */ &aImplGBKTextEncodingData, /* GBK */ &aImplBIG5TextEncodingData, /* BIG5 */ -#ifndef IOS +#else + NULL, + NULL, + NULL, + NULL, +#endif +#if WITH_LOCALE_ALL || WITH_LOCALE_ja &aImplEUCJPTextEncodingData, /* EUC_JP */ +#else + NULL, +#endif +#if WITH_LOCALE_ALL || WITH_LOCALE_zh &aImplEUCCNTextEncodingData, /* EUC_CN */ &aImplEucTwTextEncodingData, /* EUC_TW */ +#else + NULL, + NULL, +#endif +#if WITH_LOCALE_ALL || WITH_LOCALE_ja &aImplIso2022JpTextEncodingData, /* ISO_2022_JP */ +#else + NULL, +#endif +#if WITH_LOCALE_ALL || WITH_LOCALE_zh &aImplIso2022CnTextEncodingData, /* ISO_2022_CN */ #else - NULL, /* EUC_JP */ - NULL, /* EUC_CN */ - NULL, /* EUC_TW */ - NULL, /* ISO_2022_JP */ - NULL, /* ISO_2022_CN */ + NULL, #endif &aImplKOI8RTextEncodingData, /* KOI8_R */ &aImplUTF7TextEncodingData, /* UTF7 */ NULL, /* UTF8, see above */ &aImplISO885910TextEncodingData, /* ISO_8859_10 */ &aImplISO885913TextEncodingData, /* ISO_8859_13 */ +#if WITH_LOCALE_ALL || WITH_LOCALE_ko &aImplEUCKRTextEncodingData, /* EUC_KR */ &aImplIso2022KrTextEncodingData, /* ISO_2022_KR */ +#else + NULL, + NULL, +#endif +#if WITH_LOCALE_ALL || WITH_LOCALE_ja &aImplJISX0201TextEncodingData, /* JIS_X_0201 */ &aImplJISX0208TextEncodingData, /* JIS_X_0208 */ &aImplJISX0212TextEncodingData, /* JIS_X_0212 */ +#else + NULL, + NULL, + NULL, +#endif &aImplMS1361TextEncodingData, /* MS_1361 */ +#if WITH_LOCALE_ALL || WITH_LOCALE_zh &aImplGb18030TextEncodingData, /* GB_18030 */ &aImplBig5HkscsTextEncodingData, /* BIG5_HKSCS */ +#else + NULL, + NULL, +#endif &aImplTis620TextEncodingData, /* TIS_620 */ &aImplKoi8UTextEncodingData, /* KOI8_U */ +#if WITH_LOCALE_ALL || WITH_LOCALE_FOR_SCRIPT_Deva &aImplIsciiDevanagariTextEncodingData, /* ISCII_DEVANAGARI */ +#else + NULL, +#endif NULL, /* JAVA_UTF8, see above */ &adobeStandardEncodingData, /* ADOBE_STANDARD */ &adobeSymbolEncodingData, /* ADOBE_SYMBOL */ |