Commit Graph

22098 Commits

Author SHA1 Message Date
Peter Edberg
e618a1cc2d ICU-21249 integrate CLDR release 38 alpha0 to ICU trunk 2020-09-02 10:23:14 -07:00
younies
15747825bc ICU-20963 Add .clang-format file to icu4c/source
See #1143
2020-09-01 21:19:06 +02:00
Frank Tang
bc864aeac6 ICU-21051 Add copyright Remove License from sh
See #1281
2020-09-01 13:26:41 -05:00
Shane F. Carr
196d5e1182 ICU-20923 Fix compact notation with percent. 2020-09-01 04:36:04 -05:00
Markus Scherer
2f39d33498 ICU-13727 limit length of input for Punycode encode/decode
See #1241
2020-08-31 16:53:07 -07:00
Erik Torres
ba3b6acd5c ICU-21249 BRS68RC Version update and regenerate configure for v68
BRS68RC Updating files for release
2020-08-31 19:35:14 -04:00
Victor Chang
7a57d299df ICU-21247 Move #include "unicode/localpointer.h" into U_SHOW_CPLUSPLUS_API block 2020-08-31 15:19:29 -07:00
Markus Scherer
650bd402fe ICU-13727 add U_INPUT_TOO_LONG_ERROR & ICUInputTooLongException 2020-08-31 10:32:11 -07:00
Fredrik Roubert
ffd450c637 ICU-21035 Replace backward compatibility _getVariant*() functions.
The one single caller of _getVariantEx() is _getVariant() and this in
turn only has 3 callers, one of which is commented out (so it can be
deleted), one of which doesn't actually do anything (so it too can be
deleted) and one which can be replaced by inlining the use of
CheckedArrayByteSink.

This also allows _getVariantEx() to be renamed to _getVariant() as it's
the only such function left now.
2020-08-31 13:33:15 +02:00
Markus Scherer
f62693aa02 ICU-13416 change Armenian (hy) uppercase/titlecase of և ligature ech-yiwn 2020-08-30 18:19:10 -07:00
Frank Tang
cad3903cc2 ICU-21051 Add Locale::createCanonical performance test 2020-08-29 02:29:58 -07:00
Shane F. Carr
0101e2632c ICU-20164 Make NoUnit a zero-cost abstraction over MeasureUnit.
See #1230
2020-08-29 00:01:49 -05:00
Hugo van der Merwe
35eae09a7c ICU-21246 Handle kilogram SI prefix correctly
Fix kilogram parsing: ignore 'kilogram' as a stem, we have 'gram'.

