Commit Graph

7912 Commits

Author SHA1 Message Date
Shane F. Carr
48df66704c ICU-20666 Adding insert/appendChar16 to FormattedStringBuilder. 2019-06-25 06:24:20 +05:30
Andy Heninger
5c23416308 ICU-13637 Documentation for doing break iterator updates. 2019-06-21 10:31:40 -07:00
Norbert Runge
1606c4c586 ICU-20652 Adds Makefile.in, a fuzzer driver, and minor changes to in fuzzer
targets to test/fuzzer/ directory. This will enable compilation and
smoke test of fuzzer targets as part of the ICU continuous build.

ICU-20652 Fixed exit-on-error behaviour of fuzzer targets execution.
Minor clean-ups and improvements

ICU-20652 Modifies fuzzer/Makefile.in to fix Windows build issue.

ICU-20627 Adds explicit enablement of fuzzer targets build to ICU4C
configuration and Makefile.in. File 'configure' was created from
'configure.ac' by executing 'autoreconf'.

autoreconf added some new entries into 'configure' about runstatedir. Not sure
why it did this, they are not related to fuzzer.
2019-06-18 14:43:33 -07:00
Shane Carr
8667d0a106 ICU-20639 Add "mol" 3-letter language code to C++ map. 2019-06-18 13:47:27 -07:00
Frank Tang
13b3cbaab7 ICU-20149 allow duplicate unicode attribute 2019-06-17 23:51:21 -07:00
Shane Carr
3bdb509ac5 ICU-20661 Adding test that (U)Locale constructor accepts BCP47. 2019-06-17 19:54:06 -07:00
Mihai Nita
6ce3295e4d ICU-20622 Fixing several MeasureFormat problems 2019-06-17 13:44:38 -07:00
Frank Tang
78f341ce7e ICU-20654 Add hour/minute for "this hour/minute"
Fix expectation in cintltest

add tests

ICU-20654 Add hour/minute for "this hour/minute"

See #674
2019-06-12 17:43:18 -07:00
Azamshul Azizy
5174ad5511 ICU-20631 Fix desired currency not set for some NumberFormat currency styles 2019-06-10 11:09:21 -07:00
Shane Carr
2b611dbf6e ICU-20593 Trace instrumentation for data loading.
- Adds hooks to utrace.h to record when ICU reads from locale data.
- Adds userguide page to document the new hooks.
2019-06-07 15:56:02 -07:00
Shane Carr
d846d72bba ICU-20629 DTPG: Fixing uncaught exception in Java. 2019-06-04 16:10:10 -07:00
Shane Carr
46c86b47cc ICU-20629 Fixing DTPG hour-format locale and region fallback logic.
Includes changes in C and J.  Makes region.cpp no longer depend on DecimalFormat.  See also: CLDR-13071, ICU-20640, ICU-9982.
2019-05-29 16:37:40 -07:00
Norbert Runge
633a975849 ICU-20638 Renames fuzzer target files to end with the .cpp suffix. Was .cc. 2019-05-29 16:06:10 -07:00
Shane Carr
c8c3fbca28 ICU-20616 Allow bidi marks around the sign in exponent parsing. 2019-05-27 22:39:18 -07:00
Andy Heninger
afa9b9b48e ICU-20588 UMutex, add cleanup of underlying mutexes, and simplify usage model 2019-05-24 13:24:59 -07:00
Frank Tang
bb22fc1a27 ICU-20602 add LocaleBuilder::copyErrorTo
Check the status after the setter and test err.

Add more check for errors.

change comments
2019-05-22 18:03:12 -07:00
Frank Yung-Fong Tang
b7ffd7b6d0 ICU-20613 fix missing </ClInclude> 2019-05-21 16:03:20 -07:00
Alon Bar-Lev
a5bbd505d7 ICU-20578 headers: guard all C++ headers using U_SHOW_CPLUSPLUS_API
support including all files in C

cleanup and simplify the test/hdrtest

Signed-off-by: Alon Bar-Lev <alon.barlev@gmail.com>
2019-05-14 17:18:06 -07:00
Frank Tang
53dd621e3a ICU-12760 support UDISPCTX_TYPE_SUBSTITUTE_HANDLING
add tests

remove printf

fix localeDisplayName and add tests

fix fallback

remove get
2019-05-13 17:38:07 -07:00
Frank Tang
cb40d8b1a5 ICU-20595 Make icu::TimeZone::AdoptDefault thread safe
correct the mutex

Remove comments about not thread safe
2019-05-13 16:00:27 -07:00
Andy Heninger
b772241b52 ICU-20520 UMutex refactoring.
- Use STATIC_NEW for mutex creation, to avoid order-of-destruction problems
    by avoiding destruction altogether, while avoiding memory leak reports.

  - Remove UConditionVar, replace with direct use of std::condition_variable
2019-05-07 13:50:49 -07:00
Shane Carr
702fdb6c33 ICU-20593 Renaming Python buildtool to icutools.databuilder. 2019-05-07 13:42:06 -07:00
Markus Scherer
f1d4aa72d1 ICU-20572 build & test with U_NO_DEFAULT_INCLUDE_UTF_HEADERS 2019-05-02 09:10:25 -07:00
Jeff Genovy
693adf3987 ICU-20558 Fix regression in DateTimePatternGenerator
This fixes a regression introduced by commit 
b12a927c93 for issue ICU-13778.

