Commit Graph

30503 Commits

Author SHA1 Message Date
Shane Carr
8c196b6f89 ICU-20380 Adding error code to DecimalFormat::toNumberFormatter(). 2019-02-15 14:37:12 -08:00
Frank Tang
736757aced ICU-20407 hy-arevela/hy-arevmda can. into hy / hyw 2019-02-15 12:40:47 -08:00
Markus Scherer
ac4387a374 ICU-20203 Unicode 12 data 20190214 2019-02-15 11:37:34 -08:00
Nebojsa Ciric
a9d2196913 ICU-12584 Fix memory allocation for getFormats.
Also:
  Add a test case for inner message, other small cleanup.
  Style fixes, using better test methods
2019-02-14 18:39:49 -08:00
Peter Edberg
162aaf9aa5 ICU-20365 if roundingIncrement significance smaller than maxFrac, do not use it 2019-02-14 17:23:23 -08:00
Shane Carr
7fd31078bb ICU-20138 Adding a tech-preview API, constrainFieldAndValue, and updating matchhesField. 2019-02-14 16:08:27 -08:00
Shane F. Carr
a0f02b12d0 ICU-20121 Adding span field for FormattedList. 2019-02-14 16:05:51 -08:00
Romain Geissler
6f59c29ebc ICU-20244 Fix gcc stringop-overflow warning/error in uloc.cpp. 2019-02-14 13:55:54 -08:00
Shane Carr
01a24ff78f ICU-11725 Promoting tech-previews in DecimalFormat to @draft.
- Changes Java DecimalFormat boolean get* methods to is*.
- Makes the new draft methods non-virtual.
- Removes obsolete template class in header file.
- Adds proper U_HIDE tags in unum.h and decimfmt.h
2019-02-14 13:50:03 -08:00
Shane Carr
f8d8500f7c ICU-20121 Fixing docs tags in FormattedList. 2019-02-14 13:48:19 -08:00
Shane Carr
d243867c11 ICU-20138 Adding matchesField as draft and removing getConstraintType. 2019-02-14 13:45:49 -08:00
Shane F. Carr
c05eee688c ICU-10923 Remove unused variable AVAILABLE_FEATURES. 2019-02-14 13:44:48 -08:00
Markus Scherer
1afef30549 ICU-20187 drop support for long-obsolete locale ID variants 2019-02-14 12:27:42 -08:00
Markus Scherer
d2e3a8847d ICU-20111 move text layout properties data into a new ulayout.icu data file 2019-02-14 08:30:57 -08:00
Frank Tang
6942013a38 ICU-20328 Implement LocaleBuilder
Design Doc: https://goo.gl/Qf12p3
2019-02-13 17:24:38 -08:00
Jeff Genovy
0e6a6f6fff ICU-20416 Various OOM fixes for calendar.cpp 2019-02-13 13:10:28 -08:00
Jeff Genovy
1f17beb8eb ICU-20100 Change the name of the TimeZone::getDisplayName daylight parameter.
The TimeZone::getDisplayName "daylight" parameter conflicts with an existing macro in the CRT "time.h" header.
2019-02-13 10:55:43 -08:00
Tobias Stoeckmann
7369eff4ed ICU-20362 segfault/leftover files with long lines
If a file with an input line larger than INT32_MAX (i.e. 2 GB) contains
an UTF8 character after that limit, escapesrc crashes on 64 bit systems
or does not remove incomplete files on 32 bit systems.

The issue is that an unchecked cast from size_t to int32_t can turn
negative, which results in negative offsets during array access.

This will eventually lead to an out of boundary read, which most likely
crashes the tool.

This patch sets a fixed limit on 1 GB to make sure that no side effects
occur if the line is exactly INT32_MAX or a few bytes less. It should
still be way more than anyone would really need.

Signed-off-by: Tobias Stoeckmann <tobias@stoeckmann.org>
2019-02-13 10:23:19 -08:00
Tobias Stoeckmann
c04f9f1c01 ICU-20363 Out of boundary write on empty file.
If gencnval encounters an empty input file the function resolveAlias
triggers an out of boundary write due to uniqueAliasArr pointing to
a 0 byte reserved memory address.

This patch protects the code in question with a check for
knownAliasesCount being not 0.

Signed-off-by: Tobias Stoeckmann <tobias@stoeckmann.org>
2019-02-13 10:22:56 -08:00
Nebojsa Ciric
d2d8f0ec8f ICU-11991 Fixed memory leak in parse.cpp
Squashed commits for merge.
2019-02-12 12:53:35 -08:00
Shane Carr
e2ad4f8113 ICU-20342 Adding FormattedDateInterval in C and C++.
- Adds first "span" field category
- Re-implements DateIntervalFormat#fallbackFormat to use FieldPositionHandler
- New temporary wiring in SimpleFormatter
2019-02-11 16:12:03 -08:00
Daniel Ju
f4f899a63b ICU-13789 ICU-20387 ICU4C PerfTest does not build, Upgrade various *.vcxproj files 2019-02-11 14:22:58 -08:00
Jeff Genovy
4ebb3cebf5 ICU-20382 ICU4C: pkgdata and genccode support ARM32 but not ARM64 on Windows platforms. 2019-02-11 12:31:29 -08:00
Shane Carr
249e03ccd6 ICU-13256 Implementing FormattedRelativeDateTime in C, C++, and Java.
- Adds additional logic to NumberStringBuilder.
- Extends logic of number::impl::Field type.
- Adds tests for RBNF support.
- Adds tests from ftang's original PR.
2019-02-11 11:35:51 -08:00
Shane F. Carr
c70a9db818 ICU-20332 Adding duration-person unit data and APIs to C and J.
- Rebuilds ICU4J data jars.
- Includes a workaround in data loading to be fixed with ICU-20400.
2019-02-08 16:55:20 -08:00
Shane F. Carr
30396f4dd0 ICU-20378 Changing APIs for UFieldCategory to int32_t. 2019-02-08 16:45:55 -08:00
Andy Heninger
64f4dd64e2 ICU-12017 Improve line break around numbers. 2019-02-08 13:54:14 -08:00
Andy Heninger
1130b9c087 ICU-20385 Regex, fix pattern compile problem with look-behind patterns that cannot match. 2019-02-08 12:57:06 -08:00
Andy Heninger
b50f97a58a ICU-20401 rbbi break rules, update comments to match current UAX versions. 2019-02-08 12:53:58 -08:00
Markus Scherer
8335adc310 ICU-20330 simplify LocaleMatcher code:
- widen API from LocalePriorityList to Iterable
- merge getBestMatch(multiple locales) and getBestMatch(single locale) into one function
- process desired locales incrementally, create fewer objects
- reject poor matches early: use bestDistance-demotion for threshold
- add API for java.util.Locale, convert incrementally
- new feature: tracks indexes of supported and desired locales which eliminates conversion of result objects in wrappers around getBestMatch() as shown by the java.util.Locale API here
- simpler data structures, more serialization-friendly (easier to port to C++)
  - e.g., use a BytesTrie each for likelySubtags & locale distance, instead of layers of TreeMap