Failures in the added unit test before the fix: withSIPrefix resulted
in 'microkilogram', and kilogram's prefix was considered to be
"ONE" (i.e. 10^0).
2020-08-29 00:07:08 +02:00
Shane F. Carr
0dbe1ae013 ICU-20927 Adding French narrow duration unit test. 2020-08-28 15:31:38 -05:00
Craig Cornelius
408cd128fc ICU-21242 rephrase documentation using term master
See #1255
2020-08-28 12:42:20 -07:00
David Beaumont
9bcd35aee0 ICU-21240 Removing unused makefile files and updating docs. 2020-08-28 20:41:03 +02:00
Hugo van der Merwe
66b2458a26 ICU-21066 Copy includelist of CLDR testData with tools/cldr/build.xml 2020-08-28 01:12:12 +02:00
Shane F. Carr
59cdbe1f53 ICU-21232 Improve performance of DecimalFormat#parse on long numbers 2020-08-27 14:33:05 -05:00
Fredrik Roubert
05d49fd373 ICU-21035 Replace backward compatibility locale_getKeywords() function.
By updating the last 3 callers to do dynamic memory allocation instead,
the fixed memory buffer function becomes obsolete.
2020-08-27 13:46:07 +02:00
Fredrik Roubert
d070fdddd1 ICU-21035 Remove obsolete use of CharString::getAppendBuffer().
The complicated buffer allocation code is inherited from times past but
no longer serves any purpose, it's now possible to instead simply call
the CharString copy constructor.
2020-08-26 13:49:26 +02:00
Fredrik Roubert
e8f3d5c657 ICU-21035 Replace backward compatibility ulocimp_getCountry() overload.
By always calling the dynamic memory allocation implementation directly
instead, the fixed memory buffer boundary gets pushed one step further
towards the edges.
2020-08-26 13:48:54 +02:00
Fredrik Roubert
db3278a71e ICU-21035 Replace backward compatibility ulocimp_getScript() overload.
By always calling the dynamic memory allocation implementation directly
instead, the fixed memory buffer boundary gets pushed one step further
towards the edges.
2020-08-25 00:30:54 +02:00
Frank Tang
3b188e46a4 ICU-21157 Fix test code
See #1256
2020-08-24 14:37:09 -07:00
Hugo van der Merwe
0387d1b988 ICU-21230 Add status to MaybeStackArray(int32_t newCapacity), plumb it through. 2020-08-24 22:55:26 +02:00
Markus Scherer
c8aa800735 ICU-21035 add & use CharString::extract(dest buffer)
See #1253
2020-08-21 16:29:25 -07:00
Markus Scherer
39da689d30 ICU-21184 rephrase docs/comments using the term grandfathered 2020-08-21 14:13:03 -07:00
Frank Tang
cde54fc5ba ICU-21157 Fix incorrect null termination.
See #1236
2020-08-20 16:22:34 -07:00
Fredrik Roubert
3a8e0a2fe9 ICU-21035 Replace backward compatibility ulocimp_getLanguage() overload.
By always calling the dynamic memory allocation implementation directly
instead, the fixed memory buffer boundary gets pushed one step further
towards the edges.
2020-08-20 23:38:30 +02:00
Erik Torres
a7a8cc3809 ICU-20808 Add test for the C locale to default to en_US_POSIX 2020-08-20 14:12:09 -07:00
Jeff Genovy
26775d7d13 ICU-21159 Fix memory leaks in cintltst TestUsingDefaultWarning. 2020-08-19 16:50:55 -07:00
David Beaumont
4cf2379d3c ICU-21066 Improvements in Ant build files
See #1224
2020-08-19 12:44:40 +02:00
Shane F. Carr
d2789a035b ICU-20774 Add option to icupkg to allow missing deps between resource files. 2020-08-17 20:09:08 -05:00
Frank Tang
e395e8abcd ICU-21159 Document U_USING_DEFAULT_WARNING in .h
Document the fact
uloc_getDisplay(Language|Script|Country|Variant|Keyword|KeywordValue)
would fallback with the code, case canonicalied in same cases, and
set the status to U_USING_DEFAULT_WARNING.

No change to the implementation behavior. Only complete the missing
comments and tweak line wrap, remove double spaces and add test to
validate this pre-existing behavior that I added the documents now.
2020-08-17 15:18:01 -07:00
Markus Scherer
9279e49d2f ICU-21030 validate ACE label edge cases 2020-08-14 14:32:47 -07:00
Markus Scherer
e19d12997b ICU-21212 full range check for Punycode digits 2020-08-14 11:37:40 -07:00
Paul Smith
e3f2c0dd70 ICU-21217 Windows: Fix link command for extra/scrptrun 2020-08-14 00:43:24 -07:00
Shane F. Carr
2ea56b531a ICU-21182 Adding UNumberRangeFormatter (C API).
See #1193
2020-08-12 21:33:38 -05:00
Shane F. Carr
88f092a9fb ICU-21191 Improve configurability of testtagsguards.sh 2020-08-11 21:22:31 -05:00
Shane F. Carr
bf2c2c5ca7 ICU-21176 Add aliases for terms "whitelist" and "blacklist" in data filter
See #1189
2020-08-11 21:21:59 -05:00
younies
7997955f2d ICU-21174 Add error-checking methods to MaybeStackVector & MemoryPool.
- MaybeStackVector::emplaceBackAndCheckErrorCode()
- MemoryPool::createAndCheckErrorCode()

Started with cherry-picks of:
3b505977c0e82659896125698389b59eabe50b14
63b93bde5c4c9fe030d490d5d448087aa0d4e5fd
2020-08-11 19:52:09 +02:00
Frank Tang
0eed48038b ICU-20725 Fix stack overflow of u_unescapeAt
See #1207
2020-08-10 14:59:38 -07:00
Paul Smith
ed268e77e3 ICU-21216 Windows: Ensure directory exists before running rc
When building in parallel it's possible that the rc command is invoked
before other rules get around to creating the output directory.
2020-08-10 12:16:47 -07:00
Hugo van der Merwe
4276d83e8a ICU-21174 Debug msg nitpick: s/MaybeStacArray/MaybeStackArray/ 2020-08-07 19:11:00 +02:00
Hugo van der Merwe
66d8df5338 ICU-21174 Delete not-to-be-used methods. Add a constructor warning. 2020-08-07 19:11:00 +02:00
Hugo van der Merwe
abdf0e667d ICU-21174 Add a memory allocation check in MeasureUnit. 2020-08-06 13:17:34 +02:00
Hugo van der Merwe
0b815fb8c3 ICU-21059 Load simple unit IDs from convertUnits.
PR: https://github.com/icu-units/icu/pull/41
Commit: 7877f0409019827b2d8d43b0843656322181972b
2020-08-05 10:57:19 +02:00
Hugo van der Merwe
5d97c9f13e ICU-21174 Increase safety of Measure and writeAffixes.
Measure: initialize unit to nullptr, and don't dereference it if it is
nullptr.