The above commit improved the error checking in the
DateTimePatternGenerator class, adding checks for errors/failures
where there previously was none at all. This was done in order to
catch catastrophic errors like out-of-memory (OOM), and properly
report them to the caller, rather than ignoring/hiding these errors.

However, in doing so it exposed a case where the code was depending
on ignoring errors in order to fall-back to the Gregorian calendar
when the default ICU locale is set to root.

This restores the previous behavior, by allowing the error of
U_MISSING_RESOURCE_ERROR to fall-though and continue without
reporting back an error to the caller.

Note: This regression was technically introduced in ICU 63, and
also effects ICU 64 as well.
2019-04-25 10:52:06 -07:00
Fredrik Roubert
711e7e003a ICU-20573 Handle NULL return value correctly, it means empty not error. 2019-04-25 13:05:14 +02:00
Andy Heninger
d685cacd9b ICU-20391 Fix regexp crash with nested look-behinds, from fuzz testing. 2019-04-17 22:17:47 -07:00
Shane F. Carr
14eb026570
ICU-20511 Merge release-64-2 to master 2019-04-17 14:15:59 -07:00
Shane Carr
08766f4c02 ICU-20511 Merge tag 'release-64-2' into 64-merge-branch 2019-04-17 13:37:22 -07:00
yumaoka
f508bc491e ICU-20554 Disabled current date sensitive Japanese era test cases for now. 2019-04-15 09:49:04 -04:00
Shane F. Carr
be25c277fd
ICU-20511 Merge release-64-2-rc to master 2019-04-12 16:57:29 -07:00
Andy Heninger
bdb1806580 ICU-20544 Regex, Fix assertion failure in positive look-behind 2019-04-12 15:27:40 -07:00
Shane Carr
5a4d26a900 ICU-20511 Merge tag 'release-64-2-rc' into 64-merge-branch
- Rebuilds jar files to resolve merge conflict
2019-04-11 15:29:44 -07:00
Shane F. Carr
cab01e522e
ICU-20511 Merge release-64-1 to master 2019-04-11 15:20:09 -07:00
Andy Heninger
7053363323 ICU-20544 Regex, fix min/max match length computation with negative look-behind patterns. 2019-04-10 22:38:25 -07:00
yumaoka
cc8946607a ICU-20515 Merging tz2019a changes. 2019-04-11 00:45:43 -04:00
Shane F. Carr
a268e3a299 ICU-20511 Merge branch 'master' into 64-merge-branch 2019-04-10 19:13:00 -07:00
Peter Edberg
5b3f1c01ed ICU-20550 jaEra: use all valid eras for calendar calculations (#614) 2019-04-10 19:02:24 -07:00
Shane Carr
ab657778e4 ICU-20543 Fix -Wundef in library and test code. 2019-04-10 18:52:16 -07:00
Peter Edberg
2f06d1de55 ICU-20537 jaEra: DateIntvFmt load fmts with G, SimpDateFmt.applyPattern update Gannen use, fix tests 2019-04-08 08:35:48 -07:00
Shane Carr
6daab85db4 ICU-20429 Renaming [Number->Formatted]StringBuilder and refactoring.
- StringSegment, ICU4C:
  * Moved to top icu namespace
  * Compilation unit renamed to string_segment.
- NumberStringBuilder, C and J:
  * Moved to main icu namespace
  * Compilation unit renamed to formatted_string_builder
  * Renamed class to FormattedStringBuilder
- Moves nextPosition logic of NumberStringBuilder to helper class
2019-04-05 20:08:07 -05:00
Peter Edberg
c4eef82761 ICU-20515 64.2 BRS, integrate CLDR release-35-1-alpha 2019-04-05 15:59:29 -07:00
Steven R. Loomis
b76cb6517e ICU-20526 fix pkgdata where LD_SONAME has a trailing space
- added PKGDATA_TRAILING_SPACE to all of the pkgdataMakefile.in file.
- NOTE: Users who create their own pkgdata.inc / icupkg.inc files may need
   to recreate this PKGDATA_TRAILING_SPACE behavior.

- used the above variable, normally undefined, in mh-* files that need a trailing space

- Also, fixed use of system() in pkgdata.cpp per ICU-20538
This was causing pkgdata to return a zero status even on clang
failure, masking this issue.

(cherry picked from commit 83a0542b5b)
2019-04-05 10:53:59 -07:00
Markus Scherer
0565894534 ICU-20497 Unicode 12.1 2019-04-04 10:23:24 -07:00
Steven R. Loomis
83a0542b5b ICU-20526 fix pkgdata where LD_SONAME has a trailing space
- added PKGDATA_TRAILING_SPACE to all of the pkgdataMakefile.in file.
- NOTE: Users who create their own pkgdata.inc / icupkg.inc files may need
   to recreate this PKGDATA_TRAILING_SPACE behavior.

- used the above variable, normally undefined, in mh-* files that need a trailing space

- Also, fixed use of system() in pkgdata.cpp per ICU-20538
This was causing pkgdata to return a zero status even on clang
failure, masking this issue.
2019-04-03 16:43:42 -07:00
Shane Carr
c86028c70c ICU-20439 Fix internal and draft headers. 2019-03-25 07:37:35 -07:00
Shane Carr
e318c0c374 ICU-20494 Fixes to very large magnitude exponents in number parsing.
- Do not depend on ArithmeticException string in ICU4J.
- Return correct string in ICU4C.
- Fix related issue in applyMaxInteger.
2019-03-25 07:17:36 -07:00
Shane F. Carr
13889bece1
ICU-20511 Merge maint/maint-64 to master 2019-03-22 11:16:43 -07:00
Shane Carr
2e846616c4 ICU-20499 Fixing code path for plural form in MutablePatternModifier. 2019-03-14 02:02:52 -07:00
Shane Carr
56ffae8a0b ICU-20489 Removing resfiles.mk files.
Builds res_index.txt based on directory glob minus aliases read from deprecates XML file.

In ICU 64, please use the ICU Data Build Tool instead of reslocal.mk for locale filtering.
2019-03-14 01:51:52 -07:00
Peter Edberg
84e392e426 ICU-20439 64 BRS, integrate CLDR release-35-alpha4 2019-03-13 09:12:40 -07:00
Markus Scherer
98589d9cc7 ICU-20203 Unicode 12 final data (only trivial changes) 2019-03-13 08:57:05 -07:00
Peter Edberg
8943f89a84 ICU-20471 setFormatWidth to 0 should cause padding to be ignored 2019-03-12 15:17:42 -07:00
Andy Heninger
bc4bb89af2 ICU-20488 mutex static constructor fixes.
Remove the dependencies from the ICU library code on static constructors
that were introduced by using std::mutex and condition variables. The
mutexes are lazily initialized by embedding them as local static variables
in getter functions, and relying on the C++ compiler/runtime to do thread
safe initialization of them.
2019-03-12 09:52:16 -07:00
Shane Carr
ffd8baf16d ICU-20484 Narrow currency symbol should fall back to short symbol, C and J.
- Includes fixes to tests.
2019-03-08 17:06:16 -08:00
Shane Carr
cda7ca7e83 ICU-20469 Adding user guide for number skeletons.
Also fixes a minor bug in the syntax and adds tests.
2019-03-08 16:32:47 -08:00
Andy Heninger
f7b36d39bc ICU-11908 NumberingSystem, fix the memory management of static cache of numsys names.
Add thread safe cache initialization.
2019-03-08 15:06:53 -08:00
Steven R. Loomis
3a28fb7216 ICU-20479 don’t leave junk in source directory on configure or make check
- see also ICU-20062
- add a `-B` option to the two python invocations on Windows
- set PYTHONDONTWRITEBYTECODE in configure.ac and icudefs.mk.in

Co-authored-by: Fredrik Roubert <roubert@google.com>
2019-03-08 14:28:27 -08:00
Shane Carr
c009f42ca1 ICU-20469 Adding userguide for FormattedValue and ICU Data Build Tool.
- Creates new directory structure to store userguide markdown files.
2019-03-07 11:55:40 -08:00
Andy Heninger
e559b30309 ICU-20359 Fix stack overflow in Regex Pattern Compile. 2019-03-07 10:31:30 -08:00
Norbert Runge
47ef6175f9 ICU-20438 Fixes issues found during BRS configuration test task. 2019-02-28 12:55:01 -08:00
Norbert Runge
b8364d38ed ICU-20438 Fixes issues found in the no-data testing of ICU4C (BRS health check)
ICU-20438 Review feedback worked in.
2019-02-28 09:59:48 -08:00
Norbert Runge
513eff5408 ICU-20438 Adds fuzzer directory to testinternalheaders.sh 2019-02-27 14:05:41 -08:00
Shane Carr
60f4e1ba83 ICU-10923 Fixing dependency graph and filter logic for collation.
- Fixes filterrb.cpp to check for wildcard when at a leaf.
- Adds additional verbose logging to genrb.
- Fixes filtration to add deps to dep_targets instead of dep_files.
- Separates dep_files to common_dep_files and specific_dep_files.
2019-02-26 20:54:04 -06:00
Shane Carr
f3be3a9ae5 ICU-20438 Removing old logKnownIssue fixed by ICU-13591 2019-02-26 19:26:59 -06:00
Peter Edberg
30d2034597 ICU-20438 64rc BRS, integrate CLDR alpha2, update MeasureUnit APIs [& resolve conflicts] (#485) 2019-02-24 22:28:51 -08:00
Fredrik Roubert
c3abe48e1c ICU-20447 fix uloc_getName(x) same as Locale(x).getName() etc. for ""/"und"/"root" 2019-02-23 16:21:57 +01:00
Peter Edberg
a9b26a447d ICU-20441 fix uninitialized fHasHanYearChar 2019-02-21 23:27:33 -08:00
Peter Edberg
9a7bf5cea8 ICU-20441 force Gannen use for ja@calendar=japanese non-numeric formats if no override (#474) 2019-02-21 19:26:52 -08:00
Peter Edberg
2c1fcb0a96 ICU-20408 Integrate jpanyear support and related "ja" format changes [& resolve conflicts] (#465) 2019-02-21 11:52:33 -08:00
Markus Scherer
4f20fea3ba ICU-20280 PluralRules::forLocale() ignore locale extensions 2019-02-21 11:32:05 -08:00
Fredrik Roubert
09bf9f2845 ICU-20273 Resolve inconsistent behavior of "root", "und", "" in locales 2019-02-21 20:18:35 +01:00
Jeff Genovy
3ebd817504 ICU-20351 A few more MSVC warning cleanups. (Mostly adding static_cast) 2019-02-21 10:43:18 -08:00
Shane Carr
b36dbedf34 ICU-20417 Adding parity between NoUnit and MeasureUnit Percent for short forms.
- Use Percent pattern for MeasureUnit Percent instead of the short or narrow form pattern from CLDR.
2019-02-21 02:28:51 -06:00
Shane Carr
c81d1e94a0 ICU-13591 Refactoring ICU4C MeasureFormat to call NumberFormatter directly.
- Removes redundant data loading in MeasureFormat
2019-02-20 19:15:03 -06:00
Andy Heninger
a03a52782e ICU-20197 ICU4C Multithreaded tests cleanup 2019-02-20 15:30:23 -08:00
Norbert Runge
219730e167 ICU-20217 Interprets fuzzer data as UCHar* instead of UTF-8. The conversion
from assumed UTF-8 resulted in an extremely large percentage of Unicode
replacement characters in the data passed to the API under test.

ICU-20217 Uses fuzzer generated bytes to make random selection of locales, converters,
etc., replacing the random number generator. This way the fuzzer can control
the selections.

ICU-20217 Minor follow-ups from code review.
Removes fuzzer target break_iterator_utf32_fuzzer which does not perform
anything useful what the regular break iterator fuzzer target already performs.

ICU-20217 Fixes for-loop body.

ICU-20217 Uses am allocated buffer to pass head-truncated fuzzer data to the
API under test. The fuzzer may otherwise not detect buffer underflow.
by

ICU-20217 Typing fix.

ICU-20217 Fixing typing.

ICU-20217 Improve fuzzer targets, move truncated fuzzer data into a
new buffer to prevent that buffer underflow goes undetected.

ICU-20217 Fixes buffer management of fuzzer-provided data.

ICU-20217 Factor in PR review comments.
2019-02-20 15:22:26 -08:00
Peter Edberg
ba100f21b5 ICU-12902 make create/getInstanceForSkeleton use correct calendar; don't try to capitalize empty field 2019-02-20 13:50:34 -08:00
Peter Edberg
641326d7b8 ICU-20078 Add JP_ERA_2019 constants, export enableTentativeEra(), add intervalFmt tests with eras 2019-02-20 10:42:49 -08:00
Jeff Genovy
9f87d2d4be ICU-20413 ICU4C: OOM not handled in initStaticTimeZones() in timezone.cpp.
-Use static allocated memory and placement new to avoid OOM failures.
2019-02-20 10:41:40 -08:00
Shane F. Carr
7791a58a83 ICU-10923 Adding wildcard resource matching. 2019-02-20 12:20:38 -06:00
Shane F. Carr
8db0321f54 ICU-10923 Adding file replacement mechanism to buildtool. 2019-02-20 12:20:25 -06:00
Fredrik Roubert
168c97f32a ICU-20431 Both und_XX and _XX should fall back to the default locale 2019-02-20 13:06:51 +01:00
Jeff Genovy
8858da9b7f ICU-20414 Add internal ures_openDirectFillIn API, use in getTZDataVersion to avoid memory allocation for UResourceBundle. 2019-02-19 16:58:38 -08:00
Shane Carr
68168a6067 ICU-13731 Adding test for default currency symbol. 2019-02-18 21:29:51 -08:00
Peter Edberg
2b82c096e0 ICU-20383 DateTimePatternGen should map 'j' using timeData, not short time cycle (#419) 2019-02-17 19:55:52 -08:00
Mihai Nita
f78e1a53d6 ICU-10675 Documentation wrong on ICU4C ListFormatter 2019-02-15 17:21:33 -08:00
Frank Tang
94ff6b1024 ICU-20410 Fix grandfathered tag w/ extensions 2019-02-15 16:51:31 -08:00
Shane Carr
0ef0629736 ICU-20108 Adding new parseLenients from CLDR 34 to ICU. 2019-02-15 16:51:17 -08:00
Shane Carr
35b182767f ICU-20409 Additional refactoring of FormattedValue implementations.
- Migrates Number[Range] formatter to helper macros.
- Adds additional macros.
- Syncs docstrings between subclasses.
2019-02-15 16:50:22 -08:00
Shane Carr
8c2de1401e ICU-20144 Adding better documentation and behavior testing on NumberingSystem. 2019-02-15 15:12:29 -08:00
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 F. Carr
a0f02b12d0 ICU-20121 Adding span field for FormattedList. 2019-02-14 16:05:51 -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
d243867c11 ICU-20138 Adding matchesField as draft and removing getConstraintType. 2019-02-14 13:45:49 -08:00
Markus Scherer
1afef30549 ICU-20187 drop support for long-obsolete locale ID variants 2019-02-14 12:27:42 -08:00
Frank Tang
6942013a38 ICU-20328 Implement LocaleBuilder
Design Doc: https://goo.gl/Qf12p3
2019-02-13 17:24:38 -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
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
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
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
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
Shane Carr
96556c2d4c ICU-10923 Fixing warning in testdata build file. 2019-02-06 18:59:31 -08:00
Markus Scherer
2982d6c233 ICU-13081 test self-move without clang warning 2019-02-06 18:11:00 -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
Peter Edberg
e8bcc60d6f ICU-20347 In ICU4J, parsing emoty string should set PARSE_ERROR as before; check ICU4J behavior 2019-02-06 00:22:47 -08:00
Shane F. Carr
1624176dd9 ICU-20138 Adding FormattedValue helper implementation for FPI handlers.
- Changes FieldPositionIterator (FPI) to use tetrads in the UVector32.
2019-02-05 22:54:13 -08:00
Shane F. Carr
9bb910b8d0 ICU-20138 Implementing ufmtval_nextPosition and additional test infra.
- Adds test infra for multi-category formatted values.
- Adds helper method ConstrainedFieldPosition#matchesField, currently internal.
2019-02-05 22:54:13 -08:00
Peter Edberg
67461d80dc ICU-20253 ICU4C RelativeDateTimeFormatter should fall back to OTHER case, as in ICU4J 2019-02-05 19:19:28 -08:00
Peter Edberg
ba4dc89169 ICU-20374 need unum_close in new TestParseCases 2019-02-05 14:42:21 -08:00
Peter Edberg
ff04436fe5 ICU-20374 Formattable::internalGetCharString should produce int string for types kLong or kInt64 2019-02-05 14:42:21 -08:00
Jeff Genovy
654278627a ICU-20388 ICU4C: intltest fails with a "Debug Assertion Break" on MSVC when compiled for Debug.
Need to use free() with malloc() instead of uprv_free().
2019-02-05 14:04:10 -08:00
Jeff Genovy
00596d3027 ICU-13847 ICU-20381 Improve handling of errors (Out-of-Memory) in DecimalFormat class.
- Use move assignment for fields->formatter (LocalizedNumberFormatter) instead of creating new heap object every time.
- Add test cases for DecimalFormat object in invalid state.
- Protect against self-assignment in assignment operator.
- Fix segmentation fault when attempting to compare valid and invalid DecimalFormat objects.
- Changes based on review feedback from Shane.
- Fix minor typos in the public header file.
2019-02-05 14:00:40 -08:00
Norbert Runge
f52a75b2eb ICU-20217 Replaces seed corpus zip files with the original txt files.
The problem is that Docker receives zip files only as LFS links when
cloning ICU from GitHub. Converting the txt files into zip files, which
is the required corpus format for the fuzzer, will be done by the oss-fuzz
build script.

ICU-20217 Adds fuzzer seed corpus files to the list of files that don't have
copyright notice.
2019-02-01 16:07:25 -08:00
Shane F. Carr
19407640f8 ICU-20357 Adding std::unique_ptr conversions to LocalXyzPointer macro. 2019-01-28 21:23:35 -08:00
Norbert Runge
b4fef640cf ICU-20217 Adds additional ICU4C fuzzers. 2019-01-28 15:55:17 -08:00
Shane Carr
1f85e94068 ICU-13839 Adding FormattedNumber API to PluralRules.
- Makes new dependency class for PluralRules+FormattedNumber.
2019-01-28 11:46:00 -08:00
Shane Carr
1a453301ee ICU-10923 Adding unix-exec mode to buildtool and updating help page.
- Renames --format flag to --mode.
- Renames windirect to windows-exec.
2019-01-25 15:34:44 -08:00
Shane Carr
db94f46377 ICU-13800 Adding clone() on [Un]LocalizedNumber[Range]Formatter.
- Returns a LocalPointer that can be converted to std::unique_ptr.
2019-01-25 15:29:21 -08:00
Jeff Genovy
5c8960e59e ICU-20074 Revise UPRV_UNREACHABLE macro to always call abort().
Moved the macro from platform.h to uassert.h.
Removed any "unreachable" code that previously occurred after the UPRV_UNREACHABLE macro is used.
Changes based on review from Andy.

Co-authored-by: Daniel Ju <daju@microsoft.com>
2019-01-24 18:50:04 -08:00
Shane Carr
b7a3571b21 ICU-20357 Adding LocalPointer conversion methods to/from std::unique_ptr
- Requires the right side to be an rvalue reference.
- Includes move constructor, move operator, and conversion operator.
2019-01-24 17:51:07 -08:00
Frank Tang
4104d33501 ICU-20355 Fixing Java currency long name field.
- Adds test in ICU4C and ICU4J.
2019-01-24 17:33:27 -08:00
Shane Carr
7507f5322f ICU-13657 Adding NumberFormatter skeleton factory method with UParseError.
- Includes small fixes to StringSegment and to tests.
2019-01-24 16:33:00 -08:00
Jeff Genovy
85600f2639 ICU-20370 Fix error checking in uloc_getLCID function. 2019-01-24 15:00:03 -08:00
Shane Carr
c31fec6b14 ICU-13746 Removing number formatting APIs deprecated in ICU 62.
Includes both ICU4C and ICU4J.
2019-01-24 14:50:03 -08:00
Shane Carr
1f7d8ababe ICU-20358 Clean up grouping resolution in DecimalFormat#toPattern(). 2019-01-18 17:40:49 -08:00
Shane Carr
335abbe3ac ICU-20334 Additional python3 compatibility changes to depstest.
Also adds python3 depstest call to .travis.yml.
2019-01-17 22:38:18 -08:00
Luca Stefani
cc66247297 ICU-20334 Add python3 support to icu4c scripts
Test: Execute every python script with python 2 and 3
2019-01-17 22:38:18 -08:00
Shane Carr
c0a64b5ea1 ICU-20183 Adding CurrencyUnit StringPiece constructor.
- Adds function uprv_memchr.
2019-01-17 15:41:56 -08:00
Shane F. Carr
ac359112a1 ICU-20348 Fixing DecimalFormat set affix currency behavior.
- Includes minor changes to tests.
2019-01-17 11:32:38 -08:00
Jeff Genovy
33d7868d45 ICU-20351 Warning cleanup changes for ICU4C under MSVC. 2019-01-16 16:43:02 -08:00
Norbert Runge
e6cd35e005 ICU-20217 Fix comment syntax in fuzzing dictonary for ICU regular expressions. 2019-01-15 08:41:19 -08:00
Daniel Ju
7453181fff ICU-20074 Define UPRV_UNREACHABLE macro for unreachable code
Replaced occurrences of U_ASSERT(FALSE) with new UPRV_UNREACHABLE macro.
2019-01-14 14:16:26 -08:00
Norbert Runge
4893313bd9 ICU-20217 Adds ICU fuzzer target originally from https://github.com/google/oss-fuzz/tree/master/projects/icu directly into ICU on GitHub.
Also, puts code under Unicode copyright notice. Code is from oss-fuzz project and was originally contributed by a Googler as well.
2019-01-11 15:03:27 -08:00
Shane Carr
768b577e6a ICU-20138 Adding FormattedValue APIs in C, C++, and Java.
- Wires up FormattedNumber[Range] in applicable languages.
- Adds new header files and tests, with minor cleanup to old tests.
- Adds code to guarantee terminating NUL in FormattedNumber[Range].
- Cleanup of API docs for inherited methods in FormattedNumber[Range].
2019-01-10 17:02:49 -06:00
Andy Heninger
58786f5cbe ICU-12079 Full width digits become numeric for word break. 2018-12-18 16:36:06 -08:00
Shane Carr
b0d572c7f1 ICU-10923 Python logic for resource filters.
- Adds schema validation for config file
- Adds JSON comment stripping utility
2018-12-17 17:11:25 -08:00
Jeff Genovy
5bc7485de6 ICU-20302 Timezone detection fails on Windows 7. Also add a test case for Windows time zone detection failing. 2018-12-13 17:18:54 -08:00
Shane Carr
7ec3357d70 ICU-10923 Adding --filterDir option to genrb.
- Reads, parses, and applies the filter file syntax.
- Removes unused keys from the resource bundle.
- Adds sample filter txt file with test in intltest.
2018-12-13 16:18:47 -08:00
Shane Carr
1b5c721ef2 ICU-20300 Changing buildtool nametuples to polymorphic classes. 2018-12-13 13:53:18 -08:00
Mihai Nita
2666d18e54 ICU-9622 Adding support for date/time skeletons 2018-12-13 13:20:33 -08:00
Markus Scherer
3b16ae86c6 ICU-20292 u_charFromName() prevent code point integer overflow, and limit to at most 8 hex digits 2018-12-12 14:08:37 -08:00
Victor Chang
95b9d5ec87 ICU-20307 Add reldatefmt.h and compactdecimalformat.h into test/hdrtst/cxxfiles.txt 2018-12-12 06:48:57 -08:00
Shane Carr
a2a39e69d0 ICU-10923 Adding initial version of data file filtering.
- Reads filters.json or .hjson from ICU_DATA_FILTER_FILE environment variable
- Adds DepTarget for dependency semantics, and warns for missing deps.
- Fixes certain tests that crash with sliced locale data.
- Includes support for 4 filter types.
2018-12-07 16:51:18 -08:00
Shane Carr
a4dd8b3702 ICU-10923 Refactoring in preparation for data file filtering.
- Adding SpaceSeparatedList abstraction.
- Adding ListRequest abstraction.
- Adding separate dep_files option to SingleExecutionRequest.
- Removing unused variable pkg_exclusions.
- Adding IndexTxtRequest abstraction.
- Moving curr/supplementalData.txt into its own target.
- Changing getters to properties on Config.
- Re-indenting and refactoring data/BUILDRULES.py
- Adding category to request tuples. Refactoring translit.
2018-12-07 16:12:38 -08:00
Frank Tang
de4031b783 ICU-11053 Fix locale parsing which has _ timezone 2018-12-05 19:16:13 -08:00
Shane Carr
bb2b390b87 ICU-20186 Adding test for leading and trailing spaces in DecimalFormat. 2018-12-05 15:37:38 -08:00
Markus Scherer
ea7c030961 ICU-20203 update ICU to Unicode 12 beta
- data as of 2018-nov-26
- API constants for new blocks & scripts
- sync RBBIMonkeyTest.java test data with C++
2018-11-28 23:13:07 +01:00
Shane Carr
1e4a8d3c29 ICU-20186 Adding test for semicolon behavior and spacing in DecimalFormat. 2018-11-26 18:49:32 -06:00
Fredrik Roubert
6f932b744d ICU-20276 Accept empty strings in Locale::setUnicodeKeywordValue().
The API documentation is perfectly clear about this, an empty string for
the value means that the keyword should be removed:

  @param keywordValue value of the keyword to be set. If 0-length or
   NULL, will result in the keyword being removed. No error is given if
   that keyword does not exist.
2018-11-20 19:24:33 +01:00
Andy Heninger
47d455a725 ICU-20179 Remove platform-specific mutex and atomics implementations.
Remove all POSIX and Win32 specific mutex, atomic and threading implementations
in favor of C++11 std library functions.

Move the related (internal) ICU types and functions into the icu namespace.
2018-11-19 17:17:09 -08:00
Shane Carr
c0799c141b ICU-20230 Implementing COMPACT field.
Adds some plumbing to allow MutablePatternModifier to set fields, and otherwise builds upon the infrastructure from the previous commit to add the MEASURE_UNIT field.
2018-11-19 16:21:36 -07:00
Shane Carr
ee9c0b944c ICU-10923 Rewriting data build orchestration in Python.
- Creates new Python package in icu4c/data/buildtool
- Creates BUILRDULES.py in icu4c/data and icu4c/test/testdata, unified between Unix/Windows
- Removes most data build orchestration rules from makedata.mak, testdata.mak, data/Makefile.in, and test/testdata/Makefile.in
- Removes pool.res files and builds them on the fly instead
2018-11-19 13:43:35 -07:00
Andy Heninger
6c781b1428 ICU-10183 Use std::mutex by default; clean up related dependency check issues. 2018-11-18 16:28:40 -08:00
Shane Carr
74bbf9e381 ICU-13267 Implementing MEASURE_UNIT field.
Adds plumbing to trim whitespace near the FormattedNumber API boundary.
That plumbing requires a change to dependencies.txt.
2018-11-15 21:37:32 -07:00
Dongyuan Liu
46a888be87 ICU-13441 For zh/ja, tailor linebreak classes for quotations such as “ 201C and ” 201D 2018-11-14 19:53:12 -08:00
Andy Heninger
d6c3b271fe ICU-20084 IntlTest, add WHERE macro; remove redundant TEST macros. 2018-11-13 11:08:35 -08:00
Markus Scherer
98f9170004 ICU-20250 make UnicodeSet(intprop=value) faster
- fastpath for UnicodeSet.add(new last range)
- fewer UnicodeSet memory allocations:
  initial internal list array, exponential array growth,
  allocate strings list/set only when first one is added
- faster CodePointTrie.getRange(): fewer calls to filter function
- revert UnicodeSet(intprop=value) from trie ranges to range starts + lookup
- cache per-int-prop range starts: fewer lookups
2018-11-12 16:05:57 -08:00
Shane Carr
e2882d961f ICU-13267 Minor documentation and test changes. 2018-11-08 17:13:39 -07:00
Shane Carr
11a559f319 ICU-13267 Refactoring field position testing logic into helper function.
Makes future field position logic easier to test.
2018-11-08 17:13:29 -07:00
Shane Carr
ba21ff79c4 ICU-13701 Syncs C and J increment rounding. Checks for nickel sooner. 2018-11-08 17:13:17 -07:00
Shane Carr
a1cc16ccd3 ICU-13701 Refactoring DecimalQuantity: removing lOptPos/rOptPos.
Combined ICU4C and ICU4J.
2018-11-08 02:43:31 -07:00
Jeff Genovy
9a5b7af83d ICU-13180 Support skiping building the UWP projects with a command line MSBuild option. 2018-11-06 16:02:03 -08:00
Shane Carr
53d8c8f3d1 ICU-20246 Fixing another integer overflow in number parsing. 2018-10-31 13:37:09 -07:00
Shane Carr
f8c09f776a ICU-20231 Adding tests for accounting with variable currency widths. 2018-10-29 16:29:06 -07:00
Shane Carr
fd5faeb48b ICU-20159 Fixing gcc warnings in project and test code. 2018-10-29 16:28:54 -07:00
Shane Carr
8018eb84e7 ICU-13701 Adding custom logic for nickel rounding, C and J.
Avoids expensive arithmetic when performing nickel rounding for currencies such as CAD, CHF, and DKK.
2018-10-29 16:28:42 -07:00
Jeff Genovy
5a34bfb151 ICU-20209 Fix build failures on Windows with std::atomic not in enclosing namespace std
Also: Change to use the ICU namespace macro instead, and skip doxygen as well.
2018-10-29 15:07:05 -07:00
Fredrik Roubert
59fe4f4be2 ICU-20132 Pass ByteSink from Locale::toLanguageTag() to uloc_toLanguageTag().
This eliminates the need for a scratch buffer in Locale::toLanguageTag()
and also the need for counting bytes required in uloc_toLanguageTag(),
something that ByteSink will now handle correctly and thereby
eliminating the bug where too few bytes required was returned.
2018-10-25 21:04:47 +02:00
Fredrik Roubert
10e79698d7 ICU-20228 Fix common typos for "language". 2018-10-24 20:54:10 +02:00
Shane Carr
aa898cc042 ICU-11511 Adding tests for CLDR-10103 scientific notation spec changes. 2018-10-23 17:46:33 -07:00
Fredrik Roubert
0da942bd52 ICU-20080 Avoid strange compiler behaviour in ASSERT_EQUAL() macro.
Using temporary variables for the two values to be compared here makes
GCC compile the code just like we expect it to. (What it really is that
it otherwise does on some architechtures remains a mystery.)

This will make the tests pass as expected also on IA-32 with GCC.

It'll also make it possible to revert the old workaround for SPARC
introduced by commit 5b0592af79.

Tested:

Linux gcc45 3.16.0-5-686-pae #1 SMP Debian 3.16.51-3+deb8u1 (2018-01-08) i686 GNU/Linux

Debian clang version 3.5.0-10 (tags/RELEASE_350/final) (based on LLVM 3.5.0)
g++ (Debian 4.9.2-10+deb8u1) 4.9.2

Linux gcc202 4.16.0-1-sparc64-smp #1 SMP Debian 4.16.5-1 (2018-04-29) sparc64 GNU/Linux

clang version 4.0.1-10+sparc64 (tags/RELEASE_401/final)
g++ (Debian 8.2.0-7) 8.2.0
2018-10-19 11:45:09 +02:00
Andy Heninger
e509105c9b
ICU-20205 RelativeDateTimeFormatter pt data fix, improved error handling and test. (#210)
* ICU-20205 Add locale test for RelativeDateTimeFormatter.

* ICU-20205 Fix error in pt relative date data. Improve error handling in code.

* ICU-20205 Add instantiation test & regen data from ICU4C

* ICU-20205 Added DateFormatSymbols error check per jefgen's comments.
2018-10-12 16:19:14 -07:00
pedberg-icu
bac4c96020
ICU-20119 cldr release-34-alpha3 integration (#181)
ICU-20119 cldr release-34-alpha3 integration (PR #181):
* ICU-20119 63rc BRS, cldr 34-alpha3: add ku,xh; fixes for de/it CompactDec, availFmts yw amd MW patterns
* ICU-20119 Skip & log_knownIssue for Windows LCID mapping problem with ckb/ku
2018-09-28 16:09:15 -07:00
gnrunge
1b62e2c851
ICU-20119 Fixes for run-without-data BRS test. In all cases an error (#177)
check was needed in the test cases to prevent a segmentation fault.
2018-09-27 14:27:42 -07:00
Steven R. Loomis
53986cc57d
ICU-13685 Revert c: add @preview (retry) (#172)
This reverts commit 25f1589466c8b74ce36d762d4e9f3a72b3007eaf from  #8
2018-09-27 14:27:42 -07:00
Jungshik Shin
c71a1b4b51
ICU-9562 Update language tag mapping per the latest IANA registry
uloc_forLanguageTag has a few mapping tables to map grandfathered
language tags and deprecated language subtags to their preferred or
modern values.

Update them based on the latest version of the IANA
language subtag registry. [1]

Five grandfathered tags without a preferred value are still mapped to
what ICU has mapped them to for backward compatibility until the
wisdom of continuing to do so is reviewed.

In addition, map redundant language tags to their preferred values
regardless of whether they're followed by other subtags or not. (e.g.
zh-yue vs zh-yue-u-co-pinyin) .

Similary, ja-latn-hepburn-heploc is mapped to ja-latn-alaic97 (the
variant subtag 'hepburn-helploc' with the prefix 'ja-latn' has the
preferred value, 'alaic97') .

Update the mapping for deprecated language subtags (e.g. 'jw' to
'jv' and a bunch of 3-letter language codes).

Add a new table for deprecated region subtags to map them to their
modern values. (e.g. 'DD' to 'DE').

Add a new test case for deprecated language and region mapping and
a few more cases for updated grandfathered and redundant tag mapping.

[1]
https://www.iana.org/assignments/language-subtag-registry/language-subtag-registry
2018-09-27 14:27:42 -07:00
Markus Scherer
cc1784ae7d
ICU-20119 update C++ dependencies, fix bugs (#171) 2018-09-27 14:27:42 -07:00
gnrunge
2b6b8c73c4
ICU-20119 urename.h update, header test fixes for icu 63 (#165)
* ICU-20119 Update and fixes for the following BRS tasks:
 - Update urename.h
 - Test uconfig.h variations

* ICU-20119 Updates copyright scanner script exclusions: don't scan ./git/*.

* ICU-20119 Changes in reply to comments for pull requst #165.
2018-09-27 14:27:41 -07:00
pedberg-icu
4a139a3f91
ICU-20119 Merge pull request #162 from pedberg-icu/cldr34a-integration
ICU-20119 Integrate CLDR release-34-alpha2, adjust code & test, update MeasureUnit
2018-09-27 14:27:41 -07:00
Shane F. Carr
b9b6cfebd8
ICU-11319 Add tests for compact decimal in zh-Hant and zh-Hant-HK. (#166) 2018-09-27 14:27:41 -07:00
Peter Edberg
7e3068b207
ICU-20119 63rc BRS, update ICU4C numberformattestspecification.txt for J versions 2018-09-27 14:27:41 -07:00
Peter Edberg
0185883ba5
ICU-20119 63rc BRS, merge current unicode-icu master (Sep 21) into cldr34a-integration branch 2018-09-27 14:27:41 -07:00
Shane F. Carr
5cfb733249
ICU-11276 Apply the approximately pattern inside of the unit string. (#148) 2018-09-27 14:27:41 -07:00
Jeff Genovy
db05e18f28
ICU-20157 Fix MSVC C4251: Need to export explicit template instantiation, plus some more warning fixes. (#154)
* Fix MSVC C4251: Need to export explicit template instantiation for std::atomic<int32_t> when building DLLs

* Some more warning fixes for MSVC as well.

* Can't use static_cast in C file.
2018-09-27 14:27:41 -07:00
Peter Edberg
54a35e43ee
ICU-20119 63rc BRS, cldr 34-alpha2 part 2: 10 locales, MeasUnit updates, icu4j tests with serialization fails 2018-09-27 14:27:41 -07:00
Shane F. Carr
a21523d7c8
ICU-13707 Make UnicodeString safe when appended or inserted into itself. (#147) 2018-09-27 14:27:41 -07:00
Peter Edberg
f5defe757b
ICU-20119 63rc BRS, merge current unicode-icu master into cldr34a-integration branch 2018-09-27 14:27:41 -07:00
Peter Edberg
b6074fe044
ICU-20119 63rc BRS, integrate cldr 34-alpha2, part 1 icu4c 2018-09-27 14:27:41 -07:00