Commit Graph

22574 Commits

Author SHA1 Message Date
Markus Scherer
d2d144a5bd ICU-21009 LocaleMatcher() order[] always set all elements 2020-03-14 14:07:29 -07:00
Jeff Genovy
5c8b142a92 ICU-21014 Fix OOM not checked in dtitvfmt.cpp and dtitvinf.cpp 2020-03-13 18:05:46 -07:00
Peter Edberg
69b3523593 ICU-20987 integrate CLDR release-37-alpha3 to master, adjust MeasureUnitTest.java tools 2020-03-13 12:01:39 -07:00
Shane F. Carr
2d83fc2278 ICU-20809 Remove FieldPositionIterator from listformatter.h 2020-03-11 21:13:45 -05:00
Frank Tang
9aed97703e ICU-21011 Debug print detail size of brk files.
To print it,
$ CXXFLAGS="-DRBBI_DEBUG" ./runConfigureICU --enable-debug --disable-release  Linux/gcc --disable-layoutex
$ make clean
$ U_RBBIDEBUG="size" make
2020-03-11 11:36:28 -07:00
Peter Edberg
d6eabe4155 ICU-20879 fix typo in tests, calender → calendar 2020-03-10 23:06:21 -07:00
Markus Scherer
d490170520 ICU-20700 uloc_acceptLanguage API doc update 2020-03-10 08:23:40 -07:00
Markus Scherer
72cd937620 ICU-20936 add LocaleMatcher.Builder.setDirection(with-one-way vs. only-two-way) 2020-03-10 08:22:28 -07:00
shaobero
bdba9c93e4 ICU-20945 Making icudt66.dll for x64 as PE32+ 2020-03-09 10:28:50 -07:00
Markus Scherer
d2ea4513dc ICU-20700 reimplement acceptLanguage() using the LocaleMatcher; replace older accept-language-string parsing by LocalePriorityList 2020-03-08 08:01:31 -07:00
Markus Scherer
3edff03393 ICU-20915 LocaleMatcher no match: always getSupportedIndex()=-1; remove defaultLocaleIndex field; constructor check if locales are equivalent to default, not just equal; simplify locale sorting; minor builder & test deflaking 2020-03-08 07:54:46 -07:00
Frank Tang
94c9ff2089 ICU-20991 Trace BreakIterator/BreakEngine creation
See #1014
2020-03-06 14:18:43 -08:00
Shane F. Carr
01523b4da6 ICU-20974 Fix exhaustive test failures 2020-03-06 01:34:51 -08:00
Jeff Genovy
7302079653 ICU-21000 Fix abort called by DateTimePatternGenerator::getDefaultHourCycle
If you call the API getDefaultHourCycle on an empty DateTimePatternGenerator
instance (ie: no locale) then it calls UPRV_UNREACHABLE which calls abort().
We should return an error code instead of aborting.
2020-03-05 18:19:04 -08:00
Jeff Genovy
ce7e060d50 ICU-21001 Fixing problems found by running valgrind.
This makes fixes in order to run the icu4c tests (intltest, cintltst,
iotest, and icuinfo) cleanly under valgrind with --leak-check=full.
2020-03-05 14:34:20 -08:00
Jeff Genovy
bd08ba2c5b ICU-21004 Fix buffer over-read in ucal_open
The issue shows under valgrind or as an Address Sanitizer failure.
2020-03-05 14:09:34 -08:00
Shane Carr
0b7f6b1864 ICU-20974 Correctly handle extreme values of double. 2020-03-05 13:40:59 -08:00
Peter Edberg
ad00acac12 ICU-20980 integrate CLDR release-36-1 (final) to maint-66 2020-03-05 13:25:35 -08:00
Frank Tang
be3ee4cc63 ICU-20967 add millisecond to DateIntervalFormat
See #978
2020-03-05 10:55:19 -08:00
Shane Carr
e572de5516 ICU-20961 Return correct currency plural pattern from DecimalFormat 2020-03-04 19:43:57 -08:00
Daniel Ju
6119662f03 ICU-20980 BRS66GA Update version numbers and README files 2020-03-04 11:12:47 -08:00
Peter Edberg
0778144ff6 ICU-20987 integrate CLDR release-37-alpha2 to master (new tools) 2020-03-03 15:01:28 -08:00
Peter Edberg
63e480dedc ICU-20987 integrate CLDR release-37-alpha1 to master (using new tooling) 2020-02-27 16:27:50 -08:00
Jeff Genovy
e1aa9119ad ICU-20975 BRS66rc Fix warnings found when building ICU4C samples. 2020-02-26 13:04:08 -08:00
Shane Carr
bb1f00efb8 ICU-20919 Merge branch 'maint/maint-66' into maint-66-merge
Conflicts:
	icu4j/main/shared/data/icudata.jar