NumberFormatterImpl::writeAffixes: U_ASSERT not-null, instead of
segfaulting for coding mistakes.
2020-08-05 01:52:40 +02:00
Shane F. Carr
ee2d8b0103 ICU-21175 Add cnvalias as a dependency of misc_res 2020-08-04 18:50:43 -05:00
Hugo van der Merwe
6b595d1c01 ICU-21076 Delete unneeded MeasureUnit data & code 2020-08-05 01:48:32 +02:00
Frank Tang
863582c2a4 ICU-20465 Calendar/DateFormat listen to tz extension
See #1176
2020-08-04 13:33:03 -07:00
Frank Tang
8ca80c4b6d ICU-21158 Fix doc of UDISPCTX_NO_SUBSTITUTE
See #1200
2020-07-31 18:39:46 -07:00
Frank Tang
7ddc231195 ICU-20734 Improve fuzzer_driver
See #1204
2020-07-31 15:30:03 -07:00
Frank Tang
41d1d57af0 ICU-21122 Fix flaky TestAdoptCalendarLeak 2020-07-29 20:39:55 -07:00
Frank Tang
d7ec310436 ICU-20684 Fix uninitialized in isMatchAtCPBoundary
Downstream bug https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=15505
Fix Fuzzer-detected Use-of-uninitialized-value in isMatchAtCPBoundary

To test to show the bug in the new test case, configure and build with
CFLAGS="-fsanitize=memory" CXXFLAGS="-fsanitize=memory" ./runConfigureICU \
  --enable-debug --disable-release  Linux  --disable-layoutex

Test with
cintltst /tsutil/custrtst
2020-07-29 14:21:53 -07:00
Andy Heninger
895aff3bff ICU-21178 Add check for corrupt rbbitst.txt data.
In the test data from rbbitst.txt, two or more adjacent boundary markers with
no intervening test data were accepted, with no indication of a problem.

This situation occurred, as described in bug ICU-21178, with a bad import of
some test cases from CLDR. PR #1194 corrected the problem with the test data
in ICU4C. This PR adds code to flag this situation in the test data, and
also propagates the data fix to ICU4J's copy of rbbitst.txt.
2020-07-24 15:16:12 -07:00
Frank Tang
0d4b1c1cb9 ICU-21160 Fix the length return by preflight
See #1178
2020-07-21 18:05:20 -07:00
Andy Heninger
003b431540 ICU-13590 RBBI, improve handling of concurrent look-ahead rules.
Change the mapping from rule number to boundary position to use a simple array
instead of a linear search lookup map.

Look-ahead rules have a preceding context, a boundary position, and following context.
In the implementation, when the preceding context matches, the potential boundary
position is saved. Then, if the following context proves to match, the saved boundary is
returned as an actual boundary.

Look-ahead rules are numbered, and the implementation maintains a map from
rule number to the tentative saved boundary position.

