Commit Graph

30226 Commits

Author SHA1 Message Date
Andy Heninger
f90676c2bc
ICU-20104 Fix lazy init in Indian Calendar. Now matches other calendars. (#108)
* ICU-20104 Fix lazy init in Indian Calendar. Now matches other calendars.

* ICU-20104 export class IndianCalendar for testing.

* ICU-20104 shot-in-the-dark Windows build experiment.

* ICU-20104 fix memory leak in added test.
2018-09-27 14:27:40 -07:00
Jeff Genovy
f165bf10e7
ICU-20145 Allow passing locale in ICU4C "date" sample program for testing without using the environment variable "LC_ALL". (#125)
The ICU4C sample "date" program just uses the "default" ICU locale. This change lets you pass in an explicit locale argument for testing on platforms like Windows that don't have/use the environment variable "LC_ALL".
2018-09-27 14:27:40 -07:00
jungshik
4ed35d7bb5
ICU-20140 Allow duplicated keys in U-extension per RFC 6067 (#136)
* ICU-20140 Allow duplicated keys in U-extension per RFC 6067

RFC 6067 [1] does allow duplicate keywords, but ICU4C's
uloc_forLanguageCode rejects it as invalid.

Change it to accept duplicate keywords and honor only the
1st one while ignoring subsequent ones per RFC 6067.

[1] Unicode extension to BCP 47:
    https://tools.ietf.org/html/rfc6067

* ICU-20140 Add ICU4J test and tweak ICU4C test

ICU4J test diverges from ICU4C tests:

1. Handling of duplicate variants in ICU4J seem to be wrong:
   https://unicode-org.atlassian.net/browse/ICU-20148
2. ULocale.forLanguageTag only throws NullPointException so
   that ICU4C's test for duplicate attributes cannot be ported.
2018-09-27 14:27:40 -07:00
Don
d55773ce28
ICU-20136 Check U_HAVE_TZ* values (#114)
* Add check for U_HAVE_TZSET

* Add check for U_HAVE_TZNAME
2018-09-27 14:27:40 -07:00
Yoshito Umaoka
61c42a598b
ICU-20119 BRS63 Currency numeric code data update - VES and UYW (#126) 2018-09-27 14:27:40 -07:00
pedberg-icu
b56178412f
ICU-20075 For POSIX, increase correctedPOSIXLocale size for localeID expansion with @ (#112) 2018-09-27 14:27:40 -07:00
Victor Chang
b62200061c
ICU-20058 Fix mimimum significant digits in engineering notation
- Follow the spec to calculate the mimimum significant digits in engineering notation
- The bug is regression since ICU 58. The new test still passes on
ICU58-based DecimalFormat
- Maximum significant digits is not changed
2018-09-27 14:27:40 -07:00
Don
cc5bf22a0c
ICU-20135 Use __has_declspec_attribute (#113)
> Clang comes with __has_declspec_attribute to detect whether the name of an attribute is implemented as a MS style __declspec.

> This adds __has_declspect_attribute to the list of clang compatibility macros and then uses that check to determine if __declspec(dllimport) and __declspec(dllexport) can be used.
2018-09-27 14:27:40 -07:00
gvictor
d461a0e49c
ICU-20133 Undeprecate Transliterator.Position#hashCode (#119)
Create a preper hash code with Objects.hash instead of returning 42
2018-09-27 14:27:40 -07:00
Yoshito Umaoka
cc6b107513
ICU-20119 BRS63RC Fix javac/javadoc/Eclipse errors/warnings (#132)
* ICU-20119 BRS63RC Fixing java compiler warnings

* ICU-20119 BRS63RC Fixing JavaDoc errors
2018-09-27 14:27:40 -07:00
Fredrik Roubert
74759b467e
ICU-13645 Remove redundant invocations of the Locale copy constructor. 2018-09-27 14:27:40 -07:00
Jeff Genovy
4a8b474e77
ICU-12973 Enable UWP version of ICU to use Environment variable ICU_ENABLE_TENTATIVE_ERA for testing placeholder names (#124)
- Enable UWP version of ICU to use Environment variable ICU_ENABLE_TENTATIVE_ERA for testing placeholder era names.
- Use LocalArray<int32_t> for the Era Start Dates to simply memory management, so that goto can be removed.
- Also fix some minor typos in header file.
2018-09-27 14:27:40 -07:00
Shane
ce92011aff
ICU-11276 Adding NumberRangeFormatter (#87)
Formats number ranges, including currencies and measurement units.
2018-09-27 14:27:40 -07:00
Shane Carr
55961fbf05
ICU-11276 Comment about getParameters() return type. 2018-09-27 14:27:40 -07:00
Shane Carr
abb6ed034a
ICU-11276 Adding more test cases. Fixing minor issues with extended locales. 2018-09-27 14:27:40 -07:00
Shane Carr
4f2604655a
ICU-11276 Replying to Mark review feedback. 2018-09-27 14:27:40 -07:00
Shane Carr
d4e8ed7ed0
ICU-11276 Replying to Andy review feedback. 2018-09-27 14:27:40 -07:00
Shane Carr
1c26cd1e75
ICU-11276 int -> int32_t in number_compact.cpp 2018-09-27 14:27:40 -07:00
Shane Carr
b59ffcf1ca
ICU-11276 Porting pluralRanges support to Java. 2018-09-27 14:27:40 -07:00
Shane Carr
4fa633e9ae
ICU-11276 Fixing pluralRanges data loading and adding more tests. 2018-09-27 14:27:40 -07:00
Shane Carr
0d4c8dad1f
ICU-11276 ModifierStore wired up in LongNameHandler (C++). 2018-09-27 14:27:40 -07:00
Shane Carr
18431084c2
ICU-11276 Plural ranges loaded from data; first implementations of ModifierStore. 2018-09-27 14:27:40 -07:00
Shane Carr
e8d2ec8531
ICU-11276 Additional build.xml lines for pluralRanges. 2018-09-27 14:27:40 -07:00
Shane Carr
dd7235624c
ICU-11276 Adding UChar* method in CharString. 2018-09-27 14:27:40 -07:00
Shane Carr
3161453c02
ICU-11276 Adding ModifierStore, groundwork for plural range support. 2018-09-27 14:27:40 -07:00
Shane Carr
5c43434285
ICU-11276 Adding pluralRanges.txt data file.
The code was already in NewLdml2IcuConverter, but it was not being called from ICU.
2018-09-27 14:27:40 -07:00
Shane Carr
ec40c16957
ICU-11276 Fixing ICU4J number range test failures. 2018-09-27 14:27:40 -07:00
Shane Carr
af091cc15a
ICU-11276 One more attempt at fixing test failure. 2018-09-27 14:27:40 -07:00
Shane Carr
d717184948
ICU-11276 Fixing test failure related to number range. 2018-09-27 14:27:40 -07:00
Shane Carr
55974b2fb6
ICU-11276 Adding Java NumberRangeFormatter implementation. 2018-09-27 14:27:40 -07:00
Shane Carr
57f448e93c
ICU-11276 Fixing ASAN issue related to number range formatting. 2018-09-27 14:27:40 -07:00
Shane Carr
06da62bb11
ICU-11276 Deleting impl object in destructor. 2018-09-27 14:27:40 -07:00
Shane Carr
dfd13867b2
ICU-11276 Adding test cases and more API coverage. 2018-09-27 14:27:40 -07:00
Shane Carr
7155e1fbcf
ICU-11276 Adding number range spacing heuristic and fixing data loading. 2018-09-27 14:27:40 -07:00
Shane Carr
7365e2c85a
ICU-11276 Wiring SimpleFormatter logic into NumberRangeFormatter. 2018-09-27 14:27:40 -07:00
Shane Carr
aa276d18f8
ICU-11276 Wiring new NumberRangeFormatterImpl code into the API. 2018-09-27 14:27:40 -07:00
Shane Carr
5b4bb82419
ICU-11276 Implementing new methods on Modifier.
Also removes status code from two of the other methods; the status code was used only by MutablePatternModifier for the case of a malformed pattern; this error is better handled directly in the apply() method.
2018-09-27 14:27:40 -07:00
Shane Carr
238271f27b
ICU-11276 Initial NumberRangeFormatter implementation. Needs data loading and implementation of new methods on Modifier. 2018-09-27 14:27:40 -07:00
Shane Carr
c5e458ba8d
ICU-11276 Move rounding into preProcess function since the micro generator could have already applied rounding. 2018-09-27 14:27:40 -07:00
Fredrik Roubert
5d4f3d7fea
ICU-13645 Add C++11 move constructor and assign operator to Locale. 2018-09-27 14:27:39 -07:00
Shane Carr
083fe73d6b
ICU-11276 Rewriring NumberFormatterImpl to expose information needed for NumberRangeFormatter. 2018-09-27 14:27:39 -07:00
Fredrik Roubert
e10ce23db1
ICU-13645 Clean up implementation of Locale::operator=(const Locale&).
Organizing the implementation like this instead will (hopefully) make it
more clear what's being done and make it possible to use analogous
control flow in the copy and move implementations of operator=().
2018-09-27 14:27:39 -07:00
Shane Carr
8210f9e7d3
ICU-11276 Replying to code review comments. 2018-09-27 14:27:39 -07:00
Fredrik Roubert
46e08431a6
ICU-13417 Add the Locale::get(Unicode)?Keywords() functions.
They are C++ template wrappers around Locale::createKeywords() and
Locale::createUnicodeKeywords() respectively, that write to any
container for which an STL style output iterator can be provided.

The simplest imaginable usage would just look like this:

    std::string keys[16];
    l.getKeywords<std::string>(keys, status);

The unit test has a more elaborate invocation, writing to an std::set<>.
2018-09-27 14:27:39 -07:00
Shane Carr
0c5b7c2232
ICU-11276 Fixing Javadoc warnings in NumberRangeFormatter. 2018-09-27 14:27:39 -07:00
Fredrik Roubert
7c2a8d1fcc
ICU-13417 Add the Locale::(addLikely|minimize)Subtags() functions.
They are C++ wrappers of uloc_addLikelySubtags() and uloc_minimizeSubtags()
respectively, that take care of dynamic memory management.
2018-09-27 14:27:39 -07:00
Shane Carr
92a86dfcf5
ICU-11276 Feedback from ICU-TC. Fixing doxygen warnings. 2018-09-27 14:27:39 -07:00
Fredrik Roubert
fbc730fba1
ICU-13417 Add the Locale::(get|set)(Unicode)?KeywordValue() functions. 2018-09-27 14:27:39 -07:00
Shane Carr
9109a388f4
ICU-11276 Adding C++ base implementation of NumberRangeFormatter, including unit test. 2018-09-27 14:27:39 -07:00
Fredrik Roubert
8985e60d38
ICU-13417 Improved error handling in Locale::create(Unicode)?Keywords().
Follow-up from pull request #117:

Specify buffer size in only one place, explicitly check status before
proceeding and set status = U_MEMORY_ALLOCATION_ERROR if new fails.
2018-09-27 14:27:39 -07:00