Commit graph

23933 commits

Author SHA1 Message Date
Chris Chapman
1c2a1c50b7 ICU-22896 updating tzdata to 2024b 2024-09-20 15:20:39 -07:00
Shane F. Carr
94057e9550 ICU-22900 Remove deprecated SimpleNumber truncateStart
See #3192
2024-09-20 12:10:41 -07:00
Frank Tang
48cc8785f2 ICU-22730 Fix int32_t overflow in Persian calendar 2024-09-20 10:24:22 -07:00
Tim Chevalier
5991c9392c ICU-22890 MF2: Add ICU4C test for lone surrogates
Add a test to ICU4C for handling of lone surrogates.

Incidentally fix uninitialized-memory bug in MessageFormatter
(initialize `errors` to nullptr)

Co-authored-by: Frank Tang <ftang@chromium.org>
2024-09-19 14:28:02 -07:00
Tim Chevalier
23edf9cca6 ICU-22762 MF2: Add builder method to control error handling behavior
Add MessageFormatter::Builder::setErrorHandlingBehavior() method
and a new enum type MessageFormatter::UMFErrorHandlingBehavior
to denote strict or best-effort behavior.

The reason for adding a single method that takes an enum is to allow
for the possibility of more error handling modes in the future.

Co-authored-by: Markus Scherer <markus.icu@gmail.com>
2024-09-19 13:21:56 -07:00
Peter Edberg
ac737dabcf ICU-12865 Update API docs to reflect new features in ICU 54 and later :-) 2024-09-19 11:19:15 -07:00
Fredrik Roubert
55c5895923 ICU-22793 Clang-Tidy: google-readability-casting
https://releases.llvm.org/19.1.0/tools/clang/tools/extra/docs/clang-tidy/checks/google/readability-casting.html
2024-09-19 18:59:13 +02:00
Rahul Pandey
30efee0d3a ICU-22723 BRS_76_RC: Update version number to 76.1-SNAPSHOT 2024-09-19 21:49:13 +05:30
Fredrik Roubert
0bf8a95309 ICU-22793 Remove superfluous return value typecasts to UBool. 2024-09-19 17:11:38 +02:00
Peter Edberg
07e0f7ee2f ICU-22318 Fix bad spacing in utxttest.cpp 2024-09-19 14:51:01 +02:00
Rich Gillam
1b33f5e30b ICU-22889 Implemented a recursion limit in the RBNF parsing code to match the one already present in the RBNF
formatting code.
2024-09-18 16:05:13 -07:00
Craig
feca6eea68 ICU-22723 Frontload ICU4C change report 75 -> 76 2024-09-18 14:56:40 -07:00
Frank Tang
303b7e81d7 ICU-22897 Fix memory leak and int overflow
1. Rewrite to use LocalPointer to prevent memory leak
2. Rewrite the if/else to switch to make the logic clear
3. Delete the rule if not remember inside the rule set to fix memory
leak.
4. Check base value calculation to avoid int64_t overflow.
5. Add memory leak test
2024-09-18 14:40:13 -07:00
DraganBesevic
ce4b90e484 ICU-22723 Integrate CLDR 46 release beta1, part 3, source files 2024-09-18 10:41:49 -07:00
DraganBesevic
c7fe2558be ICU-22723 Integrate CLDR 46 release beta1, part 2, data and test files 2024-09-18 10:41:49 -07:00
Tim Chevalier
747d5eef3b ICU-22834 Update tests to reflect MF2 schema in conformance repo
This also updates the spec tests from the current version of the MFWG
repository and removes some duplicate tests.
Spec tests now reflect the message-format-wg repo as of
5612f3b050

It also updates both the ICU4C and ICU4J parsers to follow the
current test schema in the conformance repository.

