* update (not-so-)optional package ICU to 4.8.1, which contains interesting stuff

for message formatting
* adjust LocaleKit to use namespace 'icu', as ICU has been configured to no longer
  use a version specific namespace
* adjust LocaleKit to general API changes in ICU 4.8
Note: all software using ICU (like WebPositive) needs to be rebuilt!
Note: the ICU package for PPC needs to be updated before it can be used!


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@42638 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Oliver Tappe
2011-08-18 22:13:06 +00:00
parent fcb8a5cb4e
commit 45f2f22b52
18 changed files with 72 additions and 76 deletions
+19 -10
View File
@@ -56,10 +56,12 @@ if $(HAIKU_BUILD_FEATURE_SSL) {
# ICU # ICU
# Note ICU isn't actually optional, but is still an external package # Note ICU isn't actually optional, but is still an external package
HAIKU_ICU_GCC_2_PACKAGE = icu-4.4.1-r1a3-x86-gcc2-2011-05-29.zip ; HAIKU_ICU_GCC_2_PACKAGE = icu-4.8.1-x86-gcc2-2011-08-18.zip ;
HAIKU_ICU_GCC_4_PACKAGE = icu-4.4.1-r1a3-x86-gcc4-2011-05-29.zip ; HAIKU_ICU_GCC_4_PACKAGE = icu-4.8.1-x86-gcc4-2011-08-18.zip ;
HAIKU_ICU_DEVEL_PACKAGE = icu-devel-4.8.1-2011-08-18.zip ;
# TODO: this needs to be upgraded before ICU can be used on PPC!
HAIKU_ICU_PPC_PACKAGE = icu-4.4.1-ppc-2010-08-17.zip ; HAIKU_ICU_PPC_PACKAGE = icu-4.4.1-ppc-2010-08-17.zip ;
HAIKU_ICU_DEVEL_PACKAGE = icu-devel-4.4.1-2010-07-26.zip ;
if $(TARGET_ARCH) = ppc { if $(TARGET_ARCH) = ppc {
local icu_package = $(HAIKU_ICU_PPC_PACKAGE) ; local icu_package = $(HAIKU_ICU_PPC_PACKAGE) ;
@@ -105,13 +107,20 @@ if $(TARGET_ARCH) = ppc {
# extract libraries # extract libraries
HAIKU_ICU_LIBS = [ ExtractArchive $(HAIKU_ICU_DIR) HAIKU_ICU_LIBS = [ ExtractArchive $(HAIKU_ICU_DIR)
: :
libicudata.so.44 libicudata.so.48
libicui18n.so.44 libicudata.so.48.1
libicuio.so.44 libicui18n.so.48
libicule.so.44 libicui18n.so.48.1
libiculx.so.44 libicuio.so.48
libicutu.so.44 libicuio.so.48.1
libicuuc.so.44 libicule.so.48
libicule.so.48.1
libiculx.so.48
libiculx.so.48.1
libicutu.so.48
libicutu.so.48.1
libicuuc.so.48
libicuuc.so.48.1
: $(zipFile) : $(zipFile)
: extracted-icu : extracted-icu
] ; ] ;
+3 -3
View File
@@ -1,5 +1,5 @@
/* /*
* Copyright 2003-2010, Haiku, Inc. * Copyright 2003-2011, Haiku, Inc.
* Distributed under the terms of the MIT Licence. * Distributed under the terms of the MIT Licence.
*/ */
#ifndef _COLLATOR_H_ #ifndef _COLLATOR_H_
@@ -10,7 +10,7 @@
#include <SupportDefs.h> #include <SupportDefs.h>
namespace icu_44 { namespace icu {
class Collator; class Collator;
class RuleBasedCollator; class RuleBasedCollator;
}; };
@@ -75,7 +75,7 @@ public:
private: private:
status_t _SetStrength(int8 strength) const; status_t _SetStrength(int8 strength) const;
mutable icu_44::Collator* fICUCollator; mutable icu::Collator* fICUCollator;
int8 fDefaultStrength; int8 fDefaultStrength;
bool fIgnorePunctuation; bool fIgnorePunctuation;
}; };
+3 -3
View File
@@ -1,5 +1,5 @@
/* /*
* Copyright 2003-2010, Haiku, Inc. * Copyright 2003-2011, Haiku, Inc.
* Distributed under the terms of the MIT Licence. * Distributed under the terms of the MIT Licence.
*/ */
#ifndef _COUNTRY_H_ #ifndef _COUNTRY_H_
@@ -16,7 +16,7 @@ class BBitmap;
class BLanguage; class BLanguage;
class BMessage; class BMessage;
namespace icu_44 { namespace icu {
class DateFormat; class DateFormat;
class Locale; class Locale;
} }
@@ -45,7 +45,7 @@ public:
private: private:
friend class Private; friend class Private;
icu_44::Locale* fICULocale; icu::Locale* fICULocale;
}; };
+3 -3
View File
@@ -1,5 +1,5 @@
/* /*
* Copyright 2010, Haiku, Inc. * Copyright 2010-2011, Haiku, Inc.
* Distributed under the terms of the MIT License. * Distributed under the terms of the MIT License.
*/ */
#ifndef _B_DURATION_FORMAT_H_ #ifndef _B_DURATION_FORMAT_H_
@@ -13,7 +13,7 @@
class BTimeZone; class BTimeZone;
namespace icu_44 { namespace icu {
class GregorianCalendar; class GregorianCalendar;
} }
@@ -42,7 +42,7 @@ public:
private: private:
BString fSeparator; BString fSeparator;
BTimeUnitFormat fTimeUnitFormat; BTimeUnitFormat fTimeUnitFormat;
icu_44::GregorianCalendar* fCalendar; icu::GregorianCalendar* fCalendar;
}; };
+3 -3
View File
@@ -1,5 +1,5 @@
/* /*
* Copyright 2003-2010, Haiku, Inc. * Copyright 2003-2011, Haiku, Inc.
* Distributed under the terms of the MIT Licence. * Distributed under the terms of the MIT Licence.
*/ */
#ifndef _FORMATTING_CONVENTIONS_H_ #ifndef _FORMATTING_CONVENTIONS_H_
@@ -17,7 +17,7 @@ class BBitmap;
class BLanguage; class BLanguage;
class BMessage; class BMessage;
namespace icu_44 { namespace icu {
class DateFormat; class DateFormat;
class Locale; class Locale;
} }
@@ -122,7 +122,7 @@ private:
bool fUseStringsFromPreferredLanguage; bool fUseStringsFromPreferredLanguage;
icu_44::Locale* fICULocale; icu::Locale* fICULocale;
}; };
+2 -2
View File
@@ -15,7 +15,7 @@ class BBitmap;
// We must not include the icu headers in there as it could mess up binary // We must not include the icu headers in there as it could mess up binary
// compatibility. // compatibility.
namespace icu_44 { namespace icu {
class Locale; class Locale;
} }
@@ -64,7 +64,7 @@ private:
friend class Private; friend class Private;
uint8 fDirection; uint8 fDirection;
icu_44::Locale* fICULocale; icu::Locale* fICULocale;
}; };
+4 -4
View File
@@ -1,5 +1,5 @@
/* /*
* Copyright 2003-2010, Haiku, Inc. * Copyright 2003-2011, Haiku, Inc.
* Distributed under the terms of the MIT License. * Distributed under the terms of the MIT License.
*/ */
#ifndef _B_LOCALE_H_ #ifndef _B_LOCALE_H_
@@ -12,7 +12,7 @@
#include <Locker.h> #include <Locker.h>
namespace icu_44 { namespace icu {
class DateFormat; class DateFormat;
} }
@@ -145,9 +145,9 @@ public:
BString* sortKey) const; BString* sortKey) const;
private: private:
icu_44::DateFormat* _CreateDateFormatter( icu::DateFormat* _CreateDateFormatter(
const BString& format) const; const BString& format) const;
icu_44::DateFormat* _CreateTimeFormatter( icu::DateFormat* _CreateTimeFormatter(
const BString& format) const; const BString& format) const;
mutable BLocker fLock; mutable BLocker fLock;
+3 -3
View File
@@ -1,5 +1,5 @@
/* /*
* Copyright 2010, Haiku, Inc. * Copyright 2010-2011, Haiku, Inc.
* Distributed under the terms of the MIT License. * Distributed under the terms of the MIT License.
*/ */
#ifndef _B_TIME_UNIT_FORMAT_H_ #ifndef _B_TIME_UNIT_FORMAT_H_
@@ -12,7 +12,7 @@
class BString; class BString;
namespace icu_44 { namespace icu {
class TimeUnitFormat; class TimeUnitFormat;
} }
@@ -53,7 +53,7 @@ public:
) const; ) const;
private: private:
icu_44::TimeUnitFormat* fFormatter; icu::TimeUnitFormat* fFormatter;
}; };
+4 -4
View File
@@ -1,5 +1,5 @@
/* /*
* Copyright 2010, Haiku, Inc. All rights reserved. * Copyright 2010-2011, Haiku, Inc. All rights reserved.
* Distributed under the terms of the MIT License. * Distributed under the terms of the MIT License.
*/ */
#ifndef _TIME_ZONE_H #ifndef _TIME_ZONE_H
@@ -9,7 +9,7 @@
#include <String.h> #include <String.h>
namespace icu_44 { namespace icu {
class Locale; class Locale;
class TimeZone; class TimeZone;
} }
@@ -46,8 +46,8 @@ public:
private: private:
friend class Private; friend class Private;
icu_44::TimeZone* fICUTimeZone; icu::TimeZone* fICUTimeZone;
icu_44::Locale* fICULocale; icu::Locale* fICULocale;
status_t fInitStatus; status_t fInitStatus;
mutable uint32 fInitializedFields; mutable uint32 fInitializedFields;
@@ -1,5 +1,5 @@
/* /*
* Copyright 2010, Oliver Tappe <[email protected]> * Copyright 2010-2011, Oliver Tappe <[email protected]>
* Distributed under the terms of the MIT License. * Distributed under the terms of the MIT License.
*/ */
#ifndef _FORMATTING_CONVENTIONS_PRIVATE_H #ifndef _FORMATTING_CONVENTIONS_PRIVATE_H
@@ -23,7 +23,7 @@ public:
fFormattingConventions = conventions; fFormattingConventions = conventions;
} }
icu_44::Locale* icu::Locale*
ICULocale() ICULocale()
{ {
return fFormattingConventions->fICULocale; return fFormattingConventions->fICULocale;
+2 -2
View File
@@ -1,5 +1,5 @@
/* /*
* Copyright 2010, Oliver Tappe <[email protected]> * Copyright 2010-2011, Oliver Tappe <[email protected]>
* Distributed under the terms of the MIT License. * Distributed under the terms of the MIT License.
*/ */
#ifndef _LANGUAGE_PRIVATE_H #ifndef _LANGUAGE_PRIVATE_H
@@ -23,7 +23,7 @@ public:
fLanguage = language; fLanguage = language;
} }
icu_44::Locale* icu::Locale*
ICULocale() ICULocale()
{ {
return fLanguage->fICULocale; return fLanguage->fICULocale;
+2 -2
View File
@@ -1,5 +1,5 @@
/* /*
* Copyright 2010, Oliver Tappe <[email protected]> * Copyright 2010-2011, Oliver Tappe <[email protected]>
* Distributed under the terms of the MIT License. * Distributed under the terms of the MIT License.
*/ */
#ifndef _TIME_ZONE_PRIVATE_H #ifndef _TIME_ZONE_PRIVATE_H
@@ -23,7 +23,7 @@ public:
fTimeZone = timeZone; fTimeZone = timeZone;
} }
icu_44::TimeZone* icu::TimeZone*
ICUTimeZone() ICUTimeZone()
{ {
return fTimeZone->fICUTimeZone; return fTimeZone->fICUTimeZone;
+2 -5
View File
@@ -27,19 +27,16 @@
#include <stdlib.h> #include <stdlib.h>
#define ICU_VERSION icu_44
BCountry::BCountry(const char* countryCode) BCountry::BCountry(const char* countryCode)
: :
fICULocale(new ICU_VERSION::Locale("", countryCode)) fICULocale(new icu::Locale("", countryCode))
{ {
} }
BCountry::BCountry(const BCountry& other) BCountry::BCountry(const BCountry& other)
: :
fICULocale(new ICU_VERSION::Locale(*other.fICULocale)) fICULocale(new icu::Locale(*other.fICULocale))
{ {
} }
+4 -7
View File
@@ -1,7 +1,7 @@
/* /*
* Copyright 2003-2009, Axel Dörfler, [email protected]. * Copyright 2003-2009, Axel Dörfler, [email protected].
* Copyright 2009-2010, Adrien Destugues, [email protected]. * Copyright 2009-2010, Adrien Destugues, [email protected].
* Copyright 2010, Oliver Tappe <[email protected]>. * Copyright 2010-2011, Oliver Tappe <[email protected]>.
* Distributed under the terms of the MIT License. * Distributed under the terms of the MIT License.
*/ */
@@ -32,9 +32,6 @@
#include <stdlib.h> #include <stdlib.h>
#define ICU_VERSION icu_44
// #pragma mark - helpers // #pragma mark - helpers
@@ -191,7 +188,7 @@ BFormattingConventions::BFormattingConventions(const char* id)
fCachedUse24HourClock(CLOCK_HOURS_UNSET), fCachedUse24HourClock(CLOCK_HOURS_UNSET),
fExplicitUse24HourClock(CLOCK_HOURS_UNSET), fExplicitUse24HourClock(CLOCK_HOURS_UNSET),
fUseStringsFromPreferredLanguage(false), fUseStringsFromPreferredLanguage(false),
fICULocale(new ICU_VERSION::Locale(id)) fICULocale(new icu::Locale(id))
{ {
} }
@@ -206,7 +203,7 @@ BFormattingConventions::BFormattingConventions(
fExplicitMonetaryFormat(other.fExplicitMonetaryFormat), fExplicitMonetaryFormat(other.fExplicitMonetaryFormat),
fExplicitUse24HourClock(other.fExplicitUse24HourClock), fExplicitUse24HourClock(other.fExplicitUse24HourClock),
fUseStringsFromPreferredLanguage(other.fUseStringsFromPreferredLanguage), fUseStringsFromPreferredLanguage(other.fUseStringsFromPreferredLanguage),
fICULocale(new ICU_VERSION::Locale(*other.fICULocale)) fICULocale(new icu::Locale(*other.fICULocale))
{ {
for (int s = 0; s < B_DATE_FORMAT_STYLE_COUNT; ++s) for (int s = 0; s < B_DATE_FORMAT_STYLE_COUNT; ++s)
fCachedDateFormats[s] = other.fCachedDateFormats[s]; fCachedDateFormats[s] = other.fCachedDateFormats[s];
@@ -227,7 +224,7 @@ BFormattingConventions::BFormattingConventions(const BMessage* archive)
{ {
BString conventionsID; BString conventionsID;
status_t status = archive->FindString("conventions", &conventionsID); status_t status = archive->FindString("conventions", &conventionsID);
fICULocale = new ICU_VERSION::Locale(conventionsID); fICULocale = new icu::Locale(conventionsID);
for (int s = 0; s < B_DATE_FORMAT_STYLE_COUNT && status == B_OK; ++s) { for (int s = 0; s < B_DATE_FORMAT_STYLE_COUNT && status == B_OK; ++s) {
BString format; BString format;
+1 -4
View File
@@ -25,9 +25,6 @@
#include <unicode/locid.h> #include <unicode/locid.h>
#define ICU_VERSION icu_44
BLanguage::BLanguage() BLanguage::BLanguage()
: :
fDirection(B_LEFT_TO_RIGHT), fDirection(B_LEFT_TO_RIGHT),
@@ -64,7 +61,7 @@ status_t
BLanguage::SetTo(const char* language) BLanguage::SetTo(const char* language)
{ {
delete fICULocale; delete fICULocale;
fICULocale = new ICU_VERSION::Locale(language); fICULocale = new icu::Locale(language);
if (fICULocale == NULL) if (fICULocale == NULL)
return B_NO_MEMORY; return B_NO_MEMORY;
+13 -15
View File
@@ -1,6 +1,6 @@
/* /*
** Copyright 2003, Axel Dörfler, [email protected]. ** Copyright 2003, Axel Dörfler, [email protected].
** Copyright 2010, Oliver Tappe, [email protected]. ** Copyright 2010-2011, Oliver Tappe, [email protected].
** All rights reserved. Distributed under the terms of the OpenBeOS License. ** All rights reserved. Distributed under the terms of the OpenBeOS License.
*/ */
@@ -16,6 +16,8 @@
#include <MutableLocaleRoster.h> #include <MutableLocaleRoster.h>
#include <TimeZone.h> #include <TimeZone.h>
#include <ICUWrapper.h>
#include <unicode/datefmt.h> #include <unicode/datefmt.h>
#include <unicode/dcfmtsym.h> #include <unicode/dcfmtsym.h>
#include <unicode/decimfmt.h> #include <unicode/decimfmt.h>
@@ -23,14 +25,10 @@
#include <unicode/numfmt.h> #include <unicode/numfmt.h>
#include <unicode/smpdtfmt.h> #include <unicode/smpdtfmt.h>
#include <unicode/ustring.h> #include <unicode/ustring.h>
#include <ICUWrapper.h>
#include <vector> #include <vector>
#define ICU_VERSION icu_44
using BPrivate::ObjectDeleter; using BPrivate::ObjectDeleter;
using BPrivate::B_WEEK_START_MONDAY; using BPrivate::B_WEEK_START_MONDAY;
using BPrivate::B_WEEK_START_SUNDAY; using BPrivate::B_WEEK_START_SUNDAY;
@@ -268,7 +266,7 @@ BLocale::FormatDate(BString* string, int*& fieldPositions, int& fieldCount,
fieldPositions = NULL; fieldPositions = NULL;
UErrorCode error = U_ZERO_ERROR; UErrorCode error = U_ZERO_ERROR;
ICU_VERSION::FieldPositionIterator positionIterator; icu::FieldPositionIterator positionIterator;
UnicodeString icuString; UnicodeString icuString;
dateFormatter->format((UDate)time * 1000, icuString, &positionIterator, dateFormatter->format((UDate)time * 1000, icuString, &positionIterator,
error); error);
@@ -276,7 +274,7 @@ BLocale::FormatDate(BString* string, int*& fieldPositions, int& fieldCount,
if (error != U_ZERO_ERROR) if (error != U_ZERO_ERROR)
return B_ERROR; return B_ERROR;
ICU_VERSION::FieldPosition field; icu::FieldPosition field;
std::vector<int> fieldPosStorage; std::vector<int> fieldPosStorage;
fieldCount = 0; fieldCount = 0;
while (positionIterator.next(field)) { while (positionIterator.next(field)) {
@@ -315,7 +313,7 @@ BLocale::GetDateFields(BDateElement*& fields, int& fieldCount,
fields = NULL; fields = NULL;
UErrorCode error = U_ZERO_ERROR; UErrorCode error = U_ZERO_ERROR;
ICU_VERSION::FieldPositionIterator positionIterator; icu::FieldPositionIterator positionIterator;
UnicodeString icuString; UnicodeString icuString;
time_t now; time_t now;
dateFormatter->format((UDate)time(&now) * 1000, icuString, dateFormatter->format((UDate)time(&now) * 1000, icuString,
@@ -324,7 +322,7 @@ BLocale::GetDateFields(BDateElement*& fields, int& fieldCount,
if (U_FAILURE(error)) if (U_FAILURE(error))
return B_ERROR; return B_ERROR;
ICU_VERSION::FieldPosition field; icu::FieldPosition field;
std::vector<int> fieldPosStorage; std::vector<int> fieldPosStorage;
fieldCount = 0; fieldCount = 0;
while (positionIterator.next(field)) { while (positionIterator.next(field)) {
@@ -534,7 +532,7 @@ BLocale::FormatTime(BString* string, int*& fieldPositions, int& fieldCount,
fieldPositions = NULL; fieldPositions = NULL;
UErrorCode error = U_ZERO_ERROR; UErrorCode error = U_ZERO_ERROR;
ICU_VERSION::FieldPositionIterator positionIterator; icu::FieldPositionIterator positionIterator;
UnicodeString icuString; UnicodeString icuString;
timeFormatter->format((UDate)time * 1000, icuString, &positionIterator, timeFormatter->format((UDate)time * 1000, icuString, &positionIterator,
error); error);
@@ -542,7 +540,7 @@ BLocale::FormatTime(BString* string, int*& fieldPositions, int& fieldCount,
if (error != U_ZERO_ERROR) if (error != U_ZERO_ERROR)
return B_ERROR; return B_ERROR;
ICU_VERSION::FieldPosition field; icu::FieldPosition field;
std::vector<int> fieldPosStorage; std::vector<int> fieldPosStorage;
fieldCount = 0; fieldCount = 0;
while (positionIterator.next(field)) { while (positionIterator.next(field)) {
@@ -580,7 +578,7 @@ BLocale::GetTimeFields(BDateElement*& fields, int& fieldCount,
fields = NULL; fields = NULL;
UErrorCode error = U_ZERO_ERROR; UErrorCode error = U_ZERO_ERROR;
ICU_VERSION::FieldPositionIterator positionIterator; icu::FieldPositionIterator positionIterator;
UnicodeString icuString; UnicodeString icuString;
time_t now; time_t now;
timeFormatter->format((UDate)time(&now) * 1000, icuString, timeFormatter->format((UDate)time(&now) * 1000, icuString,
@@ -589,7 +587,7 @@ BLocale::GetTimeFields(BDateElement*& fields, int& fieldCount,
if (error != U_ZERO_ERROR) if (error != U_ZERO_ERROR)
return B_ERROR; return B_ERROR;
ICU_VERSION::FieldPosition field; icu::FieldPosition field;
std::vector<int> fieldPosStorage; std::vector<int> fieldPosStorage;
fieldCount = 0; fieldCount = 0;
while (positionIterator.next(field)) { while (positionIterator.next(field)) {
@@ -651,7 +649,7 @@ BLocale::FormatNumber(BString* string, double value) const
UErrorCode err = U_ZERO_ERROR; UErrorCode err = U_ZERO_ERROR;
ObjectDeleter<NumberFormat> numberFormatter(NumberFormat::createInstance( ObjectDeleter<NumberFormat> numberFormatter(NumberFormat::createInstance(
*BFormattingConventions::Private(&fConventions).ICULocale(), *BFormattingConventions::Private(&fConventions).ICULocale(),
NumberFormat::kNumberStyle, err)); UNUM_DECIMAL, err));
if (numberFormatter.Get() == NULL) if (numberFormatter.Get() == NULL)
return B_NO_MEMORY; return B_NO_MEMORY;
@@ -691,7 +689,7 @@ BLocale::FormatNumber(BString* string, int32 value) const
UErrorCode err = U_ZERO_ERROR; UErrorCode err = U_ZERO_ERROR;
ObjectDeleter<NumberFormat> numberFormatter(NumberFormat::createInstance( ObjectDeleter<NumberFormat> numberFormatter(NumberFormat::createInstance(
*BFormattingConventions::Private(&fConventions).ICULocale(), *BFormattingConventions::Private(&fConventions).ICULocale(),
NumberFormat::kNumberStyle, err)); UNUM_DECIMAL, err));
if (numberFormatter.Get() == NULL) if (numberFormatter.Get() == NULL)
return B_NO_MEMORY; return B_NO_MEMORY;
+1 -2
View File
@@ -316,7 +316,7 @@ TimeZoneView::_BuildZoneMenu()
BString region(zoneID, slashPos); BString region(zoneID, slashPos);
if (region == B_TRANSLATE("Etc")) if (region == "Etc")
region = kOtherRegion; region = kOtherRegion;
else if (countryName.Length() == 0) { else if (countryName.Length() == 0) {
// skip global timezones from other regions, we are just // skip global timezones from other regions, we are just
@@ -324,7 +324,6 @@ TimeZoneView::_BuildZoneMenu()
continue; continue;
} }
// just accept timezones from "proper" regions, others are aliases // just accept timezones from "proper" regions, others are aliases
ZoneItemMap::iterator regionIter = zoneMap.find(region); ZoneItemMap::iterator regionIter = zoneMap.find(region);
if (regionIter == zoneMap.end()) if (regionIter == zoneMap.end())
@@ -44,8 +44,7 @@ ICUNumericData::SetTo(const Locale& locale, const char* posixLocaleName)
if (result == B_OK) { if (result == B_OK) {
UErrorCode icuStatus = U_ZERO_ERROR; UErrorCode icuStatus = U_ZERO_ERROR;
DecimalFormat* numberFormat = dynamic_cast<DecimalFormat*>( DecimalFormat* numberFormat = dynamic_cast<DecimalFormat*>(
NumberFormat::createInstance(locale, DecimalFormat::kNumberStyle, NumberFormat::createInstance(locale, UNUM_DECIMAL, icuStatus));
icuStatus));
if (!U_SUCCESS(icuStatus)) if (!U_SUCCESS(icuStatus))
return B_UNSUPPORTED; return B_UNSUPPORTED;
if (!numberFormat) if (!numberFormat)