Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(6)

Unified Diff: source/i18n/ulocdata.c

Issue 2440913002: Update ICU to 58.1
Patch Set: Created 4 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « source/i18n/uitercollationiterator.cpp ('k') | source/i18n/umsg.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: source/i18n/ulocdata.c
diff --git a/source/i18n/ulocdata.c b/source/i18n/ulocdata.c
index 48902f8655cdb6dfe4d842d9312219032a9c5b45..587a74339d42722bcabba2066219313303a41b98 100644
--- a/source/i18n/ulocdata.c
+++ b/source/i18n/ulocdata.c
@@ -1,7 +1,9 @@
+// Copyright (C) 2016 and later: Unicode, Inc. and others.
+// License & terms of use: http://www.unicode.org/copyright.html
/*
******************************************************************************
* *
-* Copyright (C) 2003-2013, International Business Machines *
+* Copyright (C) 2003-2016, International Business Machines *
* Corporation and others. All Rights Reserved. *
* *
******************************************************************************
@@ -21,6 +23,7 @@
#include "unicode/ulocdata.h"
#include "uresimp.h"
#include "ureslocs.h"
+#include "ulocimp.h"
#define MEASUREMENT_SYSTEM "MeasurementSystem"
#define PAPER_SIZE "PaperSize"
@@ -189,16 +192,11 @@ ulocdata_getDelimiter(ULocaleData *uld, ULocaleDataDelimiterType type,
}
static UResourceBundle * measurementTypeBundleForLocale(const char *localeID, const char *measurementType, UErrorCode *status){
- char fullLoc[ULOC_FULLNAME_CAPACITY];
char region[ULOC_COUNTRY_CAPACITY];
UResourceBundle *rb;
UResourceBundle *measTypeBundle = NULL;
- /* The following code is basically copied from Calendar::setWeekData and
- * Calendar::getCalendarTypeForLocale with adjustments for resource name
- */
- uloc_addLikelySubtags(localeID, fullLoc, ULOC_FULLNAME_CAPACITY, status);
- uloc_getCountry(fullLoc, region, ULOC_COUNTRY_CAPACITY, status);
+ ulocimp_getRegionForSupplementalData(localeID, TRUE, region, ULOC_COUNTRY_CAPACITY, status);
rb = ures_openDirect(NULL, "supplementalData", status);
ures_getByKey(rb, "measurementData", rb, status);
« no previous file with comments | « source/i18n/uitercollationiterator.cpp ('k') | source/i18n/umsg.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698