2020-02-21 18:21:05 -08:00
Laurent Stacul
3b58179396 ICU-20972 Fix invalid conversion from const char8_t* to const char* (C++20) 2020-02-20 13:09:18 -08:00
Markus Scherer
af9ef2650b ICU-20893 Unicode 13 data 2020feb19 2020-02-19 22:02:35 -08:00
Jeff Genovy
77fcded28b ICU-20969 Fix file permissions (-x) on ICU4C source files. 2020-02-19 17:00:06 -08:00
Peter Edberg
d95621c57f ICU-20975 BRS66rc update Unicode license copyright 2020-02-19 15:23:29 -08:00
Vincent Torri
caa25fd878 ICU-20842 Fix library names in pkg-config files on Windows (mingw-w64)
since the move of the DLL to bin/ the library names in .pc files is
wrong. With ICU 65.1, icu-uc.pc contains

Libs: -L${libdir} -licuuc65 -licudt65

the version number should not appear. Indeed, the linker looks for the
libraries in $prefix/lib in the following order (see [1]):

libxxx.dll.a
xxx.dll.a
libxxx.a
cygxxx.dll
libxxx.dll
xxx.dll

As the is only the import library with no versioning (which is normal),
the is a link error when using ICU pc files.

[1] https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/4/html/Using_ld_the_GNU_Linker/win32.html
2020-02-19 14:57:59 -08:00
Steven R. Loomis
532954ba14 ICU-20975 update API Change Report for 66
- Compared against ICU4C 65.1
- no substantive change. Just dropped 'preview'
2020-02-19 14:56:41 -08:00
Mojca Miklavec
4a3a457b38 ICU-20852 Fix Makefile to build on Sparc Solaris 2020-02-19 12:42:40 -08:00
Peter Edberg
ea907cdf5f ICU-20975 integrate CLDR release-36-1-beta to maint-66 2020-02-18 23:02:26 -08:00
Andy Heninger
14bcaaf58e ICU-20876 Regex Grapheme Cluster matching with Break Iterators.
Change the implementation of grapheme cluster matching in regex to use an ICU
break iterator instead of a little one-off state machine.

The old implementation had fallen behind the Unicode UAX-29 specification for
graphem clusters, and could not be easily updated.

The implementation follows the same general pattern that is used for finding
word boundaries with an ICU break iterator. In reviewing that code, a few
improvements to the handling of ICU error codes were also made.

Also note that this change adds a new dependency on Break Iteration.  Regex
patterns that previously would work with ICU builds that were configured with
no break iteration will now fail. But only if they include \X for matching
grapheme cluster boundaries.
2020-02-18 18:28:10 -08:00
Daniel Ju
925f255092 ICU-20975 BRS66RC Update version numbers, README files, configure 2020-02-18 14:40:46 -08:00
Jeff Genovy
783ee4c902 ICU-20322 On MinGW, move the DLLs to the "bin" directory.
This change builds on Vincent Torri's changes.

This installs the ICU DLL files in $prefix/bin instead of $prefix/lib.

Note: In order to disable this change in behavior you can edit
the "mh-mingw*" file(s). If you set the variable MINGW_MOVEDLLSTOBINDIR
to NO instead of YES, then it will retain the previous behavior of
installing the DLLs into the bin folder.
2020-02-12 14:19:15 -08:00
Vincent Torri
5fbb4d3a5f ICU-20322 Install dll in $prefix/bin instead of $prefix/lib 2020-02-12 14:19:15 -08:00
Andrew Paprocki
cd41cba82a ICU-20895 ICU_TIMEZONE_FILES_DIR_PREFIX_ENV_VAR
Adds `ICU_TIMEZONE_FILES_DIR_PREFIX_ENV_VAR`, similar to
`ICU_DATA_DIR_PREFIX_ENV_VAR`, that specifies an environment variable
to retrieve and prepend to the ICU time zone data file path.
2020-02-12 12:45:12 -05:00
Frank Tang
6ea0fc7713 ICU-20834 Implement UTS35 Locale ID Canonicalization
See #951
2020-02-11 22:44:39 -08:00
Mihai Nita
dd50e38f45 ICU-20738 Best-match pattern for 'sS' uses <appendItem> data 2020-02-10 07:59:52 -08:00
Shane Carr
9eca171a39 ICU-20954 Fix currency spacing in suffix. 2020-02-06 09:56:32 -08:00
Elango Cheran
1a9fb8ec33 ICU-13836 C++ port of adding exponent for better plurals for compact decimal format 2020-02-05 09:08:48 -08:00
Andy Heninger
d6b88d49e3 ICU-20939 Fix problem w regexp \b boundaries & UTF-8 text
In regular expressions, when testing for word boundaries with \b, the
boundaries were incorrect when in Unicode mode, meaning that an ICU word break
iterator is being used to find the boundaries, and the text being matched is
UTF-8 encoded.