This includes adding code to both parsers to allow `src` to be
either a single string or an array of strings (per
https://github.com/unicode-org/conformance/pull/255 ),
and eliminating `srcs` in tests.

It also includes other changes to make updated spec tests pass:

ICU4C: Allow trailing whitespace for complex messages, due to spec change
ICU4C: Parse number literals correctly in Number::format
ICU4J: Allow trailing whitespace after complex body, per spec change
ICU4C: Fix bug that was assuming an .input variable can't have a reserved annotation
ICU4C: Fix bug where unsupported '.i' was parsed as an '.input'
ICU4C/ICU4J: Handle markup with space after the initial left curly brace
ICU4C: Check for duplicate variant errors
ICU4C/ICU4J: Handle leading whitespace in complex messages
ICU4J: Treat whitespace after .input keyword as optional
ICU4J: Don't format unannotated number literals as numbers
2024-09-18 07:46:29 -07:00
Robin Leroy
bfc53547d1 ICU-22879 Test the collator predicates in maps 2024-09-17 20:44:21 +02:00
Fredrik Roubert
b160feaac2 ICU-22879 Provide collator based predicates for use with STL algorithms. 2024-09-17 20:44:21 +02:00
Fredrik Roubert
6020a98fbb ICU-22873 Update configure files from configure.ac using autoreconf. 2024-09-17 15:06:39 +05:30
Fredrik Roubert
e53f1df472 ICU-22873 Make configure log versions of the compilers used. 2024-09-17 15:06:39 +05:30
Fredrik Roubert
5c026623f1 ICU-22874 Update configure files from configure.ac using autoreconf. 2024-09-16 16:12:35 +02:00
Fredrik Roubert
b542ae9d91 ICU-22874 Update to use autoconf 2.72 for generating configure files. 2024-09-16 16:12:35 +02:00
Fredrik Roubert
e8cc2ec282 ICU-22874 Update the config.* files to current upstream versions.
https://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD
https://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD
2024-09-16 16:12:35 +02:00
Fredrik Roubert
87a9284500 ICU-22310 Update configure files from configure.ac using autoreconf. 2024-09-13 13:44:17 +02:00
Fredrik Roubert
30fdd06cba ICU-22310 Delete long since obsolete configure.ac sections.
Having commented-out checks for things that don't even need to be
checked serves no purpose.

MSVC floating point optimizations don't need to be set, /fp:precise is
the default and has been so for a very long time now:

https://learn.microsoft.com/en-us/cpp/build/reference/fp-specify-floating-point-behavior?view=msvc-140

ICU4C requires C++17 and there aren't any compilers capable of that
without namespace support so there's no need to check that.
2024-09-13 13:44:17 +02:00
Markus Scherer
4433a94a57 ICU-22722 toTitle does not use UTR 21 2024-09-12 16:05:33 -07:00
Markus Scherer
5447a23070 ICU-22876 add U_SHOW_CPLUSPLUS_HEADER_API for C++ header-only APIs 2024-09-12 15:36:40 -07:00
Frank Tang
70caba0027 ICU-22716 Turn on message_formatter_fuzzer 2024-09-12 14:53:01 -07:00
Frank Tang
fd8a552527 ICU-22884 Fix assertion and Heap-use-after-free
Issue in icu_76::message2::MessageFormatter::~MessageFormatter
2024-09-12 11:57:38 -07:00
Frank Tang
752da7303f ICU-22730 Fix int overflow inside CE Calendar 2024-09-11 22:07:01 -07:00
Fredrik Roubert
0cb5bc6707 ICU-22843 Disambiguate UnicodeString::readOnlyAlias() for MSVC.
Both std::u16string_view and std::wstring_view are possible matches for
UnicodeString as a template parameter, but adding an explicit overload
avoids both having to make that choice and taking the detour through
creating any string view at all.
2024-09-12 00:36:49 +02:00
Fredrik Roubert
376f10db47 ICU-22843 Add a test case that's ambiguous to MSVC and fails to compile. 2024-09-12 00:36:49 +02:00
Rich Gillam
fda2223952 ICU-22723 Regenerated urename.h. 2024-09-11 14:42:46 -07:00
Rich Gillam
d0fb2d54b3 ICU-22723 Promoted all @draft ICU 74 APIs to @stable ICU 74 2024-09-11 14:06:45 -07:00
Frank Tang
36555b7800 ICU-22716 Temp turn off message_formatter_fuzzer
The running of message_formatter_fuzzer cause out of memory problem.
We will address that in later PR.
2024-09-11 12:12:36 -07:00
Frank Tang
9270216cb7 ICU-22863 Remove extra line in Islamic calendar
Fix a regression caused by d43d216feb
2024-09-10 22:53:06 -07:00
Frank Tang
4f246ab17f ICU-22716 Test VTimeZone in fuzzer 2024-09-10 22:51:12 -07:00
Frank Tang
1c3bf0bf82 ICU-22716 Extend Collator fuzzing 2024-09-10 22:51:00 -07:00
Frank Tang
3a74fcf052 ICU-22716 Test more number format 2024-09-10 22:50:47 -07:00
Frank Tang
266a2b8de2 ICU-22716 Add MessageFormat fuzzer
ICU-22716 improve
2024-09-10 22:50:33 -07:00
Markus Scherer
37b41495d7 ICU-22876 C++ UnicodeSet/USet easy item iteration
See #3120
2024-09-10 17:38:03 -07:00
LamTrinh.Dev
f6b274a197 ICU-22721 Enhance #if for locdispnames.cpp
Enhance #if for locdispnames.cpp

ICU-22721 Enhance #if for locdispnames.cpp, remove auto-generate file in local git.

ICU-22721 Enhance #if for locdispnames.cpp.

ICU-22721 Enhance #if for locdispnames.cpp, revert old-xmls.tar.bz2 file from main branch.

ICU-22721 Enhance #if for locdispnames.cpp

Enhance #if for locdispnames.cpp

ICU-22721 Enhance #if for locdispnames.cpp, remove auto-generate file in local git.

ICU-22721 Enhance #if for locdispnames.cpp.

ICU-22721 Enhance #if for locdispnames.cpp, revert old-xmls.tar.bz2 file from main branch.
2024-09-10 14:32:14 -07:00
Fredrik Roubert
7cad791fb6 ICU-22843 Simplify UTF-16 string literals. 2024-09-10 18:58:01 +02:00
Fredrik Roubert
3abf474f26 ICU-22843 Check libc++ version for std::basic_string_view<uint16_t>.
As was pointed out in PR #3106, the standard doesn't mandate the
existence of std::char_traits<uint16_t> and libc++ did actually
deprecate it in release 18 and delete it in release 19.

As ICU4C uses this for backward compatibility for old code that still
depends on setting -DUCHAR_TYPE=uint16_t it'd be nice to keep using it
as long as possible but once it's gone from the standard library there
isn't really much useful that ICU4C could do about that so conditionally
compiling the code when the standard library version is old enough
should suffice for keeping backward compatibility for yet some time.

https://github.com/llvm/llvm-project/commit/cce062d
2024-09-10 18:18:15 +02:00
yumaoka
74d5e6d258 ICU-22723 Update currency numeric code mapping data. 2024-09-09 09:25:02 -04:00
yumaoka
394bebdb46 ICU-22596 IBM-1388 converter data update 2024-09-09 09:23:41 -04:00
Fredrik Roubert
6c9d39a08c ICU-22843 Enable constructing UnicodeString from literal in fixed time.
When passing a string literal to any of the legacy constructors that
take just a plain pointer to a UTF-16 string it becomes necessary to
iterate through the string to find its length, even though this length
was known to the compiler (which just has no way of passing it on to the
constructor).

But when calling the new templated string view constructor instead it
becomes possible for the compiler to use the known length of a string
literal to directly create a string view of the correct size and pass
this on to the constructor.

By replacing the legacy constructors with the new constructor this is
made the default behaviour.
2024-09-09 13:50:58 +02:00
Markus Scherer
f062f52c12 ICU-22294 UTS46 transitional=deprecated, change DEFAULT 2024-09-06 14:38:11 -07:00
Markus Scherer
415a7accc5 ICU-22707 adjust UTS46 for Unicode 16
See #3130
2024-09-06 10:00:11 -07:00
Frank Tang
4ef58328d0 ICU-22716 Reduce the data size to test calendar fuzzer
Calendar fuzzer test too many operations and cause timeout
which does not suerface the real issue. Limit the test data size to 100
instead of 1000 instead.
2024-09-05 11:17:07 -07:00