Commit graph

23747 commits

Author SHA1 Message Date
Henri Sivonen
b8389b1186 ICU-22718 Export disallowed/ignored UTS 46 data for ICU4X 2024-05-16 15:37:15 -07:00
Fredrik Roubert
43b0901a0e ICU-22721 Delete obsolete __STRICT_ANSI__ workaround for MinGW.
This was originally added in the year 2004 for ICU-3854 but is no longer
needed with contemporary versions of MinGW where it instead as of GCC 14
causes this problem:

__STRICT_ANSI__ seems to have been undefined; this is not supported.
2024-05-16 16:27:41 +02:00
Shane F. Carr
7bc1b89eb8 ICU-22764 Fix gendict memory safety in toml uchars mode
(cherry picked from commit 23bf38f10f)
2024-05-03 11:39:45 -07:00
DraganBesevic
7750081bda ICU-22535 Integrate CLDR 45 release beta5 2024-04-15 17:55:43 -07:00
Markus Scherer
0379e638a9 ICU-22520 doc: uloc_getName() & others may fail
for example with a U_ILLEGAL_ARGUMENT_ERROR since PR #2813
in some cases where the implementation may have
returned with a misleading U_BUFFER_OVERFLOW_ERROR
2024-04-15 15:59:57 -07:00
Fredrik Roubert
d8ee6843b9 ICU-22726 Add new CLDR 45 currency code XCG also to gCurrencyList. 2024-04-15 15:56:45 -07:00
Mihai Nita
aebd5ba54b ICU-22533 Change API version annotation from 75.0 to 75 2024-04-15 11:17:15 -07:00
DraganBesevic
9518b26a91 ICU-22535 Integrate CLDR 45 release beta4, part 5, restore copyright headers in catalog.txt 2024-04-12 16:21:12 -07:00
DraganBesevic
c27199ec9c ICU-22535 Integrate CLDR 45 release beta4, part 3, data updates 2024-04-12 16:21:12 -07:00
DraganBesevic
66c8c65857 ICU-22535 Integrate CLDR 45 release beta4, part 2, personName test data updates 2024-04-12 16:21:12 -07:00
Elango Cheran
a1bce0c096 ICU-22261 Refactor error handling for internal MF2 array-allocating functions 2024-04-12 09:22:15 -07:00
Fredrik Roubert
75eab42060 ICU-22261 Improved identification of the MSVC compiler and library.
It's not uncommon for code for Windows to use the _MSC_VER preprocessor
macro to identify that it's being compiled for Windows so it's also not
uncommon for compilers other than the real MSVC compiler to also set
this to be able to compile such code.

It's also not possible to use _MSC_VER to determine whether the C++
standard library implementation used is the Microsoft STL.

Clang will however refuse to instantiate a template with a forward
declared type, so the code that currently does this needs to be moved to
after the type has been properly defined, which in turn makes MSVC warn
that those templates aren't instantiated, so those warnings need to be
disabled, but then the disabling of warning C4661 doesn't work any
longer (for some unknown reason) but this can be resolved by properly
deleting the non-existent operators instead of disabling the warning.
2024-04-11 15:35:23 -07:00
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
Tim Chevalier
9e1c66daf7 ICU-22261 Refactor MF2 attributes and options parsing code
Previously, there were separate overrides for the options and
attributes parsing methods in the parser that were used in different
context. (Options can appear in Operator and Markup, while attributes
can appear in Expression and Markup.)

This is a refactoring that eliminates this duplicated code.
To enable it, a builder is added for the internal OptionMap type.