In an earlier improvement to the rule builder, the rule numbering was changed to be a
contiguous sequence, from the original sparse numbering. In anticipation of
changing the mapping from number to position to use a simple array.
2020-07-21 14:39:15 -07:00
Ramon
2de2585f1b ICU-13339 Do not parse decimal point for integers 2020-07-20 23:52:59 -05:00
Hugo van der Merwe
e734111ee5 ICU-21192 MeasureUnit Identifier spec compliance: s/p/pow/
Specification:
https://www.unicode.org/reports/tr35/tr35-general.html#Unit_Identifiers
2020-07-16 01:58:32 +02:00
David Beaumont
dfc8b8b746 ICU-20697 Delete now unused files and documentation for the old ICU LDML tooling. 2020-07-14 20:27:28 +02:00
Michael Block
f917c43cf1 ICU-21178 Adding the trailing space back into two RBBI test cases. 2020-07-07 16:05:05 -07:00
Makoto Kato
c9037ca8d3 ICU-11992 uprv_tzname doesn't return valid time zone on Android 2020-07-06 10:11:20 -07:00
John Wilcock
6fe86f3934 ICU-21173 Add support for more currency variants. ICU4C equivalent of…
See #1184
2020-07-03 04:51:15 +02:00
Hugo van der Merwe
3fca290880 ICU-21174 Add a const version of MaybeStackVector::getAlias().
(Also makes a tiny tweak to appendAll() documentation.)
2020-07-02 01:56:08 +02:00
Markus Scherer
4d428cb8f3 ICU-21176 spoof checker: remove whitelist/blacklist metaphors from API docs 2020-07-01 15:21:05 -07:00
John Wilcock
9219c6ae03 ICU-13733 Added test for mismatching currency format for strict-mode parsing
See #1169
2020-06-30 02:22:57 +02:00
Diego Barrios Romero
de0306daaa ICU-21170 Fix function prototypes 2020-06-25 15:31:11 -07:00
Łukasz Wojniłowicz
ed56301abd ICU-20545 Ensure that path ends with detected file separator
CharString, when asked, appends U_FILE_SEP_CHAR at the end of the string
it holds, if it won't find U_FILE_SEP_CHAR or U_FILE_ALT_SEP_CHAR there.
The problem starts if the dir variable uses
U_FILE_ALT_SEP_CHAR which is not equal to U_FILE_SEP_CHAR. Then the
resulting path could look like this
../data\
instead of this
../data/

This patch uses U_FILE_SEP_CHAR unless it detects that the dir variable
doesn't use it, and uses U_FILE_ALT_SEP_CHAR instead.
2020-06-24 11:38:41 -07:00
Markus Scherer
ef12882fdb ICU-21144 LocaleMatcher setMaxDistance(), isMatch() 2020-06-23 13:56:49 -07:00
Andy Heninger
99dc49a0c0 ICU-20869 Fix compiler warning in FixedDecimal::getFractionalDigits().
Fix a clang compiler warning and a potential undefined behavior arising
from casting an out-of-range double to an int. See the Jira ticket for a
more detailed description of the problem.

This PR is to fix the immediate problem. Longer term, the function
may be replaced entirely - see issue ICU-21147.
2020-06-19 11:31:42 -07:00
Łukasz Wojniłowicz
cd5b025ef8 ICU-20545 Detect file separator char from dir
If udata_create won't find U_FILE_SEP_CHAR at the end of a dir variable,
then it appends it. The problem starts if the dir variable uses
U_FILE_ALT_SEP_CHAR which is not equal to U_FILE_SEP_CHAR. Then the
resulting path could look like this
../data\mappings/cns-11643-1992.ucm
instead of this
../data/mappings/cns-11643-1992.ucm

This patch uses U_FILE_SEP_CHAR unless it detects that the dir variable
doesn't use it, and uses U_FILE_ALT_SEP_CHAR instead.
2020-06-18 10:54:25 -07:00
Hugo van der Merwe
55127d6778 ICU-21165 Add LdmlConverter UNITS output, update SUPPLEMENTAL_DATA.
- Produce new supplementalData.txt and units.txt with:

      ant -f build-icu-data.xml -DoutDir=/tmp/new_dir \
          -DcldrVersion=37 -DoutputTypes=UNITS,SUPPLEMENTAL_DATA
2020-06-18 09:57:34 +02:00
Hugo van der Merwe
6a1df9e16c ICU-21169 Add SingleUnitImpl::getSimpleUnitID().
Also:
- Use BytesTrie not UCharsTrie.
- Add a nullptr check for a uprv_malloc.
2020-06-18 09:27:03 +02:00
Frank Tang
982c4799bf ICU-21161 Mark uloc_getDisplayScriptInContext static
Remove from urename.h
2020-06-17 23:26:33 -07:00
Andy Heninger
1eef362329 ICU-13565 Break Iteration, remove the dictionary bit from the implementation.
For identifying text that needs to be handled by a word dictionary for Break Iteration,
change from using a bit in the character category to sorting all dictionary categories
together, and recording the boundary between the non-dictionary and dictionary ranges.

This is internal to the implementaion. It does not affect behavior.
It does increase the number of character categories that can be handled using a
compact 8 bit Trie, from 127 to 255.
2020-06-17 12:00:14 -07:00
Frank Tang
e7bd5b1cef ICU-21109 minimum grouping digits in DecimalFormat
See #1152
2020-06-11 14:32:52 -07:00
Fredrik Roubert
0735ea8c6f ICU-21143 Applying non-zero offset to null pointer is undefined behaviour.
The result of pointer end + 1 will not be used if end is nullptr so it
doesn't really matter that the result of this operation is undefined,
but it's therefore also unnecessary to perform the operation at all.

