Commit graph

4753 commits

Author SHA1 Message Date
Frank Tang
6d4cea57ed ICU-22727 fix addLikelySubtags for 5-8 chars lang codes
Fix C++ code, add tests for C, C++ and Java API
2024-04-11 12:31:36 -07:00
Frank Tang
b2539f44df ICU-22534 BRS75 Remove fixed logKnownIssue
CLDR17099 is fixed in CLDR44 and the test now passed. Remove
the logKnownIssue so it will test and report future breakage.
2024-03-28 16:11:34 -07:00
Frank Tang
0127e4f760 ICU-22534 BRS75 Remove fixed logKnownIssue for CLDR-17024
CLDR-17024 is fixed in CLDR45 and the test now passed.
Remove the logKnownIssue so it will test and report future breakage.
2024-03-28 16:11:27 -07:00
Frank Tang
d83d26cc5d ICU-9972 Fix Chinese/Dangi Calendar getActualMaximum(UCAL_DAY_OF_YEAR)
Also fix ICU-12620 which is mark duplicate of ICU-9972 just now.
and fix ICU-22258.

Separate the new year and winter solstice cache since the calculated
value for these two calendar are mostly but not always the same due
to slightly different observation timeZone.

Remove the epochYear and zoneAstroCalc from the member data
and instead return them from a getStting() method with the two caches
since all four of them are constant per subclass of ChineseCalendar
and do not need to be different per object.

The known issues in the TestLimit is caused by both Calendar get/put the
value from the same cache while the calculated result depends on the
timeZone zoneAstroCalc.
2024-03-28 11:02:21 -07:00
Tim Chevalier
aff1bbaa14 ICU-22261 Add UCONFIG_NO_MF2 flag that can be used to disable MessageFormat 2 functionality 2024-03-28 08:48:35 -07:00
Tim Chevalier
f7d641d5ad ICU-22261 Add tech preview implementation for MessageFormat 2.0 to icu4c 2024-03-27 17:04:07 -04:00
Rich Gillam
d4bc9bef26 ICU-22611 Fixed failures in EnvTest. 2024-03-26 16:59:48 -07:00
Shane F. Carr
8a1df5a7f4 ICU-22692 Change SimpleNumber truncateAt to setMaximumIntegerDigits
Also promotes the remaining draft SimpleNumber functions to stable.

