From addc791623288fae7832c78e0c2923937251d1f7 Mon Sep 17 00:00:00 2001 From: Mark Wielaard Date: Mon, 3 Jun 2013 09:35:25 +0200 Subject: Fix icu version checks. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit commit 30c303 "Make charmap.cxx compile with icu >= 4.4." was incomplete and had wrong version checks. After ICU 4.8 (4.8.1.1) the next version of ICU was 49 (49.1) so U_ICU_VERSION_MAJOR_NUM contains two digets (49), earlier that it was just one digit (4). The correct header to include to do version checks is unicode/uversion.h. USCRIPT_MANDAEAN is the old alias of USCRIPT_MANDAIC (same numeric value). U_JG_FARSI_YEH is only available since ICU 4.4. Note that on older icu versions (4.2.1) the 200B (ZWSP) Zero Width Space breakiterator testcase fails (others succeed). Change-Id: If73c1402239a28546077437e9382f0bd38642bad Reviewed-on: https://gerrit.libreoffice.org/4139 Reviewed-by: Luboš Luňák Tested-by: Luboš Luňák --- i18nutil/source/utility/unicode.cxx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'i18nutil') diff --git a/i18nutil/source/utility/unicode.cxx b/i18nutil/source/utility/unicode.cxx index 2c2dd421ca4e..b46a7f61b2c0 100644 --- a/i18nutil/source/utility/unicode.cxx +++ b/i18nutil/source/utility/unicode.cxx @@ -826,6 +826,9 @@ OString SAL_CALL unicode::getExemplerLanguageForUScriptCode(UScriptCode eScript) case USCRIPT_TAI_VIET: sRet = "blt"; break; + case USCRIPT_MANDAEAN: /* Aliased to USCRIPT_MANDAIC in icu 4.6. */ + sRet = "mic"; + break; #if (U_ICU_VERSION_MAJOR_NUM > 4) || (U_ICU_VERSION_MAJOR_NUM == 4 && U_ICU_VERSION_MINOR_NUM >= 4) case USCRIPT_NABATAEAN: //no language with an assigned code yet sRet = "mis"; @@ -833,9 +836,6 @@ OString SAL_CALL unicode::getExemplerLanguageForUScriptCode(UScriptCode eScript) case USCRIPT_PALMYRENE: //no language with an assigned code yet sRet = "mis"; break; - case USCRIPT_MANDAIC: - sRet = "mic"; - break; case USCRIPT_BAMUM: sRet = "bax"; break; -- cgit