Changing this removes this unnecessary operation and by doing so gives
the undefined behaviour sanitizer one thing less to worry about.
2020-06-04 15:13:36 +02:00
Andy Heninger
f0ad454691 ICU-13565 RBBI, make all state table row data be unsigned. 2020-06-01 20:05:17 -07:00
Jeff Genovy
723037953b ICU-21119 Enable verbose output from ICU data build when building DEBUG on Windows 2020-05-29 16:02:56 -07:00
Shane F. Carr
3ff6627ce6 ICU-21134 Copy additional data when toNumberFormatter is used
See #1156
2020-05-28 22:33:58 -05:00
Frank Tang
ec7e29f2b6 ICU-13786 Fix addLikelySubtags/minimizeSubtags
See #1140
2020-05-27 18:36:36 -07:00
Frank Tang
c5ebb80a73 ICU-13565 Reduce size of BreakIterator brk files
See #1100
2020-05-27 14:26:10 -07:00
Steven R. Loomis
4231ca5be0 ICU-21098 fix ticket URLs for logKnownIssue tickets.
- Still allows "1234" or "cldrbug:1234" format ticket IDs
- However, docs recommend "ICU-1234" or "CLDR-1234" format
in the future.
- Other ticket IDs could be used, but won't be linkified.
2020-05-20 15:58:51 -07:00
Markus Scherer
eaee0b175e ICU-21029 LocaleMatcher: add option to turn off default locale 2020-05-20 15:16:28 -07:00
Stephan Szabo
b6eb747550 ICU-10879 Split out OBJECTS from Makefiles into separate files 2020-05-20 11:37:05 -07:00
Shane F. Carr
715d254a02 ICU-21081 Make U_ASSERT C++14 compatible 2020-05-08 19:03:43 -07:00
Jeff Genovy
82a5959b86 ICU-21102 Fix broken builds on Windows when using a pre-built data file (from the tgz). 2020-05-07 14:13:06 -07:00
Peter Edberg
6fdd303532 ICU-21096 adjust logKnownIssues for ICU rbbitst 2020-05-06 17:29:49 -07:00
Peter Edberg
d39899350d ICU-21099 udat_toCalendarDateField should handle all UDateFormatFields and out of range 2020-04-28 09:58:50 -07:00
yumaoka
a951ab59c7 ICU-21094 tzdata2020a to ICU. 2020-04-25 14:17:28 -04:00
Robert Melo
440cef61a7 ICU-21071 Fix lenient parse rules
- Check non-lenient rules before call lenint parsing
- Remove logKnownIssue 9503 from test code
- Adjust TestAllLocales test on ICU4C
- Add lenient checks on ICU4J
2020-04-24 15:46:48 -03:00
Craig Cornelius
5944e1856c ICU-21052 Fix two compilations with UCONFIG_NO_CONVERSION option in t…
See #1127
2020-04-23 22:10:36 -07:00
Shane F. Carr
a5c940dfd8
ICU-21087 Merge maint/maint-67 to master 2020-04-22 20:15:39 -05:00
Peter Edberg
125e29d549 ICU-21061 integrate CLDR release-37-beta3 to master
(cherry-picked from 71fa037844)
2020-04-22 10:49:10 -07:00
Frank Tang
f0ada59042 ICU-20949 Fix compound unit in "ar", "ne" locales
Do not assume the "one" pattern always contains "{0}"
2020-04-22 10:39:01 -07:00
Shane F. Carr
b5973eee64 ICU-21061 ICU-21085 Merge latest changes from double-conversion 2020-04-21 20:31:38 -05:00
Elango Cheran
925376a904 ICU-21055 Remove test inputs causing noknownissues test run to hang 2020-04-21 12:49:30 -07:00
Craig Cornelius
2f4e2e43ce ICU-21053 Fix compile problems with UCONFIG_NO_FORMATTING = 1
See #1115
2020-04-20 16:47:36 -07:00
Frank Tang
3dce0ab5c6 ICU-21082 Fix error: no member named 'abs' in"std" 2020-04-18 00:36:20 -07:00
Hugo van der Merwe
e03fa70541 ICU-21060 Fix behaviour of -per-, -and-, and dimensionless units. 2020-04-18 00:57:02 -05:00