See #2892
2024-03-26 16:13:46 -07:00
Rich Gillam
13bf3c8313 ICU-22611 Fixed the RBNF MultiplierSubstitution to only perform floor() on the value being formatted when the
substitution is using a DecimalFormat and its owning rule also has a modulus substitution.  Took out a redundant
call to floor().  Added a hack to allow the caller to change the rounding behavior with setRoundingMode().
Added appropriate unit tests. Added additional documentation of the behavior to the API docs.
2024-03-22 11:18:27 -07:00
Fredrik Roubert
b3032aba0c ICU-22643 Verify that UCHAR_TYPE works for all public header files. 2024-03-21 23:18:53 +01:00
Frank Tang
d259da8118 ICU-22700 Fix large POSIX charset name cause hang
Fix fuzzer found issue of hang that caused by long POSIX charset name.
Limit the POSIX charset name to at most 64 chars.
2024-03-21 11:33:52 -07:00
Fredrik Roubert
e246d3b712 ICU-22643 Make UCHAR_TYPE work as intended with C++11, C11 & macOS.
Since ICU4C requires C++11 and C11 the char16_t data type can be used
everywhere, as long as the uchar.h header file gets included when
building as C (where it isn't a keyword as in C++), but this doesn't
work on macOS which for unknown reasons lacks the uchar.h header file
and therefore needs a workaround to define char16_t.
2024-03-21 15:44:20 +01:00
Fredrik Roubert
91721504ef ICU-22621 Clang-Tidy: modernize-return-braced-init-list
https://releases.llvm.org/17.0.1/tools/clang/tools/extra/docs/clang-tidy/checks/modernize/return-braced-init-list.html
2024-03-21 13:50:45 +01:00
Frank Tang
0b77215040 ICU-22698 Clean up CalendarAstronomer 2024-03-20 13:36:17 -07:00
Markus Scherer
cce162bf4d ICU-11396 new properties Identifier_Status & Identifier_Type
See #2879
2024-03-20 13:20:14 -07:00
Elango Cheran
1be861209e ICU-22689 Add PPUCD-based data driven test for binary props
See #2889
2024-03-20 09:11:57 -07:00
Frank Tang
6b67715a94 ICU-22633 Fix hang on large negative day in hebrew calendar
Check error status and return error early in the loop
2024-03-19 16:32:06 -07:00
Fredrik Roubert
7c22ff7541 ICU-22621 Clang-Tidy: readability-string-compare
https://releases.llvm.org/17.0.1/tools/clang/tools/extra/docs/clang-tidy/checks/readability/string-compare.html
2024-03-19 15:55:56 +01:00
Fredrik Roubert
6ad78a08c7 ICU-22621 Clang-Tidy: readability-redundant-control-flow
https://releases.llvm.org/17.0.1/tools/clang/tools/extra/docs/clang-tidy/checks/readability/redundant-control-flow.html
2024-03-19 15:55:56 +01:00
Fredrik Roubert
e017edc97d ICU-22621 Clang-Tidy: readability-qualified-auto
https://releases.llvm.org/17.0.1/tools/clang/tools/extra/docs/clang-tidy/checks/readability/qualified-auto.html
2024-03-19 15:55:56 +01:00
DraganBesevic
4f2cefb7ca ICU-22534 Integrate CLDR 45 release beta1 2024-03-18 20:49:00 -07:00
Fredrik Roubert
ce052f52c2 ICU-22621 Clang-Tidy: readability-delete-null-pointer
https://releases.llvm.org/17.0.1/tools/clang/tools/extra/docs/clang-tidy/checks/readability/delete-null-pointer.html
2024-03-18 17:14:23 +01:00
Younies Mahmoud
4405c543ad ICU-22686 Fix Unit preferences calculation in Cpp 2024-03-18 13:23:58 +01:00
Fredrik Roubert
5401c12018 ICU-22621 Clang-Tidy: modernize-use-nullptr
https://releases.llvm.org/17.0.1/tools/clang/tools/extra/docs/clang-tidy/checks/modernize/use-nullptr.html
2024-03-15 14:31:54 +01:00
Frank Tang
de9910659d ICU-22661 Limit the size of variants in Locale
See #2821
2024-03-14 16:23:51 -07:00
Rich Gillam
2b6ddc50fe ICU-22202 Fixed DateIntervalFormat to solve a couple "conflicting fields" errors. 2024-03-14 14:31:48 -07:00
DraganBesevic
1b2d28b042 ICU-22534 Integrate CLDR 45 release alpha 3, part 3, source files 2024-03-14 08:30:09 -07:00
Frank Tang
9a912bb51b ICU-22633 Add more Calendar overflow tests
Test set+set, set+add, set+roll, add+add, roll+roll
Fix more int32_t overflow problems.

Optimize both Java and C++ Hebrew Calendar month/year advancement by first consider
every 235 months is 19 years before iteration.
2024-03-13 15:48:25 -07:00
Fredrik Roubert
2a1853c9a9 ICU-22621 Clang-Tidy: modernize-use-emplace
https://releases.llvm.org/17.0.1/tools/clang/tools/extra/docs/clang-tidy/checks/modernize/use-emplace.html
2024-03-13 16:31:47 +01:00
Frank Tang
d43d216feb ICU-22633 Test and fix int32_t overflow for Calendar set
Add test to set with INT32_MAX and INT32_MIN then call getTime()
and fix all the undefined errors.
2024-03-12 16:46:53 -07:00
Peter Edberg
ceee4f0b46 ICU-22655 Implement "special" conversion for speed-beaufort, part 2 icu4c 2024-03-09 19:52:42 -08:00
Frank Tang
784056dfdb ICU-22633 Fix overflow in Chinese calendar
Fix issue found by https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=67256
2024-03-07 16:03:00 -08:00
Craig
89cf56333f ICU-22534 BRS#27 fix CI-Exhaustive-Main breakage for locale qaa 2024-03-07 13:47:49 +01:00
Frank Tang
e0a711c0a4 ICU-22633 Fix Hebrew overflow issue 2024-03-06 14:52:19 -08:00
Craig
7bc202ae87 ICU-22534 BRS#27 scrub closed issues (frontload) 2024-03-05 11:15:28 -08:00
Frank Tang
73744ea41f ICU-22633 Fix overflow cause by large AM PM value
Fix https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=66771
2024-03-04 13:48:24 -08:00
Frank Tang
37526240e1 ICU-22274 Mark known issue for 3 timezones for EnvTest
tz2024a change "Asia/Qostanay" "Asia/Almaty" but test machines has
not yet update their zoneinfo to 2024a so we mark them as known issues

extern long timezone; in <time.h> (set man tzset on Linux shell)
returns wrong value when TZ=America/Scoresbysund
2024-03-04 11:06:39 -08:00
Shane F. Carr
71b9b88200 ICU-22319 Fix number range semanticallyEquivalent
See #2385
2024-03-04 08:23:00 -08:00
Frank Tang
ec800e7407 ICU-22633 Return error if era is out of range 2024-02-27 10:56:28 -08:00
Fredrik Roubert
314f03eeaf ICU-22532 Don't dereference nullptr (-Wtautological-undefined-compare). 2024-02-27 14:11:38 +01:00
Rahul Pandey
3c82e6857c ICU-22676 Undefine move32 since it is interpreted system call with MSVC ARM64 2024-02-26 08:55:31 -08:00
Frank Tang
b24b251bca ICU-22633 Fix more int overflow issues in calendar 2024-02-13 17:24:18 -08:00
Fredrik Roubert
939f08f274 ICU-22520 Use C++ function signatures for internal C++ functions.
Some of this code was originally written as C code and some of this code
was originally written as C++ code but made to resemble the then already
existing code that had once been C code. Changing it all to normal C++
now will make it easier and safer to work with going forward.

· Use unnamed namespace instead of static.
· Use reference instead of non-nullable pointer.
· Use bool instead of UBool.
· Use constexpr for static data.
· Use U_EXPORT instead of U_CAPI or U_CFUNC.
· Use the default calling convention instead of U_EXPORT2.
2024-02-12 21:44:06 +01:00
Frank Tang
abcb80fd53 ICU-22615 Test TimeZoneNames API will not assert with non ASCII.
Add tests and return error when the ID is non ASCII
2024-02-08 23:37:14 -08:00
Robin Leroy
ba1208e49b ICU-22518 Add a flag to export the output of the reference implementation from the old segmentation monkey tests 2024-02-08 04:54:33 +01:00
Frank Yung-Fong Tang
0b66fada30 ICU-22633 Fix integer overflow inside Calendar code
See #2806
2024-02-07 10:58:41 -08:00
Peter Edberg
12cbf73e39 ICU-22583 BRS 75rc CLDR 45-alpha0 to ICU main part 3 (source and test code changes) 2024-02-06 18:07:44 -08:00
Frank Tang
9515e82741 ICU-22633 Fix Integer-overflow in icu_75::Calendar::add
See #2805
2024-02-01 13:49:41 -08:00
Frank Tang
e1415d1282 ICU-22635 Avoid integer-overflow for invalid large UChar32 2024-01-29 11:57:12 -08:00
Frank Tang
8f80c62aa2 ICU-22638 Fix cast overflow issue 2024-01-25 12:11:56 -08:00