- un-hardcode locale matcher data; use modern resource bundle functions
- split builder code & runtime code into separate classes
- move LSR to simple top-level value class, cache regionIndex in LSR
- simpler handling of private use languages and pseudolocales
- simplify RegionMapper
- LocaleDistance builder: move the node distance into the DistanceTable, remove DistanceNode
- support distance rules with region codes, not just with variables
- enforce & use distance rule constraints:
  - no rule with *,supported or desired,*
  - no rule with language * and script/region non-*
- distance trie collapse a (desired, supported)=(ANY, ANY) pair into a single *
- look up each desired language only once for all supported LSRs
- remove layers-of-Maps compaction (trie builder compacts)
- remove unused XML printing
- remove other unused code
- make XLocaleMatcherTest.testPerf() exercise locale distance lookup code
2019-02-08 10:35:48 -08:00
Shane Carr
026095ddc3 ICU-20138 Copy fErrorCode in FormattedValue subclass macro. 2019-02-07 23:03:56 -08:00
Shane Carr
8a56b89b03 ICU-20360 Testing and fixing stack overflow in numparse. 2019-02-07 23:03:41 -08:00
Shane F. Carr
78ac6ca3dc ICU-20121 Changing C API method name to ulistfmt_formatStringsToResult. 2019-02-07 22:52:49 -08:00
Shane F. Carr
37e589fb3a ICU-20121 Initial UFormattedList implementation, C. 2019-02-07 22:52:49 -08:00
Shane F. Carr
5c1e3b8aaf ICU-20121 Initial FormattedList implementation, C++. 2019-02-07 22:52:49 -08:00
Jeff Genovy
b91821221a ICU-20389 Add MSVC Debug build to the Azure CI builds.
Also increase the timeout for the debug build.
2019-02-07 18:36:38 -08:00
Markus Scherer
ecd0591521 ICU-20373 simpler state saving for Java string tries via long not object 2019-02-07 13:35:46 -08:00
Frank Tang
f46605a437 ICU-20320 Fix the missing digit singleton extension
Add space

add test cases for Java and fix Java code
2019-02-07 11:35:55 -08:00
Frank Tang
9453dcfc19 ICU-20321 Fix ultag_isUnicodeLocaleKey
Returns false when passingin alphanum digit.
Sync with UTS35
https://www.unicode.org/reports/tr35/#Unicode_locale_identifier

address review feedback add unit tests.

Fix Java too

add test cases to c++

Fix format

change test case
2019-02-07 11:32:38 -08:00
Shane Carr
a184153a2c ICU-20337 Adding value getters to C++ MeasureUnit API.
ICU-20337 Restoring comments in MeasureUnitTest.java
2019-02-06 21:00:34 -08:00
Peter Edberg
9a27ba01ef ICU-20306 Remove incorrect #ifndef U_HIDE_INTERNAL_API around UTEXT_MAGIC 2019-02-06 19:26:38 -08:00
Shane Carr
96556c2d4c ICU-10923 Fixing warning in testdata build file. 2019-02-06 18:59:31 -08:00
Markus Scherer
65852f1a74 ICU-20375 string tries: covariant clone() return types, and copy constructors 2019-02-06 18:21:07 -08:00
Markus Scherer
2982d6c233 ICU-13081 test self-move without clang warning 2019-02-06 18:11:00 -08:00
Daniel Ju
d5ccdc9d2f ICU-20002 Modify Windows 'distrelease.ps1' for 32-bit (x86) builds 2019-02-06 16:07:03 -08:00
Markus Scherer
6277c9c4d7 ICU-20213 deprecate BreakIterator::createTitleInstance() 2019-02-06 15:29:24 -08:00
Andy Heninger
1d60f963e8 ICU-20376 Add out-of-source build testing to Travis. 2019-02-06 14:26:38 -08:00
Markus Scherer
0f7c4c8ed9 ICU-13081 remove C++ moveFrom() functions: still draft, but obsolete since we require C++11 which has std::move() 2019-02-06 13:36:53 -08:00
Steven R. Loomis
b6f72c10c9 ICU-20395 Fix cldr-icu-readme.txt to not mention whitelist 2019-02-06 10:45:43 -08:00
Markus Scherer
f5d2c560a0 ICU-20376 makeconv prepend relative sourcedir to args; only ignore if nothing but a single dot 2019-02-06 08:45:18 -08:00