Commit Graph

21662 Commits

Author SHA1 Message Date
Norbert Runge
b4fef640cf ICU-20217 Adds additional ICU4C fuzzers. 2019-01-28 15:55:17 -08:00
Shane Carr
ccba38d382 ICU-20298 Adding improved locale filtering to buildtool.
- Integrates changes from cldrbug 11802 to ICU.
- Adds test suite for buildtool.
- Adds new filter type "union".
2019-01-28 13:43: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
Jeff Genovy
dcc1300613 ICU-20200 Fix mistaken move of MSB8012 warning suppression from shared props file to Library only props file. 2019-01-25 18:02:26 -08:00
Jeff Genovy
11af9f2da4 ICU-20200 Treat select warnings as errors in the ICU4C library code (with MSVC). 2019-01-25 15:58:18 -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
Don
de6607c9cd ICU-20171 Fix buffer overrun in genccode 2019-01-25 15:29:34 -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
e10bdb96a7 ICU-20283 Updating docs of old FormattedNumber field position methods.
Most users can use the new method, but these methods may still be useful when needing to interact with the FieldPosition-based APIs.
2019-01-24 16:47:42 -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
Jeff Genovy
e7d36adf17 ICU-20206 ICU4C: Make USE_WINDOWS_LCID_MAPPING_API compile-time configurable. 2019-01-24 14:55:26 -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
Andy Heninger
f0d3f25b0b ICU-20089 Add ICU4C Docs build to Travis CI 2019-01-24 13:32:55 -08:00
Jeff Genovy
9b3030463f ICU-20369 ICU4C: Report OOM errors in the utrie2_clone function. 2019-01-23 17:33:05 -08:00
Jeff Genovy
972e31d58d ICU-20364 Cygwin builds need to set WINVER to 0x0601 for Windows 7, similar to MinGW builds. 2019-01-23 17:20:15 -08:00
Shane Carr
1f7d8ababe ICU-20358 Clean up grouping resolution in DecimalFormat#toPattern(). 2019-01-18 17:40:49 -08:00
Jeff Genovy
e96724b52f ICU-20323 Suppress MSYS2 GCC warning about std::atomic visibility (Windows). 2019-01-18 10:14:58 -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
Jeff Genovy
b0a372ac9a ICU-20353 Fix MSVC Warning/Error C4251 with CodePointMatcherWarehouse and MemoryPool. 2019-01-16 14:59:57 -08:00
Jeff Genovy
25380f6f81 ICU-20352 Remove unneeded UWP includes for WRL and Windows.Globalization.h from putil.cpp 2019-01-16 14:28:09 -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
Daniel Ju
b12f741e4b ICU-13653 Quiet warnings about output target when building with MSVC 2019-01-14 13:39:20 -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
Jeff Genovy
c3291233c4 ICU-20325 Fix warnings about unknown pragma when building with GCC in MSYS2 (Windows). 2019-01-10 14:31:47 -08:00
Jeff Genovy
83fea413ba ICU-20315 Fix MSYS2 build break: Don't prepend the source dir if it is just a current directory (.) path. 2019-01-09 17:02:29 -08:00
Andy Heninger
921ae1b71e ICU-20227 Regex API docs - add references to URegexpFlag where flags are mentioned. Replace html with markdown. 2019-01-04 09:28:01 -08:00
Yoshito Umaoka
6cc883775b ICU-20331 time zone data updates for tzdata2018i 2019-01-03 14:37:58 -05:00
Andy Heninger
58786f5cbe ICU-12079 Full width digits become numeric for word break. 2018-12-18 16:36:06 -08:00
Victor Chang
0a258170f9 ICU-20309 UCONFIG_NO_CONVERSION block should include the doxygen doc for uregex_openC 2018-12-18 16:31:56 -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
d8520c9f66 ICU-20302 Fix wintz header file. (Thanks to Jungshik). 2018-12-14 19:39:48 -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
Victor Chang
8aa5d23d7d ICU-20308 Define a fixed suffix without the ICU version suffix
- Add a config macro U_DISABLE_VERSION_SUFFIX to disable version suffix
2018-12-13 10:56:57 -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
Jeff Genovy
3db38553ad ICU-20279 Remove MSVC specific macro _ARM64_
Remove unneeded check for MSVC internal _ARM64_ macro in normlzr.cpp
2018-12-12 13:55:07 -08:00
Shane Carr
c30cd07c7e ICU-20299 Adds Python 2.7 support to data build script. 2018-12-12 12:56:00 -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
70341459e3 ICU-10923 Fixing broken dependency names in BUILDRULES.py.
Fixes warnings and a flaky test.
2018-12-10 23:49:04 -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
Steven R. Loomis
00b360227b ICU-20247 use = instead of == in sh compare
* Note: the diff will show changes to "runstatedir". This is
a feature which ICU does not use, and it is not in any released
autoconf version. Perhaps some distributions patched autoconf
locally.