Separately, this patch also explicitly deletes copy constructors
and copy assignment operators for all Builder classes; a bug in an
earlier version of this patch caused me to notice this hadn't been
done. Also explicitly deletes move constructors/assignment operators
with the exception of OptionMap::Builder (OptionMap is non-public,
so that shouldn't cause confusion).
2024-04-09 08:15:54 -07:00
Fredrik Roubert
bae39adf67 ICU-22532 Resolve new / free() mismatch. 2024-04-08 22:04:00 +02:00
Tim Chevalier
4f0c2ca71c ICU-22261 Remove MF2 formatter caching optimization
The implementation was keeping a cache of FormatterFactory
    objects so that subsequent calls to the same formatter re-use the
    same object.
    The problem is that this is unsafe, because
    `MFFunctionRegistry::getFormatter()` returns a non-const `FormatterFactory*`;
    so if the caller deleted the resulting pointer, the formatter cache
    would contain a dangling pointer.
    
    This optimization was added because of an ICU4J test that checked for
    the presence of the optimization. However, for separate reasons
    (making `adoptFormatter()` actually adopt its argument), this test
    was already removed.
    
    The caching could be re-added later if that optimization is needed,
    but for now, remove it (also, no tests were checking for its presence).
2024-04-05 13:14:34 -07:00
DraganBesevic
9c466d43d9 ICU-22535 Integrate CLDR 45 release beta3 2024-04-04 08:49:37 -07:00
DraganBesevic
fc91b6bb7f ICU-22535 Integrate CLDR 45 release beta2, part 2, data and source files 2024-04-02 13:29:34 -07:00
DraganBesevic
492a8441db ICU-22535 Integrate CLDR 45 release beta2, part 1, binary files 2024-04-02 13:29:34 -07:00
Craig
97335dfa7e ICU-22534 add mf2 to docmain.h 2024-03-28 17:18:48 -07:00
Craig
1ac14c4ea7 ICU-22534 ICU4C API change report update 2024-03-28 16:27:46 -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
Tim Chevalier
070a1f420b ICU-22261 Add missing API tags for MessageFormat 2 methods/constants 2024-03-28 15:46:32 -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
Rich Gillam
cce642a84f ICU-22534 Regenerate urename.h for the ICU 75 release candidate. 2024-03-28 08:39:08 -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
Fredrik Roubert
4b8f8f3c48 ICU-22628 Replace log_err() with log_knownIssue() for known failure. 2024-03-27 15:58:19 +01:00
Fredrik Roubert
86b07da451 ICU-22618 Make unisetperf/draft possible to compile. 2024-03-27 15:54:42 +01: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
Rahul Pandey
8ba19195f9 ICU-22534 Update version number to 75.1 2024-03-26 07:02:45 +05:30
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
142850ae2c ICU-22691 Make sample code possible to compile with current ICU4C. 2024-03-21 23:19:54 +01:00
Fredrik Roubert
dd7b0a9d6d ICU-22691 Update configure files from configure.ac using autoreconf. 2024-03-21 23:19:54 +01:00
Fredrik Roubert
2a6bc212d4 ICU-22691 Delete abandoned sample code. 2024-03-21 23:19:54 +01: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
37bdffb240 ICU-22679 Fix broken header test
See #2918
2024-03-21 15:12:10 -07: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
Frank Tang
fbc1f33e7e ICU-22679 Clean up Calendar code.
1. Remove redudant implementation of default system ceuntry by using
   macro
2. Fold long if / else block if one block return.
2024-03-21 09:50:10 -07:00
Fredrik Roubert
028fa70c29 ICU-22701 Bugfix: Make test independent of the default locale.
The original intention behind this test case was to use the root locale,
but ures_getFunctionalEquivalent() is implemented by calling ures_open()
which sets URES_OPEN_LOCALE_DEFAULT_ROOT which will cause the default
locale to be loaded before the root locale.

To avoid that, pick a locale other than the root locale for the test.
2024-03-21 09:16:05 -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
Markus Scherer
5e95ed8294 ICU-22689 reminder for 16.0 update 2024-03-20 15:49:44 -07: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
7a3dfe877d ICU-22679 Remove getType and string comparsion
Change the logic of handling year in era 0 counting backwards
to depend on a boolean virtual function instead of adding
string comparsion code in the base class to have specific knowledge of
behavior of subclass.
2024-03-19 17:44:37 -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