The bug stemmed from a misunderstanding of how string indexes work with UText
and break iterators, leading to the inclusion of code to convert from UTF-8 to
UTF-16 indexing, when what was wanted was the original UTF-8 index everywhere.
Removing the indexing conversion fixes the problem.
2020-02-03 16:51:17 -08:00
Frank Tang
b7d08bc04a ICU-20958 Prevent SEGV_MAPERR in append
See #971
2020-02-03 13:22:30 -08:00
Andy Heninger
54a60fe6f4 ICU-11548 Improve regex static UnicodeSets handling
Compiled regular expression patterns make use of several shared common
UnicodeSets. This change simplifies the creation and use of these
static UnicodeSets.

- Pointer fields to the static sets are removed from the compiled patterns,
  and the static variables are accessed directly. The deleted pointers
  were a hold-over from earlier code that did not use shared statics.

- The UnicodeSet pattern literals are changed from hex constants to
  u"string literals".

- The size of fRuleSets (from regexst.h) is changed from a hard-coded 10
  to the number of UnicodeSets actually required. Doing this required
  a change to regexcst.pl to export the required size. Changing and
  rerunning this perl code resulted in massive but benign changes to
  the generated file regexcst.h, the result of perl having changed its
  order of enumeration of hashes since the file was last regenerated.

- UnicodeSets are frozen when possible. Should result in faster matching.
2020-01-30 15:13:07 -08:00
Egor Pugin
76f190024d ICU-20938 Add --skip-dll-export option to genccode to prevent exporting statically linked ICU data from executables. 2020-01-23 12:00:29 -08:00
Keita Suzuki
a4a5c603ac ICU-20767 Potential negative index access in one of the sample codes 2020-01-22 13:13:27 -08:00
Frank Tang
7a5139ad95 ICU-20934 Fix TZ test error
Somehow these tests are now fail on trunks.
Per https://mm.icann.org/pipermail/tz-announce/2019-July/000056.html
     Brazil has canceled DST and will stay on standard time indefinitely.