https://lists.gnu.org/archive/html/autoconf/2018-07/msg00006.html
2018-12-05 14:32:36 -08:00
Shane Carr
cd4644c4a0 ICU-20293 Adds common base class to implement C API validation methods. 2018-12-04 15:57:06 -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
Fredrik Roubert
2d3901ae5d ICU-20271 Use C++11 operator new = delete to disallow heap allocation. 2018-11-19 13:59:36 +01: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
776b9d7f2b ICU-20185 Remove U_USER_ATOMICS_H, U_USER_MUTEX_H, U_USER_MUTEX_CPP 2018-11-13 14:48:48 -08:00
Fredrik Roubert
f38c928960 ICU-20202 Merge #ifdef __cplusplus blocks.
For historical reasons (commit 3b12074b40),
all C++ code (even #include statements) in cmemory.h is contained in an
#ifdef block at the end of the file. A recent bugfix inadvertently added
an additional #ifdef __cplusplus block at the beginning of the file to
add a new #include statement so that C++ #include statements now are
found in two places (commit 1bad36b91a).
2018-11-13 22:58:27 +01:00
Andy Heninger
d6c3b271fe ICU-20084 IntlTest, add WHERE macro; remove redundant TEST macros. 2018-11-13 11:08:35 -08:00
Jeff Genovy
7756ee0446 ICU-20239 Add VS2015 build line to the Azure CI builds. 2018-11-12 16:44:44 -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
Jeff Genovy
401cdb46ef ICU-20238 Autodetect Visual Studio version, and autodetect the installed Windows 10 SDK version. 2018-11-08 16:46:36 -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
Markus Scherer
59006770ed ICU-20250 faster MutableCodePointTrie.build(): use a hashtable to find equal blocks in earlier parts of the compacted data & index arrays 2018-11-07 14:29:24 -08:00
Fredrik Roubert
93e84caa65 ICU-20169 Replace uprv_malloc() / uprv_free() with MemoryPool.
This resolves the immediate problem of brittle memory management
in the error handling code.

An obvious future improvement would be to replace the old C style
"plain struct with pointers" VariantListEntry, AttributeListEntry
and ExtensionListEntry with contemporary C++ style containers that
take care of ownership and memory management.
2018-11-07 17:58:14 +01:00
Fredrik Roubert
710212c495 ICU-20249 An internal helper class for stack allocated UResourceBundle. 2018-11-07 17:57:50 +01: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
Fredrik Roubert
9877b633a2 ICU-20169 Use LocalULanguageTagPointer also inside of ultag_parse(). 2018-11-06 13:28:54 +01:00
Fredrik Roubert
9de0383cfa ICU-20202 Replace CodePointMatcherWarehouse with MemoryPool.
The shared templated helper class MemoryPool can be used to replace the
local helper class CodePointMatcherWarehouse, reducing the amount of
specialized code needed.
2018-11-05 13:37:10 +01:00
Andy Heninger
a96dc7faa5 ICU-10183 revert mutexes to platform code while sorting dependencies from std::mutex. 2018-11-02 15:59:03 -07:00
Andy Heninger
1bad36b91a ICU-20202 MemoryPool and uloc_key_type structs inherit from UMemory. Fixes dependencies on global operator new(). 2018-11-02 15:38:31 -07:00
Shane Carr
53d8c8f3d1 ICU-20246 Fixing another integer overflow in number parsing. 2018-10-31 13:37:09 -07:00
Andy Heninger
f71796d5e5 ICU-10183 Mutexes, add C++11 std::mutex based implementation. 2018-10-31 13:07:19 -07:00
Fredrik Roubert
91d38d14e8 ICU-20169 Use smart pointers in all locale code instead of u*_close().
Doing this consistently first will make it easier to then clean up
resource management and error handling later.
2018-10-31 17:51:53 +01:00
Fredrik Roubert
47ecbc4915 ICU-20158 Pass ByteSink from Locale::forLanguageTag() to uloc_forLanguageTag().
This eliminates the need for a scratch buffer in Locale::forLanguageTag()
and also the need for counting bytes required in uloc_forLanguageTag(),
something that ByteSink will now handle correctly.
2018-10-31 12:21:15 +01:00
Fredrik Roubert
5b4ac1c77d ICU-20202 Replace char* kwdBuf with MemoryPool<CharString>.
Instead of _appendLDMLExtensionAsKeywords() requiring to receive a pre-
allocated buffer of sufficient size to store all the temporary strings
it needs to store, have it use a MemoryPool<CharString> to allocate
storage space as needed.

Storing strings as individual CharString objects, instead of as NUL
delimited substrings in a contiguous memory area, also eliminates the
need for keeping track of string boundaries and NUL terminators.
2018-10-30 23:27:11 +01:00
Yoshito Umaoka
12a71c7dcb ICU-20245 tzdata2018g updates 2018-10-30 18:14:03 -04:00
Jeff Genovy
f76f68aeaa ICU-20221 Add support for building with Cygwin/GCC to the AppVeyor CI builds. 2018-10-30 10:26:07 -07:00
Fredrik Roubert
964a8eb036 ICU-20202 Replace UVector with MemoryPool in uloc_keytype.
By moving the required call to uhash_close() into the destructor of
LocExtKeyData and using CharString instead of raw chunks of bytes
allocated with uprv_malloc(), it becomes easier to guarantee that
memory handling is correct, without leaks or overflows.

With the need for custom deleter functions removed, the code doesn't use
any of the additional functionality provided by UVector, it just needs a
simple way to keep track of allocated objects to delete them after it's
done using them, which MemoryPool does in a simpler and typesafe way.
2018-10-30 17:06:56 +01:00
Fredrik Roubert
440d8b3be8 ICU-20202 Replace UVector with MemoryPool in CalendarDataSink.
CalendarDataSink doesn't use any of the additional functionality
provided by UVector, it just needs a simple way to keep track of
allocated objects to delete them after it's done using them.
2018-10-30 17:01:10 +01: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
b8d2d92d36 ICU-20202 Replace CharStringPool with MemoryPool.
The shared templated helper class MemoryPool is a drop-in replacement
for the local helper class CharStringPool, with a simpler implementation
and an interface that allows parameters to be passed to the constructor.
2018-10-29 22:58:33 +01:00
Fredrik Roubert
d62f5ae5d8 ICU-20202 Add an internal helper class to own heap allocated objects.
This will be used first to replace existing locally defined memory
management helper classes such as CharStringPool (uloc_tag.cpp) and
CodePointMatcherWarehouse (numparse_affixes.h), then in new code.
2018-10-29 22:26:29 +01:00
Fredrik Roubert
21a8698951 ICU-20235 Undefine OVERFLOW in case Microsoft math.h has defined it. 2018-10-29 12:07:16 +01:00
Jeff Genovy
3d86d24a68 ICU-20240 Fix Windows build failure in japancal.cpp 2018-10-26 14:12:24 -07:00
Jeff Genovy
13ad1fe4e0 ICU-20194 TimeZone createSystemTimeZone doesn't set error code on OOM error. 2018-10-25 15:22:38 -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
8b7fa6a03f ICU-20228 Revert file from commit 10e79698d7.
This file was changed by mistake (and not caught by the presubmit tests
because of unrelated build failures).
2018-10-24 23:26:00 +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
Yoshito Umaoka
48d3ad0d39 ICU-20224 tzdata2018f updates. 2018-10-19 22:15:18 -04: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
Jeff Genovy
9ec2c332c1 ICU-20208 uspoof.cpp function checkImpl should be static, regenerate urename.h 2018-10-18 16:38:28 -07:00
Andy Heninger
47b3922b59 ICU-20212 unistr.h, review comments from Markus for doc formatting. 2018-10-18 10:01:51 -07:00
Andy Heninger
f3ce5a33be ICU-20212 Tweaks to markdown API docs in unistr.h 2018-10-18 10:01:51 -07:00
Andy Heninger
7918e54d30 ICU-20212 Markdown API docs in unistr.h 2018-10-18 10:01:51 -07:00
Ken Brown
31b89b5484 ICU-20214 Fix namespace error on Cygwin 2018-10-17 19:31:08 -07: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
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
b098078ab8
ICU-20120 63 BRS, integrate cldr release-34-beta with various fixes (#186) 2018-10-05 11:01:15 -07:00
gvictor
ff72d74d1e ICU-20193 urename.h shouldn't be ignored by other compilers except VS IntelliSense (#189)
The macro _MSC_VER is not defined in other compilers.
Change the logic and so urename.h is ignored on VS IntelliSense
2018-10-04 16:29:57 -07:00
kbrow1i
7d99ba4e57 ICU-20191 Don't use Win32 APIs on Cygwin (#185)
This was fixed in earlier commits (see, for example, ICU-12786), but
the problem was reintroduced in commits f8ba68e and fcb82cb.
2018-10-04 14:10: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
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
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
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
gnrunge
39b98c8a6b
ICU-20168 Fix memory leak in error path, add a free statement. (#175) 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
ff9876421e
ICU-20119 pool bundles for ICU 63/CLDR 34 (#173) 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
97710f4586
ICU-20119 Remove C linkage declaration; urename.h BRS-update script (#169)
otherwise includes entry points that should not be included.
2018-09-27 14:27:41 -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
Markus Scherer
5148a38143
ICU-20125 numeric values of level constants will not change; fix/update some docs (#159) 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
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
Shane F. Carr
a38beef113
ICU-20160 Add check for Python 3 in autoconf and nmake. (#157) 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
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
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
Fredrik Roubert
cc6c31432e
ICU-13417 Pass length from Locale::forLanguageTag() to ultag_parse().
If not passed a length, ultag_parse() will call uprv_strlen(), requiring
the input buffer to be NUL terminated. This is unnecessary.
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
gnrunge
1ca6e3759f
ICU-20119 Merge pull request #152 from gnrunge/icu63_1
ICU-20119 Smalles fixes for public and internal header test failures.
2018-09-27 14:27:41 -07:00
Markus Scherer
92b41c8be2
ICU-20081 ucase_swap add parens, avoid warning (#156) 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
764281e463
ICU-20119 Adds comment to change that fixes a header test failure. 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
Norbert Runge
160ad69219
ICU-20119 Smalles fixes for public and internal header test failures. 2018-09-27 14:27:41 -07:00
Fredrik Roubert
acc3f65a87
ICU-13417 Replace fixed buffers in uloc_tag.cpp with CharString.
This gets rid of those fixed buffers that caused ICU-13417 to be filed
in the first place, those that prevent handling language tags with very
large amounts of keywords.

A number of fixed buffers will still remain in uloc_tag.cpp (and
elsewhere in the locale handling code) for the time being, but this
change is a necessary first step in cleaning up this code and will
alleviate the most pressing problem encountered by ICU4C users.

An off-by-one error in _getKeywords() caused uloc_canonicalize() to not
write out the final keyword value in case the result would fill up the
buffer exactly, resulting in U_STRING_NOT_TERMINATED_WARNING.
2018-09-27 14:27:41 -07:00
Markus Scherer
e22adb02d2
ICU-20081 ucase_swap() fix version range check (#151) 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
Jeff Genovy
65b75640e2
ICU-13827 Clean up ICU4C "wintz.cpp" time zone detection code.
- Use stack allocated UResouceBundle to reduce number of calls to malloc (in a method that can't report back an error if Out-Of-Memory [OOM] happens).
- Use LocalUResourcePointer for automatic clean-up of UResouceBundle.
- Use uprv_strdup instead of calloc + strcpy.
- Changes comments, formatting, etc.
2018-09-27 14:27:41 -07:00
Norbert Runge
a480c5b86d
ICU-20119 Review changes. 2018-09-27 14:27:40 -07:00
Norbert Runge
540f3b7645
ICU-20119 Merge github.com:unicode-org/icu into icu63_1 2018-09-27 14:27:40 -07:00
Norbert Runge
07a1611134
ICU-20119 Delete script, was renamed to icu-file-utf8-check.py. 2018-09-27 14:27:40 -07:00
Shane Carr
068ef1c265
ICU-20063 Make setSignificantDigitsUsed more friendly. 2018-09-27 14:27:40 -07:00
Norbert Runge
e259adc944
ICU-20119 Additional changes to UTF-8 checking script. 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
Norbert Runge
6f057afad6
ICU-20119 Migrates script that checks for proper UTF-8 encoding in source
files and for absence of BOM in all but text files into the github environment.
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
Fredrik Roubert
74759b467e
ICU-13645 Remove redundant invocations of the Locale copy constructor. 2018-09-27 14:27:40 -07:00
Jeff Genovy
f165bf10e7
ICU-20145 Allow passing locale in ICU4C "date" sample program for testing without using the environment variable "LC_ALL". (#125)
The ICU4C sample "date" program just uses the "default" ICU locale. This change lets you pass in an explicit locale argument for testing on platforms like Windows that don't have/use the environment variable "LC_ALL".
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
jungshik
4ed35d7bb5
ICU-20140 Allow duplicated keys in U-extension per RFC 6067 (#136)
* ICU-20140 Allow duplicated keys in U-extension per RFC 6067

RFC 6067 [1] does allow duplicate keywords, but ICU4C's
uloc_forLanguageCode rejects it as invalid.

Change it to accept duplicate keywords and honor only the
1st one while ignoring subsequent ones per RFC 6067.

[1] Unicode extension to BCP 47:
    https://tools.ietf.org/html/rfc6067

* ICU-20140 Add ICU4J test and tweak ICU4C test

ICU4J test diverges from ICU4C tests:

1. Handling of duplicate variants in ICU4J seem to be wrong:
   https://unicode-org.atlassian.net/browse/ICU-20148
2. ULocale.forLanguageTag only throws NullPointException so
   that ICU4C's test for duplicate attributes cannot be ported.
2018-09-27 14:27:40 -07:00
Shane
ce92011aff
ICU-11276 Adding NumberRangeFormatter (#87)
Formats number ranges, including currencies and measurement units.
2018-09-27 14:27:40 -07:00
Don
d55773ce28
ICU-20136 Check U_HAVE_TZ* values (#114)
* Add check for U_HAVE_TZSET

* Add check for U_HAVE_TZNAME
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
Yoshito Umaoka
61c42a598b
ICU-20119 BRS63 Currency numeric code data update - VES and UYW (#126) 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
pedberg-icu
b56178412f
ICU-20075 For POSIX, increase correctedPOSIXLocale size for localeID expansion with @ (#112) 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
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
Shane Carr
d4e8ed7ed0
ICU-11276 Replying to Andy review feedback. 2018-09-27 14:27:40 -07:00
Don
cc5bf22a0c
ICU-20135 Use __has_declspec_attribute (#113)
> Clang comes with __has_declspec_attribute to detect whether the name of an attribute is implemented as a MS style __declspec.

> This adds __has_declspect_attribute to the list of clang compatibility macros and then uses that check to determine if __declspec(dllimport) and __declspec(dllexport) can be used.
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
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
Fredrik Roubert
5d4f3d7fea
ICU-13645 Add C++11 move constructor and assign operator to Locale. 2018-09-27 14:27:39 -07:00
Shane Carr
083fe73d6b
ICU-11276 Rewriring NumberFormatterImpl to expose information needed for NumberRangeFormatter. 2018-09-27 14:27:39 -07:00
Fredrik Roubert
e10ce23db1
ICU-13645 Clean up implementation of Locale::operator=(const Locale&).
Organizing the implementation like this instead will (hopefully) make it
more clear what's being done and make it possible to use analogous
control flow in the copy and move implementations of operator=().
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
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
46e08431a6
ICU-13417 Add the Locale::get(Unicode)?Keywords() functions.
They are C++ template wrappers around Locale::createKeywords() and
Locale::createUnicodeKeywords() respectively, that write to any
container for which an STL style output iterator can be provided.

The simplest imaginable usage would just look like this:

    std::string keys[16];
    l.getKeywords<std::string>(keys, status);

The unit test has a more elaborate invocation, writing to an std::set<>.
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
Fredrik Roubert
7c2a8d1fcc
ICU-13417 Add the Locale::(addLikely|minimize)Subtags() functions.
They are C++ wrappers of uloc_addLikelySubtags() and uloc_minimizeSubtags()
respectively, that take care of dynamic memory management.
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
Fredrik Roubert
fbc730fba1
ICU-13417 Add the Locale::(get|set)(Unicode)?KeywordValue() functions. 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
Fredrik Roubert
8985e60d38
ICU-13417 Improved error handling in Locale::create(Unicode)?Keywords().
Follow-up from pull request #117:

Specify buffer size in only one place, explicitly check status before
proceeding and set status = U_MEMORY_ALLOCATION_ERROR if new fails.
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
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
Fredrik Roubert
6eb53e0884
ICU-13417 Add the Locale::createUnicodeKeywords() function.
This is a wrapper of Locale::createKeywords() that under the hood calls
uloc_toUnicodeLocaleKey() for each key before returning it, so that the
caller won't have to do this.
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
Shane Carr
9924225ed6
ICU-11276 Adding initial header files for NumberRangeFormatter. 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
Andy Heninger
c28e714aac
ICU-20079 int overflow in Gregorian Calendar. (#66) 2018-09-27 14:27:38 -07:00
William Zhao
f8ba68ee1f
ICU-13842 Use GetDynamicTimeZoneInformation instead of Windows registry access in wintz.cpp (#55)
Use GetDynamicTimeZoneInformation instead of accessing the Windows registries so that it does not rely on COM in wintz. So that UWP apps could also use this code.
2018-09-27 14:27:38 -07:00
Andy Heninger
03c6e86c6c
ICU-13334 add test for reported word break behavior issue, not reproducable. (#74) 2018-09-27 14:27:38 -07:00
sav-ix
b9264c3da5
ICU-20061 fix 'rm: cannot remove 'current'' warning during build (#65)
need to use force removal in order to not make noise in stderr.
2018-09-27 14:27:38 -07:00
sav-ix
3799ced323
ICU-20051 fix 'goods=: command not found' warning during build (#64)
a typo 'test/Makefile.in' made noise in stderr.

additionally brought similar code to the common view.
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
Andy Heninger
278b9cb735
ICU-20079 integer overflow & divide by zero sanitizer fixes. (#67) 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
Jeff Genovy
01ca8fb555
ICU-13530 Use LocalPointer instead of raw new in umutablecptrie.cpp (#59)
Use LocalPointer instead of raw new in umutablecptrie.cpp so that an ErrorCode will be set in the case of out-of-memory (OOM) failures.
2018-09-27 14:27:38 -07:00