Commit Graph

5649 Commits

Author SHA1 Message Date
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
Jeff Genovy
ba001f4616 ICU-20196 Fix MSVC/clang compiler warning C4251, export explicit template, required for building DLLs on Windows. Also fix a few other warnings as well. 2018-10-05 13:21:00 -07:00
pedberg-icu
bcd0a4165c
ICU-20119 Update ICU4C #ifndef U_HIDE_XXX guard conditionals (PR #183)
ICU-20119 Update ICU4C #ifndef U_HIDE_XXX guard conditionals (PR #183)
2018-09-30 21:23:42 -07:00
Andy Heninger
19a29f956e
ICU-20119 ICU4C 63 API promotion & change report (#161)
* ICU-20119 ICU4C 63 API promotion, work in progress.

* ICU-20119 ICU4C 63 API promotion, work in progress.

* ICU-20119 ICU 63 API promotion & change report

* ICU-20119 ICU4C 63 API change report, new draft, still work in progress.

* ICU-20119 ICU4C 63 API change report, another new draft, still work in progress.

* ICU-20119 ICU4C 63 API change report, another new draft.

* ICU-20119 ICU4C 63 API change report, after @preview revert. Hopefully the final rev.

* ICU-20119 ICU4C 63 API change report, clean up a few minor html errors.
2018-09-28 09:36:25 -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
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
4d09e9d62b
ICU-11276 Using atomics for thread safety in NumberRangeFormatter. (#130)
See discussions on pull request.
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
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
ffca080b93
ICU-20154 Renaming UGroupingStrategy to UNumberGroupingStrategy. (#142) 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
Shane F. Carr
9052b89018
ICU-13833 Fixing doxygen warnings in numberformatter.h and other files. (#140) 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
Shane
a8a6ffdb92
ICU-20037 Fixing ScientificMatcher integer overflow. (#138)
Also restricts parsing to read only one exponent per string.
2018-09-27 14:27:41 -07:00
Mihai Nita
531bc76ed5
ICU-20142 Document the skeleton for MessageFormat number arguments (#121) 2018-09-27 14:27:41 -07:00
Shane
e5bca0c9f7
ICU-20073 Do not parse stray percent sign in strict mode. (#145) 2018-09-27 14:27:41 -07:00
Shane
71ad5adf4a
ICU-13850 Make CurrencyUnit safe with 1-length and 2-length strings. (#133)
Also adds expectError to IcuTestErrorCode.
2018-09-27 14:27:41 -07:00
Norbert Runge
c28e2510c4
ICU-20119 Merge github.com:unicode-org/icu into icu63_1 2018-09-27 14:27:41 -07:00
Norbert Runge
160ad69219
ICU-20119 Smalles fixes for public and internal header test failures. 2018-09-27 14:27:41 -07:00
Markus Scherer
a075ac9cf8
ICU-13832 Transliterator: move rule syntax docs from internal class to public (#150) 2018-09-27 14:27:41 -07:00
Jeff Genovy
c3f576710b
ICU-20119 BRS63rc Update version number for ICU4C and ICU4J. Update readme files. (#144)
BRS: Update version number for ICU 63 RC for ICU4J and ICU4C, also update readme files.
2018-09-27 14:27:41 -07:00
Jeff Genovy
14b35e4fbf
ICU-20147 Fix MSVC warning C4251, and fix a few other warnings too. (#134) 2018-09-27 14:27:41 -07:00
Jeff Genovy
c8e4c81d4e
ICU-20076 MSVC Warning clean up. Define _HAS_EXCEPTIONS=0 in ICU library code (#128)
In an effort to reduce the number of warnings that building ICU emits, we should set the following define for ICU4C library code when building using MSVC/VisualStudio: _HAS_EXCEPTIONS=0
This tells the MSVC implementation of the STL that exceptions should not be used - which is fine for ICU4C library code, as the library code does not make use of exceptions at all.
2018-09-27 14:27:41 -07:00
Shane Carr
068ef1c265
ICU-20063 Make setSignificantDigitsUsed more friendly. 2018-09-27 14:27:40 -07:00
Shane Carr
cab92db338
ICU-20050 Fixing memory leaks in move and copy assignment in Number*Formatter. 2018-09-27 14:27:40 -07:00
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
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
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 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
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
3161453c02
ICU-11276 Adding ModifierStore, groundwork for plural range support. 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
Shane Carr
083fe73d6b
ICU-11276 Rewriring NumberFormatterImpl to expose information needed for NumberRangeFormatter. 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
Shane Carr
92a86dfcf5
ICU-11276 Feedback from ICU-TC. Fixing doxygen warnings. 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
Yoshito Umaoka
45cdda61a6
ICU-12973 CLDR Japanese Era data and tentative Japanese new era support (#111)
* Updated era data format in supplementalData.

* Include tentative era names in data. Implemented Japanese era loaded from CLDR data in ICU4J.

* ICU4C implementation, ICU4C refactoring. WIP.

* VS project updates and some bug fixes

Also added API comments.

* Review feedback and bug fixes

- NULL to nullptr
- use of LocalUResourceBundlePointer
- TYPO "name" to "named"
- env var checking stricmp() == 0

* API comment correction based on feedback

* Duplicate the comment in ucal.h to calendar.h

* Fixed spelling errors in API comment
2018-09-27 14:27:39 -07:00
Shane Carr
7d34740002
ICU-11276 Fixing typos in numberformatter.h 2018-09-27 14:27:39 -07:00
Shane Carr
9924225ed6
ICU-11276 Adding initial header files for NumberRangeFormatter. 2018-09-27 14:27:39 -07:00
Frank Tang
00ccb44a30
ICU-13754 Add a ListFormatter FieldPositionIterator format method (#109)
ICU-13754 Reapply PR#106 after sffc rewinding master it.
2018-09-27 14:27:39 -07:00
Frank Tang
0fa1b5c5eb
ICU-20022 support quarter in RelativeDateTimeFormatter (#77)
also add UDAT_ABSOLUTE_QUARTER to UDateAbsoluteUnit
2018-09-27 14:27:39 -07:00
Frank Tang
e6a5f0ee0a
ICU-13754 Move listformatter from common to i18n (#96) 2018-09-27 14:27:39 -07:00
Shane Carr
dbd9065c69
ICU-20110 Adding const to FormattedNumber#appendTo 2018-09-27 14:27:39 -07:00
Andy Heninger
e9e50b5aa3
ICU-13844 Regex unicode properties, add IsXXX forms for Java compatib… (#61)
* ICU-13844 Regex unicode properties, add IsXXX forms for Java compatibility.

* ICU-13844 Regex Property Review fixes from Markus.
2018-09-27 14:27:38 -07:00
Andy Heninger
c28e714aac
ICU-20079 int overflow in Gregorian Calendar. (#66) 2018-09-27 14:27:38 -07:00
Shane
8cad57b56c
ICU-13696 Parse local currency ISO codes as case-insensitive. (#62) 2018-09-27 14:27:38 -07:00
Shane
3420d5a55b
ICU-20001 Adding alignas to static-allocated memory.
Should fix possible crashes on ARM platforms. (#63)
2018-09-27 14:27:38 -07:00
Markus Scherer
fe3eb3ed5c
ICU-13530 add UCPTrie/CodePointTrie, switch normalization to use it (#48)
* ICU-13530 copy C/C++ files UTrie2 -> UTrie3

X-SVN-Rev: 40754

* ICU-13530 UTrie3 new files copied from UTrie2: rename types/functions/macros

X-SVN-Rev: 40755

* ICU-13530 debug-print building each UTrie2

X-SVN-Rev: 40756

* ICU-13530 remove two-byte-UTF-8 errorValue block; move highValue from end of data array into header; add errorValue to header

X-SVN-Rev: 40762

* ICU-13530 UTrie3 U16_NEXT/PREV: errorValue for unpaired surrogates

X-SVN-Rev: 40763

* ICU-13530 no more separate values for lead surrogate code units

X-SVN-Rev: 40764

* ICU-13530 change from 11:5 trie bits to 10:6 for simpler UTF-8 code

X-SVN-Rev: 40766

* ICU-13530 UTrie2 build UTrie3 as well, print sizes

X-SVN-Rev: 40767

* ICU-13530 debug-print countSame, sumOverlaps, countInitial

X-SVN-Rev: 40768

* ICU-13530 debug-print whether trie is for CanonIterData

X-SVN-Rev: 40769

* ICU-13530 no index-shift for BMP data, no separate index-2 for 2-byte UTF-8; builder changes incomplete

X-SVN-Rev: 40777

* ICU-13530 remove errorValue and highStart from UNewTrie3

X-SVN-Rev: 40778

* ICU-13530 rewrite UTrie3 builder code

X-SVN-Rev: 40783

* ICU-13530 UTrie3 bug fixes

X-SVN-Rev: 40788

* ICU-13530 fully re-inline _UTRIE3_U8_NEXT()

X-SVN-Rev: 40790

* ICU-13530 find most common all-same data block for dataNullBlock and initialValue

X-SVN-Rev: 40792

* ICU-13530 UTrie3 iterator functions take start and return the end of a range, rather than callback call for each range

X-SVN-Rev: 40800

* ICU-13530 mask off unused data value bits before building a UTrie3 with values less than 32 bits wide

X-SVN-Rev: 40803

* ICU-13530 split utrie3builder.h out of utrie3.h

X-SVN-Rev: 40804

* ICU-13530 separate types UTrie3 vs. UTrie3Builder, implement builder as wrapper over C++ class Trie3Builder in .cpp

X-SVN-Rev: 40809

* ICU-13530 function to make a UTrie3Builder from a UTrie3

X-SVN-Rev: 40810

* ICU-13530 debug-print some data; some cleanup

X-SVN-Rev: 40865

* ICU-13530 BMP 10:6 but supplementary 10:6:4

X-SVN-Rev: 40984

* ICU-13530 move errorValue & highValue to the end of the data table, minimal padding to 4 bytes

X-SVN-Rev: 41011

* ICU-13530 index-1 table gap of index-2 null blocks

X-SVN-Rev: 41018

* ICU-13530 test with more than 128k compacted data

X-SVN-Rev: 41034

* ICU-13530 supplementary bits 11:5:4 saves a little space

X-SVN-Rev: 41039

* ICU-13530 supplementary bits 6:5:5:4 instead of gap: about same size but simpler

X-SVN-Rev: 41050

* ICU-13530 remove unnecessary utrie3_clone(built trie)

X-SVN-Rev: 41058

* ICU-13530 remove unnecessary UTrie3StringIterator

X-SVN-Rev: 41059

* ICU-13530 back to UTRIE3_GET...() macros *returning* data values

X-SVN-Rev: 41060

* ICU-13530 fast vs. small

X-SVN-Rev: 41066

* ICU-13530 always load NFC data, add simple normalization performance test

X-SVN-Rev: 41110

* ICU-13530 change normalization main trie to UTrie3 with special values for lead surrogates; forbid non-inert surrogate code *points* because unable to store values different from code *units*; runtime code work around that for code point lookup and iteration; adjust UTS 46 for normalization no longer mapping unpaired surrogates to U+FFFD

X-SVN-Rev: 41122

* ICU-13530 simplenormperf bug fix and NFC base line

X-SVN-Rev: 41126

* ICU-13530 move normalization getRange skipping lead surrogates to API getRangeSkipLead()

X-SVN-Rev: 41182

* ICU-13530 switch CanonIterData and gennorm2 Norms to UTrie3

X-SVN-Rev: 41183

* ICU-13530 remove unused overwrite parameter from setRange()

X-SVN-Rev: 41184

* ICU-13530 getRange skip lead -> fixed surrogates

X-SVN-Rev: 41219

* ICU-13530 minor cleanup

X-SVN-Rev: 41221

* ICU-13530 UTS 46 code map unpaired surrogates to U+FFFD before normalization

X-SVN-Rev: 41224

* ICU-13530 minor internal-docs cleanup

X-SVN-Rev: 41225

* ICU-13530 rename UTrie3 to UCPTrie, and other name changes

X-SVN-Rev: 41226

* ICU-13530 add 8-bit data option; add type-any & valueBits-any for fromBinary(); macros consistently source type then data width

X-SVN-Rev: 41234

* ICU-13530 scrub the API docs for the proposal

X-SVN-Rev: 41319

* ICU-13530 tag internal definitions as such, or move them to an internal header

X-SVN-Rev: 41320

* ICU-13530 Java API skeleton

X-SVN-Rev: 41326

* ICU-13530 API feedback: ValueWidth, MutableCodePointTrie, base CodePointMap, ...

X-SVN-Rev: 41382

* ICU-13530 add UCPTrie valueWidth field and padding, and combine data pointers into a union

X-SVN-Rev: 41408

* ICU-13530 switch some macros to using dataAccess parameter: separate index vs. data lookups, no macro variant for each value width

X-SVN-Rev: 41409

* ICU-13530 StringIterator is no longer a java.util.Iterator (bad fit)

X-SVN-Rev: 41455

* ICU-13530 CodePointTrie.java code complete

X-SVN-Rev: 41518

* ICU-13530 finish Java port incl test; keep C++ parallel

* ICU-13530 adjust API for feedback: rename HandleValue to FilterValue, change getRange+getRangeFixedSurr(bool allSurr) to enum RangeOption+getRange(enum option); change remaining C macros to use dataAccess for 16/32/8-bit value widths; fix/clarify some API docs

* ICU-13530 add javadoc

* ICU-13530 document UCPTrie binary data format

* ICU-13530 update .nrm formatVersion 3->4, document change in surrogate handling with new trie

* ICU-13530 re-hardcode NFC data

* move trie swapper code into new file; add new files to Windows project files; turn off trie debugging

* ICU-13530 minor cleanup

* ICU-13530 test more range starts; fix a C test leak

* ICU-13530 regenerate Java data from scratch

* ICU-13530 review feedback changes: API docs typos, more @internal, C++11 field initializers, fix potential leak in MutableCodePointTrie::fromUCPTrie()

* ICU-13530 rename interface FilterValue to ValueFilter
2018-09-27 14:27:38 -07:00
Peter Edberg
46e7caa736
ICU-20065 Fix bad wording in comment 2018-09-27 14:27:38 -07:00
Peter Edberg
643e8756c8
ICU-20065 Prevent crash on Collator::makeInstance fail when optimized, add test 2018-09-27 14:27:38 -07:00
Daniel Ju
b13c951348
ICU-20043 ICU-13214 ICU-13764 MSVC W3 and W4 warning cleanup (#53)
Cleaned up all of the MSVC W3 warnings and most of the W4 warnings in the common and i18n projects.
2018-09-27 14:27:38 -07:00
Steven R. Loomis
23389e756c
ICU-13685 c: add @preview (retry) (#8)
* ICU-13685 - add a @preview tag in Doxygen

* Change @internal to @preview for existing tech preview sites

ICU-13685
2018-09-27 14:27:37 -07:00
Jeff Genovy
02a2c9cce9
ICU-20036 CurrencyPluralInfo class improve handling of OOM errors (#17)
ICU-20036 CurrencyPluralInfo class doesn't always check/handle OOM errors.

Changes include:
- Using LocalPointer instead of raw new/delete, in order to make the code cleaner.
- Using nullptr instead of NULL.
- Inspired by Andy's review feedback PluralRules changes, this change sets fPluralRules and fLocale to nullptr in the assignment operator in order to prevent possible double deletes in the failure case.
- More consistent about not checking for nullptr when calling delete.
- Using LocalUResourceBundlePointer in order to simply the code and not need manual deletes.
- Reduce memory usage by using the same LocalUResourceBundle with .getAlias() instead of allocating new ones.
2018-09-27 14:27:37 -07:00
Jeff Genovy
c9573ab075
ICU-20046 Improve OOM error checking in the RBNF class. (#24)
- There are a few locations in the RBNF class that don't check for out-of-memory (OOM) failures.
- Using LocalPointer to clean up the manual deletes.
- Change to use nullptr instead of NULL.
- A few minor typo fixes as well.
2018-09-27 14:27:37 -07:00
Jeff Genovy
d07396f94d
ICU-20041 Improve handling of OOM failures in NumberingSystem class. (#19)
ICU-20041 ICU4C NumberingSystem class doesn't handle out-of-memory (OOM) failures.

- Not all code paths in the NumberingSystem class check for OOM failures. This can lead to crashes in some cases as null pointers will be dereferenced without any checks.
- Change to use nullptr instead of NULL.
- Don't stomp on OOM errors when attempting to load resources. We should report back OOM to the caller.
- Use LocalPointer in order simplify the code and for automatic clean-up of memory.
- Use LocalUResourceBundlePointer as well to help simply things even more.
2018-09-27 14:27:37 -07:00
Jeff Genovy
3712aa3d6e
ICU-13810 Fix typo in datefmt.h macro. (#36) 2018-09-27 14:27:37 -07:00
Jeff Genovy
a9a19fc229
ICU-20044 Fix some OOM issues in the NumberFormat class. (#21) 2018-09-27 14:27:37 -07:00
Jeff Genovy
8edc6ba107
ICU-20042 Improve OOM handling in PluralRules class. (#20)
- PluralRules class doesn't handle out-of-memory (OOM) errors in some code paths.
- The clone and assignment operator (operator=) methods of construction don't take an error code  parameter, meaning that if an OOM error occurs during the constructor, it will not reported back to the caller, and the caller has no way to know that the object is in a half-constructed state.
- Using an internal status variable for these above cases.
- Changes to the various PluralRules helper classes to check for OOM as well.
- Using nullptr instead NULL.
- Using LocalPointer instead of raw new/delete in some cases.
- Need to set mRules to nullptr, otherwise we can end up with double deletes in the failure case. (Thanks to Andy for the review).
- Using default member initializers for class members to avoid dangling pointers. Also allows for using default constructors too.
2018-09-27 14:27:37 -07:00
Andy Heninger
35ce5296c1
ICU-13810 Doxygen warning cleanup. 2018-09-27 14:27:37 -07:00
Jeff Genovy
b12a927c93 ICU-13778 DataTimePatternGenerator code refactor. Handle Out-of-Memory (OOM) errors, use LocalPointer to prevent memory leaks when OOM occurs, use an internal error code to better report errors during clone and copy construction, mark helper methods and parameters as const, use nullptr instead of NULL, minor spelling and formatting changes. (Note: All tests pass on Windows and Linux).
X-SVN-Rev: 41552
2018-06-27 19:25:52 +00:00
Shane Carr
4bc6ad328b ICU-13850 Fixing behavior of ICU4C DecimalFormat#setCurrency() to accept an empty string.
X-SVN-Rev: 41549
2018-06-23 02:09:42 +00:00
Shane Carr
3f7a4aa202 ICU-13840 Fixing memory overflow issue in number_decimalquantity.cpp and adding tests.
X-SVN-Rev: 41541
2018-06-19 21:52:52 +00:00
Peter Edberg
733e363203 ICU-13823 ICU 62.1 BRS, update measurement unit constants for release-33-1-d03 (deletes VES)
X-SVN-Rev: 41528
2018-06-15 01:12:52 +00:00
Shane Carr
ba800ab7bd ICU-13835 Fixing C++17 compiler error.
X-SVN-Rev: 41523
2018-06-14 20:29:11 +00:00
Fredrik Roubert
1af5762873 ICU-13818 Add virtual destructor for class TokenConsumer.
X-SVN-Rev: 41519
2018-06-13 17:00:44 +00:00
Andy Heninger
04d300adeb ICU-13828 DecimalFormat Error Code handling cleanups.
X-SVN-Rev: 41515
2018-06-11 03:56:58 +00:00
Andy Heninger
2f534730c9 ICU-13816 Windows compiler warning fix.
X-SVN-Rev: 41504
2018-06-04 21:04:14 +00:00
Andy Heninger
c0f9d2eeef ICU-13807 ICU 62 No Data Testing fixes. Mostly to test code.
X-SVN-Rev: 41500
2018-06-01 01:19:38 +00:00
Shane Carr
dd7667d330 ICU-13804 Making number parsing code more robust when given empty symbol strings.
X-SVN-Rev: 41497
2018-06-01 00:31:54 +00:00
Shane Carr
08134fc59e ICU-13667 Making =delete APIdocs consistent in numberformatter.h
X-SVN-Rev: 41495
2018-05-31 22:04:08 +00:00
Shane Carr
404a06a0f8 ICU-13667 Fixing incorrect version tag on scale() setter.
X-SVN-Rev: 41493
2018-05-31 21:32:35 +00:00
Shane Carr
6b7022632b ICU-13667 Making new DecimalFormat constructor private.
X-SVN-Rev: 41489
2018-05-30 21:27:07 +00:00
Markus Scherer
438f1f363b ICU-13667 LocalizedNumberFormatterAsFormat is in the old Format class hierarchy, add ClassID boilerplate; NoUnit move virtual destructor up into first-virtual position, right after constructors
X-SVN-Rev: 41487
2018-05-30 19:15:02 +00:00
Peter Edberg
16519f2643 ICU-13667 ICU 62rc BRS, update guard conditionals for non-stable API part 1 (i18n pass 1)
X-SVN-Rev: 41486
2018-05-30 18:39:29 +00:00
Norbert Runge
781154c113 ICU-13667 Moves digits_t, DEFAULT_THRESHOLD, and copyErrorTo() outside of U_HIDE_INTERNAL_API.
X-SVN-Rev: 41485
2018-05-30 14:40:13 +00:00
Shane Carr
29937704cd ICU-8610 Responding to number skeleton code review feedback.
X-SVN-Rev: 41483
2018-05-30 03:34:41 +00:00
Peter Edberg
8d17fb0e1b ICU-13667 ICU 62rc BRS, update measurement unit constants
X-SVN-Rev: 41481
2018-05-30 01:22:52 +00:00
Jeff Genovy
b6a793bafd ICU-13788 Fixing issue with accidental UErrorCode conversion to UBool.
X-SVN-Rev: 41472
2018-05-29 01:59:42 +00:00
Jeff Genovy
1662340d17 ICU-13788 Remove trailing semicolon that causes compiler warning.
X-SVN-Rev: 41471
2018-05-27 03:08:42 +00:00
Jeff Genovy
d23af4f072 ICU-13788 Fix compiler error C4251 on Windows (MSVC, Clang, MinGW).
X-SVN-Rev: 41470
2018-05-27 03:07:57 +00:00
Jeff Genovy
530744ae3b ICU-13667 Update filters for VS project file for numberformatter.
X-SVN-Rev: 41469
2018-05-26 19:23:18 +00:00
Markus Scherer
c6c8b7201a ICU-13630 update spoof checker inclusion/recommended sets from Unicode 9 to Unicode 11
X-SVN-Rev: 41466
2018-05-25 23:39:01 +00:00
Shane Carr
c3c21d1fe9 ICU-13788 Fixing number_decimfmtprops C++ dependency issue.
X-SVN-Rev: 41465
2018-05-25 22:54:48 +00:00
Shane Carr
0b1aa193fc ICU-13788 Fixing numparse_impl C++ dependency issues.
X-SVN-Rev: 41464
2018-05-25 21:29:59 +00:00
Jeff Genovy
f23cbfa975 ICU-13667 Update ICU4C version number for 62.1 release candidate.
X-SVN-Rev: 41463
2018-05-25 21:29:10 +00:00
Markus Scherer
d8f9a47637 ICU-13667 update/fix/improve dependencies; better layering formatting->numberparser->numberformatter->number_representation
X-SVN-Rev: 41461
2018-05-25 17:57:30 +00:00
Jeff Genovy
87122b9084 ICU-13775 Fix build issues on MinGW and Clang-for-Windows (with exported template instantiations).
X-SVN-Rev: 41460
2018-05-25 07:27:56 +00:00
Shane Carr
bf977d1acc ICU-13788 Minor coverity fixes for number code.
X-SVN-Rev: 41459
2018-05-25 03:01:38 +00:00
Shane Carr
4beed11456 ICU-13722 Removing obsolete constructs FmtStackData and UCONFIG_FORMAT_FASTPATHS_49.
X-SVN-Rev: 41457
2018-05-25 00:26:00 +00:00
Shane Carr
79b8248092 ICU-13677 Fixing up apidoc strings for precision setting.
X-SVN-Rev: 41456
2018-05-24 21:28:11 +00:00
Peter Edberg
5b3c14c29d ICU-12936 Make RelativeDateTimeFormatter handle offset of -0
X-SVN-Rev: 41451
2018-05-24 05:52:01 +00:00
Shane Carr
8e1dc1f3b1 ICU-13736 Change number parsing to require locale currency when using non-currency parse function.
X-SVN-Rev: 41450
2018-05-24 04:35:16 +00:00
Shane Carr
6f50303084 ICU-13788 Fixing data types in numparse_decimal.cpp; should fix MSVC test failure.
X-SVN-Rev: 41443
2018-05-23 21:59:30 +00:00
Shane Carr
2af33b7796 ICU-13763 Makes FieldPositionIterator offset by input string length in DecimalFormat, restoring ICU 61 behavior.
X-SVN-Rev: 41442
2018-05-23 21:08:53 +00:00
Shane Carr
0c8fed6bde ICU-13717 During SimpleDateFormat#parseInt, avoid cloning the DecimalFormat unless necessary.
X-SVN-Rev: 41440
2018-05-23 04:21:24 +00:00
Shane Carr
d0d8535066 ICU-13717 Adds fast path for RBNF, which is not affect by min/max integer digits.
X-SVN-Rev: 41439
2018-05-23 04:03:19 +00:00
Shane Carr
4931366afe ICU-13717 Adds "fast formatters" optimization to smpdtfmt.cpp to greatly improve the performance of SimpleDateFormat with the new number formatting pipeline.
X-SVN-Rev: 41438
2018-05-23 02:00:03 +00:00
Shane Carr
3e2bbc9834 ICU-13717 Fixes memory leak in date format parsing by moving cloning into the parseInt function.
X-SVN-Rev: 41437
2018-05-23 01:18:07 +00:00
Shane Carr
25d6d69068 ICU-13717 Moves NumberFormat cloning into the zeroPaddingNumber method. Also indirectly fixes a memory leak from the previous commit.
X-SVN-Rev: 41436
2018-05-23 01:04:17 +00:00
Shane Carr
eb1f330d3d ICU-13717 Removing SimpleDateFormatMutableNFs. Temporary performance regression.
X-SVN-Rev: 41434
2018-05-22 22:42:13 +00:00
Shane Carr
7d627ba160 ICU-13717 Refactoring UDAT_FRACTIONAL_SECOND_FIELD to use zeroPaddingNumber for consistency with all other number formatting call sites in smpdtfmt.cpp
X-SVN-Rev: 41433
2018-05-22 22:21:59 +00:00
Shane Carr
c2412adb1e ICU-11626 Fixes ICU4C CurrencyPluralInfo unit tests. Also fixes a memory leak in CurrencyPluralInfo implementation.
X-SVN-Rev: 41431
2018-05-22 20:47:19 +00:00
Shane Carr
0a2aeb017a ICU-13333 Adding combining dot spoof check.
X-SVN-Rev: 41428
2018-05-22 02:47:31 +00:00
Shane Carr
33a0fa7172 ICU-13783 Re-writing grouping parsing logic. Same behavior but passes more corner cases.
X-SVN-Rev: 41427
2018-05-22 02:46:49 +00:00
Yoshito Umaoka
c5437c6e00 ICU-13300 Added thread safety note to TimeZone::detectHostTimeZone().
X-SVN-Rev: 41421
2018-05-21 00:39:51 +00:00
Yoshito Umaoka
9cc7d14b62 ICU-13602 Check error status for lazily instantiated TiemZoneFormat in SimpleDateFormat.
X-SVN-Rev: 41413
2018-05-19 00:18:25 +00:00
Shane Carr
b1508d753b ICU-11230 Change number parsing to require at least 2 digits in a group after the first group.
X-SVN-Rev: 41407
2018-05-18 00:52:43 +00:00
Shane Carr
d7f3471733 ICU-13757 Renaming skeleton methods fromSkeleton -> forSkeleton
X-SVN-Rev: 41393
2018-05-17 00:43:12 +00:00
Shane Carr
2e2805df9a ICU-13697 Renaming numparse_unisets.h to static_unicode_sets.h and refactoring to guarantee safety in no-data builds.
X-SVN-Rev: 41389
2018-05-16 22:46:40 +00:00
Jeff Genovy
523cbcd1dc ICU-13773 Double free in uspoof_openFromSerialized, plus other memory related fixes.
X-SVN-Rev: 41386
2018-05-16 20:38:05 +00:00
Shane Carr
955e0d9319 ICU-11897 Changing kPatternSeparatorSymbol to be a constant ";" and not loaded from data.
X-SVN-Rev: 41380
2018-05-16 01:01:22 +00:00
Shane Carr
cb34c90168 ICU-13737 Backpedaling on strict mode scientific parsing behavior change (do NOT require an exponent when parsing).
X-SVN-Rev: 41378
2018-05-15 21:14:09 +00:00
Shane Carr
b347a140ec ICU-13742 Implementing number skeletons in MessageFormat.
X-SVN-Rev: 41377
2018-05-15 00:05:04 +00:00
Shane Carr
c3fa4e91b5 ICU-12931 Removing erroneous #ifdef U_HIDE_INTERNAL_API in numfmt.h
X-SVN-Rev: 41376
2018-05-14 23:38:13 +00:00
Jeff Genovy
fd1b5db09c ICU-13725 Fix whitespace (tabs to spaces).
X-SVN-Rev: 41374
2018-05-13 22:25:06 +00:00
Jeff Genovy
31ead7f739 ICU-13725 Fix a few more MSVC warnings.
X-SVN-Rev: 41368
2018-05-09 07:51:43 +00:00
Shane Carr
f86a35be55 ICU-13644 Returning bogus string when toSkeleton() fails.
X-SVN-Rev: 41367
2018-05-09 02:26:14 +00:00
Shane Carr
3eb414943e ICU-13662 Minor fixes after r41365.
X-SVN-Rev: 41366
2018-05-09 02:04:21 +00:00
Shane Carr
fb94a3eb76 ICU-13662 Replying to code review feedback.
X-SVN-Rev: 41365
2018-05-09 02:00:22 +00:00
Shane Carr
3275a9c5d3 ICU-13437 Adding makeBogusString() utility function and returning bogus strings on failed FormattedNumber toString() calls.
X-SVN-Rev: 41361
2018-05-08 21:52:26 +00:00
Shane Carr
3afec22e3a ICU-13677 Fixing typo in numberformatter.h documentation.
X-SVN-Rev: 41360
2018-05-08 21:48:18 +00:00
Shane Carr
71baac1713 ICU-12572 Fixing some undefined behavior warnings in number code.
X-SVN-Rev: 41358
2018-05-08 07:59:41 +00:00
Shane Carr
cc5fca2744 ICU-13035 Adding test to ICU4C for padding code point.
X-SVN-Rev: 41339
2018-05-07 22:37:02 +00:00
Markus Scherer
8b67b86c79 ICU-12567 port NumberFormatTest.Test12567 to C++
X-SVN-Rev: 41335
2018-05-07 22:07:43 +00:00
Shane Carr
e27cf9ce39 ICU-13677 Changing NumberFormatter rounding setting to precision and roundingMode.
X-SVN-Rev: 41330
2018-05-05 06:32:29 +00:00
Shane Carr
bc9710aa8b ICU-13738 Makes DecimalFormat#toNumberFormatter() return by const-reference.
X-SVN-Rev: 41327
2018-05-05 01:47:12 +00:00
Shane Carr
a52fcd20f2 ICU-13597 Replying to UNumberFormatter code recatew comments.
X-SVN-Rev: 41321
2018-05-04 06:58:44 +00:00
Shane Carr
23bacf40c8 ICU-12572 Fixing undefined behavior in NullableValue assignment operator.
X-SVN-Rev: 41318
2018-05-03 09:26:15 +00:00
Shane Carr
f1e1a5c3f4 ICU-12572 Adding cpp-file definitions for all interface classes in number code, cleaning up an undefined behavior warning.
X-SVN-Rev: 41317
2018-05-03 09:13:46 +00:00
Shane Carr
ef26576a96 ICU-12572 Moving error code check one level deeper such that the constructor does not leave the NumberFormatterImpl in an undefined state for destruction later.
X-SVN-Rev: 41316
2018-05-03 09:02:39 +00:00
Shane Carr
a41f51ad5f ICU-12572 Undefined behavior fixes in number code.
X-SVN-Rev: 41315
2018-05-03 08:53:20 +00:00
Shane Carr
0a0d99ebc8 ICU-13662 Improving NumberFormatter field position method names and behavior.
X-SVN-Rev: 41313
2018-05-03 01:34:19 +00:00
Shane Carr
c035e5bd04 ICU-13700 Removing obsolete TODO comment.
X-SVN-Rev: 41312
2018-05-03 01:32:03 +00:00
Jeff Genovy
37e2209f66 ICU-13749 Fix issue with tabs to spaces in previous commit.
X-SVN-Rev: 41311
2018-05-02 20:46:17 +00:00
Jeff Genovy
600afe90c4 ICU-13749 Prevent double-free of mzMappings in ZoneMeta::createMetazoneMappings.
X-SVN-Rev: 41310
2018-05-02 20:40:07 +00:00
Jeff Genovy
275580806f ICU-13739 ICU4C does not report Out-of-Memory when iterating over the TZEnumeration.
X-SVN-Rev: 41309
2018-05-02 19:55:58 +00:00
Jeff Genovy
2d5e369e78 ICU-13725 Fix last remaining C4251 warnings/errors by bringing back the CurrencyPluralInfoWrapper.
X-SVN-Rev: 41308
2018-05-02 08:18:00 +00:00
Jeff Genovy
6a5349eaae ICU-13725 Fix more of the C4251 warnings.
X-SVN-Rev: 41307
2018-05-02 07:51:55 +00:00
Jeff Genovy
f5082ad3a7 ICU-13725 Fix many of the C4251 warnings by DLL-exporting explicit template instantiations.
X-SVN-Rev: 41306
2018-05-02 06:49:00 +00:00
Shane Carr
b840d51ed9 ICU-13716 Adding default return values after U_ASSERT(FALSE) to silence compiler warnings in non-debug builds.
X-SVN-Rev: 41305
2018-05-02 04:29:25 +00:00
Shane Carr
3d0bf4b9c7 ICU-13644 Replying to review feedback. Changing enum methods on NumberFormatter to take by value instead of const reference.
X-SVN-Rev: 41304
2018-05-02 03:49:35 +00:00
Shane Carr
215417117e ICU-13437 Adding error codes to NumberFormatter terminal methods.
X-SVN-Rev: 41296
2018-04-30 21:07:35 +00:00
Shane Carr
c9680037cc ICU-12572 Fixing signed overflow in decimalquantity.
X-SVN-Rev: 41293
2018-04-28 07:38:41 +00:00
Shane Carr
b20f7f3543 ICU-13725 Adding comments referencing ticket 13580.
X-SVN-Rev: 41291
2018-04-28 06:59:09 +00:00
Shane Carr
6545bac22d ICU-12931 Adding internal visibility ifdef around format(DecimalQuantity) methods in numfmt.h and decimfmt.h
X-SVN-Rev: 41285
2018-04-28 02:38:55 +00:00
Shane Carr
d5253cfcae ICU-13725 Responding to small code review comments.
X-SVN-Rev: 41283
2018-04-27 08:02:40 +00:00
Shane Carr
c13e7785c2 ICU-13725 Fixing NumberFormatter std::move test failure on MSVC.
X-SVN-Rev: 41282
2018-04-26 03:38:17 +00:00
Shane Carr
e77603e3c3 ICU-13725 Fixing various number test failures in MSVC.
X-SVN-Rev: 41281
2018-04-26 01:33:59 +00:00
Shane Carr
acbdeaf98e ICU-13725 Fixing field reference in compactdecimalformat.cpp, broken by previous commit.
X-SVN-Rev: 41280
2018-04-26 00:17:30 +00:00
Shane Carr
18bfb67a60 ICU-13725 Moving all DecimalFormat fields to an implementation class, eliminating many MSVC warnings.
X-SVN-Rev: 41279
2018-04-25 23:57:10 +00:00
Shane Carr
18ffd64c69 ICU-13725 Additional MSVC compatibility fixes.
X-SVN-Rev: 41278
2018-04-25 21:51:16 +00:00
Andy Heninger
9ba0aa2345 ICU-13634 Fix Macintosh build breakage.
X-SVN-Rev: 41277
2018-04-25 21:04:19 +00:00
Andy Heninger
72ae3d7d54 ICU-13634 Fix Macintosh build error - missing include.
X-SVN-Rev: 41276
2018-04-25 04:09:09 +00:00
Andy Heninger
5e2a40b4ce ICU-13634 Fix Macintosh build error - missing include.
X-SVN-Rev: 41275
2018-04-25 03:50:39 +00:00
Andy Heninger
09249d176b ICU-13634 Fix Macintosh build error - missing include.
X-SVN-Rev: 41274
2018-04-25 03:38:04 +00:00
Shane Carr
a256316990 ICU-13725 Additional MSVC compatibility fixes.
X-SVN-Rev: 41272
2018-04-25 00:39:22 +00:00
Shane Carr
a7bcbfc07c ICU-13725 Assorted minor changes to number formatting code for MSVC compatibility
X-SVN-Rev: 41271
2018-04-24 22:24:11 +00:00
Shane Carr
629238d3a1 ICU-13634 Fixing assorted build errors.
X-SVN-Rev: 41268
2018-04-24 01:25:05 +00:00
Shane Carr
faa2897561 ICU-13634 Changes from pre-merge code light-review.
X-SVN-Rev: 41267
2018-04-24 01:19:44 +00:00
Shane Carr
607a60bc3b ICU-13393 Removing the UPRV_INCOMPLETE_CPP11_SUPPORT flag since the number formatting code is no longer isolated from the rest of ICU.
X-SVN-Rev: 41266
2018-04-23 23:02:26 +00:00
Shane Carr
8fab60c93b ICU-13634 Syncing MSVC build files with Makefiles.
X-SVN-Rev: 41265
2018-04-23 22:48:52 +00:00
Shane Carr
b2be6b57a9 ICU-13597 Adding comments about thread safety to UNumberFormatter.h
X-SVN-Rev: 41264
2018-04-23 22:42:51 +00:00
Shane Carr
328730604b ICU-13634 Fixing grouping size fallback in fast path.
X-SVN-Rev: 41262
2018-04-23 21:16:24 +00:00
Shane Carr
f7dddad5c0 ICU-13634 Removing superfluous abstraction "CharSequence" and "UnicodeStringCharSequence" from ICU4C number code.
X-SVN-Rev: 41260
2018-04-21 09:08:53 +00:00
Shane Carr
be466ddec0 ICU-13634 Porting some minor ICU4C performance enhancements to Java.
X-SVN-Rev: 41259
2018-04-21 08:55:58 +00:00
Shane Carr
e59eb48314 ICU-13634 Refactoring getPrefixSuffix methods. In ICU4C, the pattern modifier is now accessed directly. In ICU4J, they use the same detour through the pipeline code path as before with a TODO to improve to be closer to ICU4C. In addition, in both ICU4C and ICU4J, getPrefixSuffix now uses the compiled formatter when available.
X-SVN-Rev: 41258
2018-04-21 08:01:19 +00:00
Shane Carr
f412770e9d ICU-13634 A few more DecimalFormat optimizations.
X-SVN-Rev: 41257
2018-04-21 06:00:56 +00:00
Shane Carr
2cd9b1196d ICU-13634 Merging trunk to branch
X-SVN-Rev: 41256
2018-04-21 02:30:42 +00:00
Shane Carr
5aa92f0bf6 ICU-13521 Re-generating constants in measunit.cpp once more from the latest data on trunk.
X-SVN-Rev: 41255
2018-04-21 02:30:13 +00:00
Shane Carr
912f97dace ICU-13634 Merging trunk to branch
X-SVN-Rev: 41254
2018-04-21 02:18:33 +00:00
Shane Carr
1897f0cd56 ICU-13521 Re-generating constants in measunit.cpp from the code generation tool.
X-SVN-Rev: 41253
2018-04-21 02:09:53 +00:00
Shane Carr
f0aadfe714 ICU-13634 Fixing lazy-compute call site and other minor changes.
X-SVN-Rev: 41252
2018-04-20 01:32:53 +00:00
Shane Carr
ad116997ae ICU-13634 Optimizing and adding a basic fastpath for small ints. Greatly increases the performance of DateFormat.
X-SVN-Rev: 41251
2018-04-19 09:29:39 +00:00
Shane Carr
d682d1dbb1 ICU-13700 Fixing typo in APIdoc.
X-SVN-Rev: 41250
2018-04-19 02:41:33 +00:00
Shane Carr
f164bc1498 ICU-13634 Adding TODO comment in CurrencyUnit constructor.
X-SVN-Rev: 41249
2018-04-19 01:16:47 +00:00
Shane Carr
f11ca0d363 ICU-13634 Fixing address sanitizer issue involving backwards-compatible UChar* behavior in CurrencyUnit constructor. The string passed to the constructor need not be NUL-terminated.
X-SVN-Rev: 41248
2018-04-19 01:13:17 +00:00
Shane Carr
2e41837217 ICU-13700 APIDoc tweaks for getMultiplierScale/setMultiplierScale.
X-SVN-Rev: 41247
2018-04-19 00:14:17 +00:00
Shane Carr
1aa5185a36 ICU-13700 Renaming new getter/setter to magnitudeScale.
X-SVN-Rev: 41246
2018-04-18 23:55:55 +00:00
Shane Carr
55080e2804 ICU-13634 Fixing some clang sanitizer issues, including one potentially serious one deep inside DecimalQuantity.
X-SVN-Rev: 41245
2018-04-18 10:52:36 +00:00