Cherry-picked from: 11ad8d69fb
2020-01-20 14:58:55 +01:00
Shane Carr
8c717b514e ICU-20665 Removing number-dependence from ICU4C FormattedStringBuilder fields.
See #727
2020-01-17 11:22:02 +01:00
Frank Yung-Fong Tang
21df05234d ICU-20673 Allow built-in translit ID w/o data.
See #958
2020-01-16 21:28:01 -08:00
Shane Carr
0ad2f9590b ICU-20418 Fix indentation of CHECK_NULL in number_skeletons.cpp 2020-01-14 11:52:27 +01:00
Shane Carr
fe98d870b2 ICU-20418 Adding concise number skeletons in ICU4C 2020-01-14 11:52:27 +01:00
Shane Carr
df8841aa6f ICU-20418 Adding *internal* parse method for core unit identifiers.
Also see ICU-20286
2020-01-14 11:52:27 +01:00
Shane Carr
b24538eb05 ICU-20921 Adding find and compare to StringPiece 2020-01-14 11:52:27 +01:00
Joshua Root
a3078fb8c8 ICU-20875 Include <cstddef> for max_align_t
The definition of max_align_t is not guaranteed to be available unless
the appropriate header is included. Since use of <stddef.h> from C++ is
deprecated, that's <cstddef>, and max_align_t is thus defined under the
std namespace rather than in the global namespace.
2020-01-09 15:42:52 -08:00
Caio Lima
09d409f5f4 ICU-20442 Adding support for hour-cycle on DateTimePatternGenerator
DateTimePatternGenerator needs to consider the hour-cycle preferred by
Locale. This means that we need to to override the hour-cycle when a
locale contains "hc" keyword. This patch is adding such functionality.
In addition, "DateTimePatternGenerator::adjustFieldTypes" should adjust
hour field to properly follow tr35
spec(https://www.unicode.org/reports/tr35/tr35-dates.html#dfst-hour).
2020-01-09 16:45:56 +01:00
Smaarn
996da8faac ICU-20871 Fixed: no rule was defined to create the $(OUTDIR) directory if it didn't exist.
This would cause failures during cross compilation cases such as:

make[6]: Leaving directory '/spksrc/spk/bazarr/work-qoriq-6.1/icu/source/data'
make[5]: *** No rule to make target 'out', needed by 'out/icudt64b.dat'.  Stop.
2020-01-08 15:42:35 +01:00
Hugh McMaster
5aae52d3ef ICU-20924 Use pkg-config to generate the path to pkgdata.inc 2020-01-07 14:19:02 -08:00
Frank Tang
11ad8d69fb ICU-20934 Fix TZ test error
Somehow these tests are now fail on trunks.
Per https://mm.icann.org/pipermail/tz-announce/2019-July/000056.html
     Brazil has canceled DST and will stay on standard time indefinitely.
2020-01-03 20:52:11 -08:00
Frank Tang
4a8483be91 ICU-20900 Fix createCanonical
See #922
2020-01-03 15:00:04 -08:00
Markus Scherer
60b567d6ab ICU-20917 LocaleMatcher: prefer a more-default locale 2020-01-02 18:00:52 -08:00
Frank Tang
79fac50101 ICU-20310 omit "-true" in toLanguageTag
See #952
2019-12-30 15:39:59 -08:00
Markus Scherer
cb1d4f5903 ICU-20916 UBSan & ErrorProne fixes 2019-12-20 14:56:31 -08:00
Markus Scherer
ad638c274e ICU-20916 LocaleMatcher distinguish between equivalent locales
- equivalent but originally unequal
- locale distance shifted left for additional fraction bits with micro distance
- Java more verbose matcher debug output
See #949
2019-12-20 09:36:57 -08:00
Shane Carr
46ec4fd523 ICU-12863 Add list style APIs to C and C++
See #894
2019-12-17 13:07:36 -08:00
Andy Heninger
faa2f9f9e1 ICU-20303 Break Iterator, improve handling of look-ahead rules.
- Merge the look-ahead results slots used when multiple rules share a common accepting state.
- Sequentially number the look-ahead result slot. Will eventually allow replacing the runtime map with an array.
- Inhibit chaining out of look-ahead rules. This could never actually happen; when a hard break
  rule matches, the engine is stopped immediately, but the state table was being constructed
  as if it could  happen. Reduces table size for line break rules.
- Remove incorrect handling of fAccepting and fLookAhead fields of a state table row
  when removing duplicate states. Look-ahead slot number was being mis-interpreted as a state number.
2019-12-13 13:17:21 -08:00
Shane Carr
7917df1e80 ICU-20883 Move UFormattedDateInterval to end of argument list. 2019-12-12 13:48:28 -08:00
Frank Tang
923ec1ad30 ICU-20436 Add getDefaultHourCycle to DateTimePatternGenerator
See #901
2019-12-12 00:13:37 -08:00
Rosen Penev
8fda72f6d8 ICU-20877 i18n: Don't use C++11 math
It's not available with some libc implementations. Specifically,
BIONIC and uClibc-ng. uprv_ variants are available.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2019-12-11 20:55:23 -08:00
Joshua Root
c6fd07cdec ICU-20904 Don't use char16_t with C++98/03
When C code includes the ICU headers, the UChar type is defined to be
uint16_t. But when C++ code includes the headers, UChar is char16_t
even when U_SHOW_CPLUSPLUS_API has been set to 0. Apart from arguably
being an inconsistency in the API, this means that C++98 or C++03 code
can't use the C API even though C99 code can.

So, change unicode/umachine.h to check not just whether __cplusplus is
defined but the value of U_CPLUSPLUS_VERSION when deciding how to
typedef UChar.
2019-12-11 18:41:27 -08:00
Shane F. Carr
39eb0f4fbf
ICU-20919 Merge maint/maint-66 (release-66-preview) to master 2019-12-11 15:25:36 -08:00
Caio Lima
7c147e4e85 ICU-20741 Changing SimpleDateTimeFormat::subFormat to only include 1 field at the same position when there is a data fallback 2019-12-10 21:53:47 -08:00
Steven R. Loomis
ffbc8cf85f ICU-20857 update API Change Report for ICU 66preview
- uses tools updated in [ICU-20910]
2019-12-03 17:11:37 -08:00
Peter Edberg
e2afc5486d ICU-20857 BRS66 update urename.h 2019-12-03 08:53:23 -08:00
Jeff Genovy
f3e2f4f02e ICU-20857 Update Readme for ICU 66 Preview. 2019-12-02 15:13:15 -08:00
Jeff Genovy
afaff40164 ICU-20907 Disable optimization on Windows when building for ARM64 with Visual Studio versions below 16.4. 2019-11-27 15:35:58 -08:00
Andy Heninger
197e0239ab ICU-20893 Line break tailorings updated to Unicode 13. 2019-11-26 15:25:06 -08:00
Shane Carr
017c8b762e ICU-20890 Change locale_dependencies.py into LOCALE_DEPS.json files
- Refactors Python to make I/O operations more abstract
- Adds stable sample data for Python test
2019-11-22 20:23:30 -08:00
Peter Edberg
04c8616f93 ICU-20857 integrate CLDR release-36-1-preview to maint-66 2019-11-22 19:01:36 -08:00
Caio Lima
873e2db780 ICU-20741 Adding tests for C/C++ API into DateFormatTests 2019-11-22 15:43:27 -08:00
Markus Scherer
a7e378d587 ICU-20893 Unicode 13 beta
See PR #915, see changes.txt
- Unicode 13 beta data as of 2019-nov-21
- uprops.icu format version 7.7 with more bits for Script/Script_Extensions
- more bits in spoof checker ScriptSet
- root line break rules adjusted for UAX 14 changes, from Andy
- line break tailorings not yet in sync with root
2019-11-21 17:35:53 -08:00
Peter Edberg
ceb84b5dde ICU-20844 remove restriction on minInt=minFrac=0, ensure doFastFormatInt32
and NumberFormatterImpl::writeNumber produce at least 1 result digit (#917)
2019-11-13 16:15:02 -08:00
Frank Tang
afbd1b91d9 ICU-20705 Add udtitvfmt_formatCalendarToResult
See #896
2019-11-12 09:34:52 -08:00
Mihai Nita
17d23d71c0 ICU-20739 Force seconds if the skeleton has fractional seconds 2019-11-08 16:03:40 -08:00
Shane Carr
cfb298f035 ICU-20709 Use SIGNUM_COUNT for number of entries in Signum enum. 2019-11-05 14:43:34 -08:00
Shane Carr
00946cef43 ICU-20709 Moving rounder call before number properties.
- Changes EXCEPT_ZERO notation to hide sign on numbers that round to zero.
- Adds additional tests for this behavior.
2019-11-05 14:43:34 -08:00
Shane Carr
e7b540d1af ICU-20709 Refactoring number formatter to apply pattern after compact notation. 2019-11-05 14:43:34 -08:00
Shane Carr
369e67221c ICU-20709 Adding fourth signum type. Converting Java to use enum. 2019-11-05 14:43:34 -08:00
Frank Tang
fab4c3c719 ICU-20884 initialized buffer uloc_getKeywordValue 2019-11-05 13:51:35 -08:00
Frank Yung-Fong Tang
3735b6b8c0 ICU-20872 remove extra ; after function {}
See #888
2019-11-05 11:43:02 -08:00
Andy Heninger
1206f07a52 ICU-20863 Regex Named Capture map, add a missing nullptr check. 2019-10-28 21:10:41 -07:00
Andy Heninger
e94657e614 ICU-20863 Regex Named Capture map, add a missing nullptr check. 2019-10-28 16:53:18 -07:00
Frank Tang
84f6735fde ICU-20478 Sort variant in (for|to)LanguageTag of icu::Locale and ULocale
See #836
2019-10-28 14:57:10 -07:00
Frank Yung-Fong Tang
176674f9f1 ICU-20872 remove extra ; after function {}
See #888
2019-10-23 11:30:29 -07:00
Andy Heninger
03937347fb ICU-20863 Regex, lazy creation and reduced size of map from capture group names to numbers. 2019-10-22 17:23:26 -07:00
Daniel Ju
e95840c59c ICU-20857 Update version numbers to 66.0.1 2019-10-21 12:32:39 -07:00
Frank Tang
596647c0c3 ICU-20862 Fix setKeywordValue U_BUFFER_OVERFLOW_ERROR bug.
See #885
2019-10-18 10:54:56 -07:00
Jeff Genovy
727505bdda ICU-20850 Use LocalMemory for cmd to prevent use after free 2019-10-15 12:52:13 -07:00
Jeff Genovy
1e65be7d1a ICU-20858 Fix Windows data build failure with long paths 2019-10-11 11:43:04 -07:00
Jeff Genovy
c6d2de5222 ICU-20859 ICU4C: Python data build uses wrong value for tool_cfg 2019-10-11 11:41:55 -07:00