Commit Graph

21873 Commits

Author SHA1 Message Date
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
e8d2ec8531
ICU-11276 Additional build.xml lines for pluralRanges. 2018-09-27 14:27:40 -07:00
Shane Carr
dd7235624c
ICU-11276 Adding UChar* method in CharString. 2018-09-27 14:27:40 -07:00
Shane Carr
3161453c02
ICU-11276 Adding ModifierStore, groundwork for plural range support. 2018-09-27 14:27:40 -07:00
Shane Carr
5c43434285
ICU-11276 Adding pluralRanges.txt data file.
The code was already in NewLdml2IcuConverter, but it was not being called from ICU.
2018-09-27 14:27:40 -07:00
Shane Carr
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
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
Fredrik Roubert
5663412172
ICU-13417 Add the Locale::(for|to)LanguageTag() functions.
They are C++ wrappers of uloc_forLanguageTag() and uloc_toLanguageTag()
respectively, that take care of dynamic memory management.
2018-09-27 14:27:39 -07:00
Fredrik Roubert
3e8fb05f7c
ICU-13417 Add the internal helper class CharStringByteSink.
This is an implementation of the public ICU ByteSink interface that
writes to the ICU internal class CharString.
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
Jeff Genovy
ddf8ff2b7d
ICU-13812 Define U_FALLTHROUGH for GCC 7+ for ICU4C. (#100)
Currently U_FALLTHROUGH is not defined for GCC, meaning that any switch case statements with fall-throughs will generate warnings when building ICU4C.

In GCC 7, they added support for: "_attribute_((fallthrough))" which we can now use for U_FALLTHROUGH, which eliminates many warnings when building with GCC.
2018-09-27 14:27:39 -07:00
Jeff Genovy
4214b4aa2a
ICU-13687 ICU4C Enable Windows UWP version to use TZ update/override files. (#31)
Enable the Windows UWP version of ICU4C to use TZ update/override files (.res files) for out-of-band timezone data updates. Also use the *W version of the Windows APIs to avoid code-page conversion.
2018-09-27 14:27:39 -07:00
jungshik
5cfdf4a519
ICU-20098 Fix BCP47 validity check for extlang and privateuse singleton (#102)
* ICU-20098 Fix the validty check for extlang in uloc_forLanguageTag

BCP 47 has the following for language. extlang subtag can only be
preceded by 2*3ALPHA. Add a check for the length of language subtag
before extlang subtag.

language      = 2*3ALPHA            ; shortest ISO 639 code
                 ["-" extlang]       ; sometimes followed by
                                     ; extended language subtags
               / 4ALPHA              ; or reserved for future use
               / 5*8ALPHA            ; or registered language subtag

 extlang       = 3ALPHA              ; selected ISO 639 codes
                 *2("-" 3ALPHA)      ; permanently reserved}}

With this change, 'hant-cmn-CN' would drop '-cmn-CN' keeping only
'hant'.

* ICU-20098 Fix the validty check for extlang for ICU4J

* ICU-20098 Fix the compiler failure for ICU4J

* ICU-20098 Fix a compile error and test.

* ICU-20098 Add a test for invalid private use  singleton

ICU4C's check for private use singleton subtag ('x') is wrong and
treats invalid language tags as valid.

ICU4J's check is correct and does not require any change.

Fix that and add tests to both ICU4C and ICU4J.
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
William Zhao
fcb82cb744
ICU-20103 Using GetLocaleInfoEx to get user default locale instead of using language for UWP app. (#86)
This pull request is to remove COM dependency in ICU, so that ICU does not need to care about if the caller is a UWP or not.
2018-09-27 14:27:39 -07:00
Andy Heninger
71c66bbb0b
ICU-13834 add pinCapacity() for safer output buffer capacity checking. (#105)
* ICU-13834 add pinCapacity() for safer output buffer capacity checking.

* ICU-13834 pinCapacity, fix typo in comment.
2018-09-27 14:27:39 -07:00
Markus Scherer
82f0f480d4
ICU-20086 C++ sets & maps for Unicode properties (#93)
also create ucpmap.h from renamed parts of ucptrie.h
2018-09-27 14:27:39 -07:00
Jeff Genovy
2290dba1a4
ICU-20017 Fix line endings in Visual Studio *.props files. (#101) 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
Andy Heninger
740b24118f
ICU-8151 Simplify Finnish Line Break Tailoring, move to root. (#99) 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
Paul Smith
0c89ed5c65
ICU-20027 Support parallel builds with MSYS/MSVC and Cygwin/MSVC (#104) 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
Markus Scherer
d2ec8987a7
ICU-8966 ICU-12850 add API/data/code for text layout properties InPC, InSC, vo (#92)
ICU-8966: Indic_Positional_Category & Indic_Syllabic_Category

ICU-12850: Vertical_Orientation
2018-09-27 14:27:39 -07:00
Jeff Genovy
eae698a61e
ICU-13712 ICU4C does not report OOM if it fails to memory map the data file(s) (#30)
ICU does not report Out-Of-Memory (OOM) if it fails to memory map the data file(s) when calling the various platform API(s) to do so.

When you are using ICU with memory-mapped data file(s), and ICU fails to map the data file due to being out-of-memory, it does not bubble this failure up to the API that was called. You will instead get back the error U_MISSING_RESOURCE_ERROR, rather than U_MEMORY_ALLOCATION_ERROR, which might be a bit surprising to the caller of the API. This can lead to the application thinking that there are no resources for "en_US" or "en" (or even "root").

This change modifies ICU4C so that it will report back U_MEMORY_ALLOCATION_ERROR if OOM happens when attempting to load the data files.
2018-09-27 14:27:39 -07:00
Markus Scherer
4dfe25a9a7
ICU-13530 fix doxygen warnings: hide internals, hide struct/enum typedefs, avoid fwd+real struct decl (#84) 2018-09-27 14:27:39 -07:00
Markus Scherer
000c266045
ICU-13530 fix bugs, add tests, clarify docs (#83)
* ICU-13530 test & fix cptrie.getRange() when small null data block matches the start of a non-null fast data block

* ICU-13530 fix test bug

* ICU-13530 test & fix bug calculating worst-case data array capacity at start of compaction

* ICU-13530 docs: clarify buildImmutable() discards upper bits, trie then returns unsigned ints; range iteration slower than if ranges were stored directly

* ICU-13530 accept feedback on docs
2018-09-27 14:27:38 -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
Markus Scherer
e98e9d3e01
ICU-13530 add ucptrie.h & umutablecptrie.h to docmain.h (#72) 2018-09-27 14:27:38 -07:00
Andy Heninger
c34984bd6f
ICU-13664 RBBI, add regression test for reported problem (already fixed.) 2018-09-27 14:27:38 -07:00
Andy Heninger
6e5a5463b4
ICU-20043 Compile warning fix with improved portability. (#78) 2018-09-27 14:27:38 -07:00